From fe5ffd7f3f763bb67db596a0403012aaeadb854b Mon Sep 17 00:00:00 2001 From: 梁灏 Date: Tue, 7 Aug 2018 16:35:27 +0800 Subject: [PATCH] fixed #4196 #4165 --- src/components/auto-complete/auto-complete.vue | 2 +- src/components/avatar/avatar.vue | 2 +- src/components/button/button-group.vue | 2 +- src/components/button/button.vue | 2 +- src/components/cascader/cascader.vue | 4 ++-- src/components/checkbox/checkbox-group.vue | 2 +- src/components/checkbox/checkbox.vue | 2 +- src/components/color-picker/color-picker.vue | 4 ++-- src/components/date-picker/picker.vue | 4 ++-- src/components/dropdown/dropdown.vue | 2 +- src/components/input-number/input-number.vue | 2 +- src/components/input/input.vue | 2 +- src/components/modal/modal.vue | 2 +- src/components/page/page.vue | 2 +- src/components/poptip/poptip.vue | 2 +- src/components/radio/radio-group.vue | 2 +- src/components/radio/radio.vue | 2 +- src/components/select/select.vue | 4 ++-- src/components/spin/spin.vue | 2 +- src/components/switch/switch.vue | 2 +- src/components/table/table.vue | 2 +- src/components/tooltip/tooltip.vue | 2 +- 22 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/components/auto-complete/auto-complete.vue b/src/components/auto-complete/auto-complete.vue index 537152a..14a782a 100644 --- a/src/components/auto-complete/auto-complete.vue +++ b/src/components/auto-complete/auto-complete.vue @@ -75,7 +75,7 @@ return oneOf(value, ['small', 'large', 'default']); }, default () { - return this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; + return !this.$IVIEW || this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; } }, icon: { diff --git a/src/components/avatar/avatar.vue b/src/components/avatar/avatar.vue index a359484..5ba012f 100644 --- a/src/components/avatar/avatar.vue +++ b/src/components/avatar/avatar.vue @@ -26,7 +26,7 @@ return oneOf(value, ['small', 'large', 'default']); }, default () { - return this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; + return !this.$IVIEW || this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; } }, src: { diff --git a/src/components/button/button-group.vue b/src/components/button/button-group.vue index d1f5496..cde7065 100644 --- a/src/components/button/button-group.vue +++ b/src/components/button/button-group.vue @@ -16,7 +16,7 @@ return oneOf(value, ['small', 'large', 'default']); }, default () { - return this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; + return !this.$IVIEW || this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; } }, shape: { diff --git a/src/components/button/button.vue b/src/components/button/button.vue index 626ff7f..6001e60 100644 --- a/src/components/button/button.vue +++ b/src/components/button/button.vue @@ -51,7 +51,7 @@ return oneOf(value, ['small', 'large', 'default']); }, default () { - return this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; + return !this.$IVIEW || this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; } }, loading: Boolean, diff --git a/src/components/cascader/cascader.vue b/src/components/cascader/cascader.vue index 27b4220..9d1cf6b 100644 --- a/src/components/cascader/cascader.vue +++ b/src/components/cascader/cascader.vue @@ -100,7 +100,7 @@ return oneOf(value, ['small', 'large', 'default']); }, default () { - return this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; + return !this.$IVIEW || this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; } }, trigger: { @@ -132,7 +132,7 @@ transfer: { type: Boolean, default () { - return this.$IVIEW.transfer === '' ? false : this.$IVIEW.transfer; + return !this.$IVIEW || this.$IVIEW.transfer === '' ? false : this.$IVIEW.transfer; } }, name: { diff --git a/src/components/checkbox/checkbox-group.vue b/src/components/checkbox/checkbox-group.vue index 85ec8c3..f010d58 100644 --- a/src/components/checkbox/checkbox-group.vue +++ b/src/components/checkbox/checkbox-group.vue @@ -24,7 +24,7 @@ return oneOf(value, ['small', 'large', 'default']); }, default () { - return this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; + return !this.$IVIEW || this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; } } }, diff --git a/src/components/checkbox/checkbox.vue b/src/components/checkbox/checkbox.vue index 5ef45b4..6c3b120 100644 --- a/src/components/checkbox/checkbox.vue +++ b/src/components/checkbox/checkbox.vue @@ -65,7 +65,7 @@ return oneOf(value, ['small', 'large', 'default']); }, default () { - return this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; + return !this.$IVIEW || this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; } }, name: { diff --git a/src/components/color-picker/color-picker.vue b/src/components/color-picker/color-picker.vue index 9f6dab3..6a1ca9f 100644 --- a/src/components/color-picker/color-picker.vue +++ b/src/components/color-picker/color-picker.vue @@ -172,7 +172,7 @@ export default { return oneOf(value, ['small', 'large', 'default']); }, default () { - return this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; + return !this.$IVIEW || this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; } }, hideDropDown: { @@ -202,7 +202,7 @@ export default { transfer: { type: Boolean, default () { - return this.$IVIEW.transfer === '' ? false : this.$IVIEW.transfer; + return !this.$IVIEW || this.$IVIEW.transfer === '' ? false : this.$IVIEW.transfer; } }, name: { diff --git a/src/components/date-picker/picker.vue b/src/components/date-picker/picker.vue index b2d2e8f..4185546 100644 --- a/src/components/date-picker/picker.vue +++ b/src/components/date-picker/picker.vue @@ -173,7 +173,7 @@ return oneOf(value, ['small', 'large', 'default']); }, default () { - return this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; + return !this.$IVIEW || this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; } }, placeholder: { @@ -189,7 +189,7 @@ transfer: { type: Boolean, default () { - return this.$IVIEW.transfer === '' ? false : this.$IVIEW.transfer; + return !this.$IVIEW || this.$IVIEW.transfer === '' ? false : this.$IVIEW.transfer; } }, name: { diff --git a/src/components/dropdown/dropdown.vue b/src/components/dropdown/dropdown.vue index a476c15..3deca51 100644 --- a/src/components/dropdown/dropdown.vue +++ b/src/components/dropdown/dropdown.vue @@ -50,7 +50,7 @@ transfer: { type: Boolean, default () { - return this.$IVIEW.transfer === '' ? false : this.$IVIEW.transfer; + return !this.$IVIEW || this.$IVIEW.transfer === '' ? false : this.$IVIEW.transfer; } } }, diff --git a/src/components/input-number/input-number.vue b/src/components/input-number/input-number.vue index 957f689..7cd023d 100644 --- a/src/components/input-number/input-number.vue +++ b/src/components/input-number/input-number.vue @@ -91,7 +91,7 @@ return oneOf(value, ['small', 'large', 'default']); }, default () { - return this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; + return !this.$IVIEW || this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; } }, disabled: { diff --git a/src/components/input/input.vue b/src/components/input/input.vue index 79673eb..e7b3077 100644 --- a/src/components/input/input.vue +++ b/src/components/input/input.vue @@ -92,7 +92,7 @@ return oneOf(value, ['small', 'large', 'default']); }, default () { - return this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; + return !this.$IVIEW || this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; } }, placeholder: { diff --git a/src/components/modal/modal.vue b/src/components/modal/modal.vue index 678d125..b5fc106 100644 --- a/src/components/modal/modal.vue +++ b/src/components/modal/modal.vue @@ -100,7 +100,7 @@ transfer: { type: Boolean, default () { - return this.$IVIEW.transfer === '' ? true : this.$IVIEW.transfer; + return !this.$IVIEW || this.$IVIEW.transfer === '' ? true : this.$IVIEW.transfer; } }, fullscreen: { diff --git a/src/components/page/page.vue b/src/components/page/page.vue index f3d44c2..4031a05 100644 --- a/src/components/page/page.vue +++ b/src/components/page/page.vue @@ -107,7 +107,7 @@ transfer: { type: Boolean, default () { - return this.$IVIEW.transfer === '' ? false : this.$IVIEW.transfer; + return !this.$IVIEW || this.$IVIEW.transfer === '' ? false : this.$IVIEW.transfer; } }, size: { diff --git a/src/components/poptip/poptip.vue b/src/components/poptip/poptip.vue index a30076a..cc57fea 100644 --- a/src/components/poptip/poptip.vue +++ b/src/components/poptip/poptip.vue @@ -97,7 +97,7 @@ transfer: { type: Boolean, default () { - return this.$IVIEW.transfer === '' ? false : this.$IVIEW.transfer; + return !this.$IVIEW || this.$IVIEW.transfer === '' ? false : this.$IVIEW.transfer; } }, popperClass: { diff --git a/src/components/radio/radio-group.vue b/src/components/radio/radio-group.vue index 5c43cb7..e665eb1 100644 --- a/src/components/radio/radio-group.vue +++ b/src/components/radio/radio-group.vue @@ -26,7 +26,7 @@ return oneOf(value, ['small', 'large', 'default']); }, default () { - return this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; + return !this.$IVIEW || this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; } }, type: { diff --git a/src/components/radio/radio.vue b/src/components/radio/radio.vue index 8aa48d7..f855e42 100644 --- a/src/components/radio/radio.vue +++ b/src/components/radio/radio.vue @@ -48,7 +48,7 @@ return oneOf(value, ['small', 'large', 'default']); }, default () { - return this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; + return !this.$IVIEW || this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; } }, name: { diff --git a/src/components/select/select.vue b/src/components/select/select.vue index e9a7715..e4f800b 100644 --- a/src/components/select/select.vue +++ b/src/components/select/select.vue @@ -189,7 +189,7 @@ return oneOf(value, ['small', 'large', 'default']); }, default () { - return this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; + return !this.$IVIEW || this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; } }, labelInValue: { @@ -208,7 +208,7 @@ transfer: { type: Boolean, default () { - return this.$IVIEW.transfer === '' ? false : this.$IVIEW.transfer; + return !this.$IVIEW || this.$IVIEW.transfer === '' ? false : this.$IVIEW.transfer; } }, // Use for AutoComplete diff --git a/src/components/spin/spin.vue b/src/components/spin/spin.vue index 20dcc6b..377832d 100644 --- a/src/components/spin/spin.vue +++ b/src/components/spin/spin.vue @@ -23,7 +23,7 @@ return oneOf(value, ['small', 'large', 'default']); }, default () { - return this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; + return !this.$IVIEW || this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; } }, fix: { diff --git a/src/components/switch/switch.vue b/src/components/switch/switch.vue index c279a4f..9eb4c2a 100644 --- a/src/components/switch/switch.vue +++ b/src/components/switch/switch.vue @@ -43,7 +43,7 @@ return oneOf(value, ['large', 'small', 'default']); }, default () { - return this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; + return !this.$IVIEW || this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; } }, name: { diff --git a/src/components/table/table.vue b/src/components/table/table.vue index 57091c5..5a86321 100644 --- a/src/components/table/table.vue +++ b/src/components/table/table.vue @@ -132,7 +132,7 @@ return oneOf(value, ['small', 'large', 'default']); }, default () { - return this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; + return !this.$IVIEW || this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size; } }, width: { diff --git a/src/components/tooltip/tooltip.vue b/src/components/tooltip/tooltip.vue index 9223166..2b0fa51 100644 --- a/src/components/tooltip/tooltip.vue +++ b/src/components/tooltip/tooltip.vue @@ -61,7 +61,7 @@ transfer: { type: Boolean, default () { - return this.$IVIEW.transfer === '' ? false : this.$IVIEW.transfer; + return !this.$IVIEW || this.$IVIEW.transfer === '' ? false : this.$IVIEW.transfer; } }, theme: { -- libgit2 0.21.4