From 47afd12e3fb854d8f796575911351f6738d57ebc Mon Sep 17 00:00:00 2001 From: 梁灏 Date: Wed, 10 Apr 2019 11:09:45 +0800 Subject: [PATCH] Cascader add gloabl setting, #5592 , close #5597 --- src/components/cascader/cascader.vue | 37 ++++++++++++++++++++++++++++++++++++- src/components/cascader/casitem.vue | 40 +++++++++++++++++++++++++++++++++++++++- src/index.js | 8 ++++++++ src/styles/components/cascader.less | 5 +++-- 4 files changed, 86 insertions(+), 4 deletions(-) diff --git a/src/components/cascader/cascader.vue b/src/components/cascader/cascader.vue index b3edb8d..e088ec7 100644 --- a/src/components/cascader/cascader.vue +++ b/src/components/cascader/cascader.vue @@ -17,7 +17,7 @@ v-show="filterable && query === ''" @click="handleFocus">{{ displayRender }} - + @@ -232,6 +232,41 @@ return item; }); return selections; + }, + // 3.4.0, global setting customArrow 有值时,arrow 赋值空 + arrowType () { + let type = 'ios-arrow-down'; + + if (this.$IVIEW) { + if (this.$IVIEW.cascader.customArrow) { + type = ''; + } else if (this.$IVIEW.cascader.arrow) { + type = this.$IVIEW.cascader.arrow; + } + } + return type; + }, + // 3.4.0, global setting + customArrowType () { + let type = ''; + + if (this.$IVIEW) { + if (this.$IVIEW.cascader.customArrow) { + type = this.$IVIEW.cascader.customArrow; + } + } + return type; + }, + // 3.4.0, global setting + arrowSize () { + let size = ''; + + if (this.$IVIEW) { + if (this.$IVIEW.cascader.arrowSize) { + size = this.$IVIEW.cascader.arrowSize; + } + } + return size; } }, methods: { diff --git a/src/components/cascader/casitem.vue b/src/components/cascader/casitem.vue index 7434f1b..9d761b7 100644 --- a/src/components/cascader/casitem.vue +++ b/src/components/cascader/casitem.vue @@ -1,13 +1,16 @@