Commit aa9fc758da0be153b899f493f90f1784fff82b86
1 parent
84a8a413
update Transfer
update Transfer
Showing
5 changed files
with
21 additions
and
12 deletions
Show diff stats
examples/routers/form.vue
... | ... | @@ -13,6 +13,7 @@ |
13 | 13 | </Form-item> |
14 | 14 | <Form-item prop="targetKeys1"> |
15 | 15 | <Transfer |
16 | + filterable | |
16 | 17 | :data="formInline.data1" |
17 | 18 | :target-keys="formInline.targetKeys1" |
18 | 19 | :render-format="render1" |
... | ... | @@ -111,6 +112,15 @@ |
111 | 112 | message: '请输入', |
112 | 113 | trigger: 'change' |
113 | 114 | } |
115 | + ], | |
116 | + targetKeys1: [ | |
117 | + { | |
118 | + required: true, | |
119 | + type: 'array', | |
120 | + max: 2, | |
121 | + message: '太多了', | |
122 | + trigger: 'change' | |
123 | + } | |
114 | 124 | ] |
115 | 125 | } |
116 | 126 | } | ... | ... |
src/components/input/input.vue
... | ... | @@ -152,7 +152,7 @@ |
152 | 152 | }, |
153 | 153 | handleBlur () { |
154 | 154 | this.$emit('on-blur'); |
155 | - if (!findComponentUpward(this, ['DatePicker', 'TimePicker', 'Cascader'])) { | |
155 | + if (!findComponentUpward(this, ['DatePicker', 'TimePicker', 'Cascader', 'Search'])) { | |
156 | 156 | this.dispatch('FormItem', 'on-form-blur', this.currentValue); |
157 | 157 | } |
158 | 158 | }, |
... | ... | @@ -171,7 +171,7 @@ |
171 | 171 | this.resizeTextarea(); |
172 | 172 | }); |
173 | 173 | this.currentValue = value; |
174 | - if (!findComponentUpward(this, ['DatePicker', 'TimePicker', 'Cascader'])) { | |
174 | + if (!findComponentUpward(this, ['DatePicker', 'TimePicker', 'Cascader', 'Search'])) { | |
175 | 175 | this.dispatch('FormItem', 'on-form-change', value); |
176 | 176 | } |
177 | 177 | }, | ... | ... |
src/components/transfer/search.vue
src/components/transfer/transfer.vue
src/styles/components/input.less
... | ... | @@ -58,6 +58,14 @@ |
58 | 58 | .@{input-prefix-cls}-group{ |
59 | 59 | .input-group-error; |
60 | 60 | } |
61 | + .@{transfer-prefix-cls} { | |
62 | + .@{input-prefix-cls} { | |
63 | + .input; | |
64 | + &-icon{ | |
65 | + color: @subsidiary-color; | |
66 | + } | |
67 | + } | |
68 | + } | |
61 | 69 | } |
62 | 70 | .@{form-item-prefix-cls}-validating{ |
63 | 71 | .@{input-prefix-cls}{ | ... | ... |