update Select style with filterable & prefix

This commit is contained in:
梁灏 2019-04-09 11:42:07 +08:00
parent 90399f8494
commit 9013c49d7c
3 changed files with 26 additions and 4 deletions

View file

@ -1,5 +1,5 @@
<template>
<div @click="onHeaderClick">
<div @click="onHeaderClick" :class="headCls">
<span :class="[prefixCls + '-prefix']" v-if="$slots.prefix || prefix">
<slot name="prefix">
<Icon :type="prefix" v-if="prefix" />
@ -168,6 +168,12 @@
},
selectedMultiple(){
return this.multiple ? this.values : [];
},
// 使 prefix filterable
headCls () {
return {
[`${prefixCls}-head-flex`]: this.filterable && (this.$slots.prefix || this.prefix)
};
}
},
methods: {