diff --git a/src/components/tabs/tabs.vue b/src/components/tabs/tabs.vue index ced16e0..26f3d9a 100644 --- a/src/components/tabs/tabs.vue +++ b/src/components/tabs/tabs.vue @@ -19,7 +19,7 @@ - + @@ -169,6 +169,41 @@ } return style; + }, + // 3.4.0, global setting customArrow 有值时,arrow 赋值空 + arrowType () { + let type = 'ios-close'; + + if (this.$IVIEW) { + if (this.$IVIEW.tabs.customCloseIcon) { + type = ''; + } else if (this.$IVIEW.tabs.closeIcon) { + type = this.$IVIEW.tabs.closeIcon; + } + } + return type; + }, + // 3.4.0, global setting + customArrowType () { + let type = ''; + + if (this.$IVIEW) { + if (this.$IVIEW.tabs.customCloseIcon) { + type = this.$IVIEW.tabs.customCloseIcon; + } + } + return type; + }, + // 3.4.0, global setting + arrowSize () { + let size = ''; + + if (this.$IVIEW) { + if (this.$IVIEW.tabs.closeIconSize) { + size = this.$IVIEW.tabs.closeIconSize; + } + } + return size; } }, methods: { diff --git a/src/index.js b/src/index.js index 9d9515c..aa3578f 100644 --- a/src/index.js +++ b/src/index.js @@ -211,6 +211,11 @@ const install = function(Vue, opts = {}) { icon: opts.timePicker ? opts.timePicker.icon ? opts.timePicker.icon : '' : '', customIcon: opts.timePicker ? opts.timePicker.customIcon ? opts.timePicker.customIcon : '' : '', iconSize: opts.timePicker ? opts.timePicker.iconSize ? opts.timePicker.iconSize : '' : '' + }, + tabs: { + closeIcon: opts.tabs ? opts.tabs.closeIcon ? opts.tabs.closeIcon : '' : '', + customCloseIcon: opts.tabs ? opts.tabs.customCloseIcon ? opts.tabs.customCloseIcon : '' : '', + closeIconSize: opts.tabs ? opts.tabs.closeIconSize ? opts.tabs.closeIconSize : '' : '' } }; diff --git a/src/styles/components/tabs.less b/src/styles/components/tabs.less index 9d7c01c..1db748e 100644 --- a/src/styles/components/tabs.less +++ b/src/styles/components/tabs.less @@ -203,7 +203,7 @@ &&-card > &-bar &-nav-wrap { margin-bottom: 0; } - &&-card > &-bar &-tab .@{css-prefix-iconfont}-ios-close { + &&-card > &-bar &-tab &-close { width: 0; height: 22px; font-size: 22px; @@ -221,8 +221,8 @@ } } - &&-card > &-bar &-tab-active .@{css-prefix-iconfont}-ios-close, - &&-card > &-bar &-tab:hover .@{css-prefix-iconfont}-ios-close { + &&-card > &-bar &-tab-active &-close, + &&-card > &-bar &-tab:hover &-close { width: 22px; transform: translateZ(0); margin-right: -6px; -- libgit2 0.21.4