Commit f672c42ba9e692756df504c9c3489b3d60093698
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 | 3 | <Input-number |
| 4 | 4 | v-if="!range && showInput" |
| 5 | 5 | :min="min" |
| 6 | + :size="inputSize" | |
| 6 | 7 | :max="max" |
| 7 | 8 | :step="step" |
| 8 | 9 | :value="exportValue[0]" |
| ... | ... | @@ -120,6 +121,13 @@ |
| 120 | 121 | type: Boolean, |
| 121 | 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 | 131 | showStops: { |
| 124 | 132 | type: Boolean, |
| 125 | 133 | default: false | ... | ... |