Commit f672c42ba9e692756df504c9c3489b3d60093698

Authored by Vace
Committed by GitHub
1 parent 0e6b84f3

add props input-size

表单布局中包含slider时,input 样式无法统一。或者考虑 允许 `showInput` 的值为 `String`。控制input的size。
Showing 1 changed file with 8 additions and 0 deletions   Show diff stats
src/components/slider/slider.vue
@@ -3,6 +3,7 @@ @@ -3,6 +3,7 @@
3 <Input-number 3 <Input-number
4 v-if="!range && showInput" 4 v-if="!range && showInput"
5 :min="min" 5 :min="min"
  6 + :size="inputSize"
6 :max="max" 7 :max="max"
7 :step="step" 8 :step="step"
8 :value="exportValue[0]" 9 :value="exportValue[0]"
@@ -120,6 +121,13 @@ @@ -120,6 +121,13 @@
120 type: Boolean, 121 type: Boolean,
121 default: false 122 default: false
122 }, 123 },
  124 + inputSize: {
  125 + type: String,
  126 + default: 'default',
  127 + validator (value) {
  128 + return oneOf(value, ['small', 'large', 'default']);
  129 + }
  130 + },
123 showStops: { 131 showStops: {
124 type: Boolean, 132 type: Boolean,
125 default: false 133 default: false