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,6 +13,7 @@ | ||
13 | </Form-item> | 13 | </Form-item> |
14 | <Form-item prop="targetKeys1"> | 14 | <Form-item prop="targetKeys1"> |
15 | <Transfer | 15 | <Transfer |
16 | + filterable | ||
16 | :data="formInline.data1" | 17 | :data="formInline.data1" |
17 | :target-keys="formInline.targetKeys1" | 18 | :target-keys="formInline.targetKeys1" |
18 | :render-format="render1" | 19 | :render-format="render1" |
@@ -111,6 +112,15 @@ | @@ -111,6 +112,15 @@ | ||
111 | message: '请输入', | 112 | message: '请输入', |
112 | trigger: 'change' | 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,7 +152,7 @@ | ||
152 | }, | 152 | }, |
153 | handleBlur () { | 153 | handleBlur () { |
154 | this.$emit('on-blur'); | 154 | this.$emit('on-blur'); |
155 | - if (!findComponentUpward(this, ['DatePicker', 'TimePicker', 'Cascader'])) { | 155 | + if (!findComponentUpward(this, ['DatePicker', 'TimePicker', 'Cascader', 'Search'])) { |
156 | this.dispatch('FormItem', 'on-form-blur', this.currentValue); | 156 | this.dispatch('FormItem', 'on-form-blur', this.currentValue); |
157 | } | 157 | } |
158 | }, | 158 | }, |
@@ -171,7 +171,7 @@ | @@ -171,7 +171,7 @@ | ||
171 | this.resizeTextarea(); | 171 | this.resizeTextarea(); |
172 | }); | 172 | }); |
173 | this.currentValue = value; | 173 | this.currentValue = value; |
174 | - if (!findComponentUpward(this, ['DatePicker', 'TimePicker', 'Cascader'])) { | 174 | + if (!findComponentUpward(this, ['DatePicker', 'TimePicker', 'Cascader', 'Search'])) { |
175 | this.dispatch('FormItem', 'on-form-change', value); | 175 | this.dispatch('FormItem', 'on-form-change', value); |
176 | } | 176 | } |
177 | }, | 177 | }, |
src/components/transfer/search.vue
@@ -44,14 +44,5 @@ | @@ -44,14 +44,5 @@ | ||
44 | this.$emit('on-query-clear'); | 44 | this.$emit('on-query-clear'); |
45 | } | 45 | } |
46 | } | 46 | } |
47 | - // todo 事件 | ||
48 | -// events: { | ||
49 | -// 'on-form-blur' () { | ||
50 | -// return false; | ||
51 | -// }, | ||
52 | -// 'on-form-change' () { | ||
53 | -// return false; | ||
54 | -// } | ||
55 | -// } | ||
56 | }; | 47 | }; |
57 | </script> | 48 | </script> |
src/components/transfer/transfer.vue
src/styles/components/input.less
@@ -58,6 +58,14 @@ | @@ -58,6 +58,14 @@ | ||
58 | .@{input-prefix-cls}-group{ | 58 | .@{input-prefix-cls}-group{ |
59 | .input-group-error; | 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 | .@{form-item-prefix-cls}-validating{ | 70 | .@{form-item-prefix-cls}-validating{ |
63 | .@{input-prefix-cls}{ | 71 | .@{input-prefix-cls}{ |