Commit fe5ffd7f3f763bb67db596a0403012aaeadb854b
1 parent
d7bcee71
fixed #4196 #4165
Showing
22 changed files
with
26 additions
and
26 deletions
Show diff stats
src/components/auto-complete/auto-complete.vue
... | ... | @@ -75,7 +75,7 @@ |
75 | 75 | return oneOf(value, ['small', 'large', 'default']); |
76 | 76 | }, |
77 | 77 | default () { |
78 | - return this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; | |
78 | + return !this.$IVIEW || this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; | |
79 | 79 | } |
80 | 80 | }, |
81 | 81 | icon: { | ... | ... |
src/components/avatar/avatar.vue
... | ... | @@ -26,7 +26,7 @@ |
26 | 26 | return oneOf(value, ['small', 'large', 'default']); |
27 | 27 | }, |
28 | 28 | default () { |
29 | - return this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; | |
29 | + return !this.$IVIEW || this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; | |
30 | 30 | } |
31 | 31 | }, |
32 | 32 | src: { | ... | ... |
src/components/button/button-group.vue
... | ... | @@ -16,7 +16,7 @@ |
16 | 16 | return oneOf(value, ['small', 'large', 'default']); |
17 | 17 | }, |
18 | 18 | default () { |
19 | - return this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; | |
19 | + return !this.$IVIEW || this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; | |
20 | 20 | } |
21 | 21 | }, |
22 | 22 | shape: { | ... | ... |
src/components/button/button.vue
... | ... | @@ -51,7 +51,7 @@ |
51 | 51 | return oneOf(value, ['small', 'large', 'default']); |
52 | 52 | }, |
53 | 53 | default () { |
54 | - return this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; | |
54 | + return !this.$IVIEW || this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; | |
55 | 55 | } |
56 | 56 | }, |
57 | 57 | loading: Boolean, | ... | ... |
src/components/cascader/cascader.vue
... | ... | @@ -100,7 +100,7 @@ |
100 | 100 | return oneOf(value, ['small', 'large', 'default']); |
101 | 101 | }, |
102 | 102 | default () { |
103 | - return this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; | |
103 | + return !this.$IVIEW || this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; | |
104 | 104 | } |
105 | 105 | }, |
106 | 106 | trigger: { |
... | ... | @@ -132,7 +132,7 @@ |
132 | 132 | transfer: { |
133 | 133 | type: Boolean, |
134 | 134 | default () { |
135 | - return this.$IVIEW.transfer === '' ? false : this.$IVIEW.transfer; | |
135 | + return !this.$IVIEW || this.$IVIEW.transfer === '' ? false : this.$IVIEW.transfer; | |
136 | 136 | } |
137 | 137 | }, |
138 | 138 | name: { | ... | ... |
src/components/checkbox/checkbox-group.vue
src/components/checkbox/checkbox.vue
... | ... | @@ -65,7 +65,7 @@ |
65 | 65 | return oneOf(value, ['small', 'large', 'default']); |
66 | 66 | }, |
67 | 67 | default () { |
68 | - return this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; | |
68 | + return !this.$IVIEW || this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; | |
69 | 69 | } |
70 | 70 | }, |
71 | 71 | name: { | ... | ... |
src/components/color-picker/color-picker.vue
... | ... | @@ -172,7 +172,7 @@ export default { |
172 | 172 | return oneOf(value, ['small', 'large', 'default']); |
173 | 173 | }, |
174 | 174 | default () { |
175 | - return this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; | |
175 | + return !this.$IVIEW || this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; | |
176 | 176 | } |
177 | 177 | }, |
178 | 178 | hideDropDown: { |
... | ... | @@ -202,7 +202,7 @@ export default { |
202 | 202 | transfer: { |
203 | 203 | type: Boolean, |
204 | 204 | default () { |
205 | - return this.$IVIEW.transfer === '' ? false : this.$IVIEW.transfer; | |
205 | + return !this.$IVIEW || this.$IVIEW.transfer === '' ? false : this.$IVIEW.transfer; | |
206 | 206 | } |
207 | 207 | }, |
208 | 208 | name: { | ... | ... |
src/components/date-picker/picker.vue
... | ... | @@ -173,7 +173,7 @@ |
173 | 173 | return oneOf(value, ['small', 'large', 'default']); |
174 | 174 | }, |
175 | 175 | default () { |
176 | - return this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; | |
176 | + return !this.$IVIEW || this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; | |
177 | 177 | } |
178 | 178 | }, |
179 | 179 | placeholder: { |
... | ... | @@ -189,7 +189,7 @@ |
189 | 189 | transfer: { |
190 | 190 | type: Boolean, |
191 | 191 | default () { |
192 | - return this.$IVIEW.transfer === '' ? false : this.$IVIEW.transfer; | |
192 | + return !this.$IVIEW || this.$IVIEW.transfer === '' ? false : this.$IVIEW.transfer; | |
193 | 193 | } |
194 | 194 | }, |
195 | 195 | name: { | ... | ... |
src/components/dropdown/dropdown.vue
src/components/input-number/input-number.vue
... | ... | @@ -91,7 +91,7 @@ |
91 | 91 | return oneOf(value, ['small', 'large', 'default']); |
92 | 92 | }, |
93 | 93 | default () { |
94 | - return this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; | |
94 | + return !this.$IVIEW || this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; | |
95 | 95 | } |
96 | 96 | }, |
97 | 97 | disabled: { | ... | ... |
src/components/input/input.vue
... | ... | @@ -92,7 +92,7 @@ |
92 | 92 | return oneOf(value, ['small', 'large', 'default']); |
93 | 93 | }, |
94 | 94 | default () { |
95 | - return this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; | |
95 | + return !this.$IVIEW || this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; | |
96 | 96 | } |
97 | 97 | }, |
98 | 98 | placeholder: { | ... | ... |
src/components/modal/modal.vue
... | ... | @@ -100,7 +100,7 @@ |
100 | 100 | transfer: { |
101 | 101 | type: Boolean, |
102 | 102 | default () { |
103 | - return this.$IVIEW.transfer === '' ? true : this.$IVIEW.transfer; | |
103 | + return !this.$IVIEW || this.$IVIEW.transfer === '' ? true : this.$IVIEW.transfer; | |
104 | 104 | } |
105 | 105 | }, |
106 | 106 | fullscreen: { | ... | ... |
src/components/page/page.vue
src/components/poptip/poptip.vue
src/components/radio/radio-group.vue
... | ... | @@ -26,7 +26,7 @@ |
26 | 26 | return oneOf(value, ['small', 'large', 'default']); |
27 | 27 | }, |
28 | 28 | default () { |
29 | - return this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; | |
29 | + return !this.$IVIEW || this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; | |
30 | 30 | } |
31 | 31 | }, |
32 | 32 | type: { | ... | ... |
src/components/radio/radio.vue
... | ... | @@ -48,7 +48,7 @@ |
48 | 48 | return oneOf(value, ['small', 'large', 'default']); |
49 | 49 | }, |
50 | 50 | default () { |
51 | - return this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; | |
51 | + return !this.$IVIEW || this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; | |
52 | 52 | } |
53 | 53 | }, |
54 | 54 | name: { | ... | ... |
src/components/select/select.vue
... | ... | @@ -189,7 +189,7 @@ |
189 | 189 | return oneOf(value, ['small', 'large', 'default']); |
190 | 190 | }, |
191 | 191 | default () { |
192 | - return this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; | |
192 | + return !this.$IVIEW || this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; | |
193 | 193 | } |
194 | 194 | }, |
195 | 195 | labelInValue: { |
... | ... | @@ -208,7 +208,7 @@ |
208 | 208 | transfer: { |
209 | 209 | type: Boolean, |
210 | 210 | default () { |
211 | - return this.$IVIEW.transfer === '' ? false : this.$IVIEW.transfer; | |
211 | + return !this.$IVIEW || this.$IVIEW.transfer === '' ? false : this.$IVIEW.transfer; | |
212 | 212 | } |
213 | 213 | }, |
214 | 214 | // Use for AutoComplete | ... | ... |
src/components/spin/spin.vue
... | ... | @@ -23,7 +23,7 @@ |
23 | 23 | return oneOf(value, ['small', 'large', 'default']); |
24 | 24 | }, |
25 | 25 | default () { |
26 | - return this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; | |
26 | + return !this.$IVIEW || this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; | |
27 | 27 | } |
28 | 28 | }, |
29 | 29 | fix: { | ... | ... |
src/components/switch/switch.vue
... | ... | @@ -43,7 +43,7 @@ |
43 | 43 | return oneOf(value, ['large', 'small', 'default']); |
44 | 44 | }, |
45 | 45 | default () { |
46 | - return this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; | |
46 | + return !this.$IVIEW || this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; | |
47 | 47 | } |
48 | 48 | }, |
49 | 49 | name: { | ... | ... |
src/components/table/table.vue
... | ... | @@ -132,7 +132,7 @@ |
132 | 132 | return oneOf(value, ['small', 'large', 'default']); |
133 | 133 | }, |
134 | 134 | default () { |
135 | - return this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; | |
135 | + return !this.$IVIEW || this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; | |
136 | 136 | } |
137 | 137 | }, |
138 | 138 | width: { | ... | ... |
src/components/tooltip/tooltip.vue