Commit 1ef0ce76 by 袁成

fix: 图标样式

parent 775d570e
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
<div class="rbc-basedata"> <div class="rbc-basedata">
<el-popover trigger="manual" v-model="dataListShow" :visible-arrow="false" :width="searchPopperMinWidth"> <el-popover trigger="manual" v-model="dataListShow" :visible-arrow="false" :width="searchPopperMinWidth">
<div class="select-box" slot="reference"> <div class="select-box" slot="reference">
<Icon type="ios-close-circle" :class="{'clear-tree-icon': true, 'hidden-icon': disabled || readonly || !selectValue }" @click="clearList" />
<Input ref="searchInput" v-model="selectValue" :disabled="disabled" :readonly="readonly || multiple" :class="{'multiple-input': multiple && !readonly}" placeholder="" @on-change="handleChange" @on-focus="handleFocus" @on-blur="handleBlur" @keydown.down.native="handleSelectNext" @keydown.up.native="handleSelectPrev" @keydown.enter.native="handleSelected"> <Input ref="searchInput" v-model="selectValue" :disabled="disabled" :readonly="readonly || multiple" :class="{'multiple-input': multiple && !readonly}" placeholder="" @on-change="handleChange" @on-focus="handleFocus" @on-blur="handleBlur" @keydown.down.native="handleSelectNext" @keydown.up.native="handleSelectPrev" @keydown.enter.native="handleSelected">
<Icon type="ios-close-circle" :class="{'clear-icon': true, 'hidden-icon': disabled || readonly || !selectValue }" slot="suffix" @click="clearList" />
<Icon type="ios-more" class="more-select" slot="suffix" @click="handleInputSelect" /> <Icon type="ios-more" class="more-select" slot="suffix" @click="handleInputSelect" />
</Input> </Input>
</div> </div>
...@@ -106,7 +106,6 @@ export default { ...@@ -106,7 +106,6 @@ export default {
mounted () { mounted () {
addResizeListener(this.$el, this.handleResize) addResizeListener(this.$el, this.handleResize)
}, },
methods: { methods: {
handleResize () { handleResize () {
this.searchPopperMinWidth = this.$el.getBoundingClientRect().width this.searchPopperMinWidth = this.$el.getBoundingClientRect().width
...@@ -334,30 +333,23 @@ export default { ...@@ -334,30 +333,23 @@ export default {
<style lang="less" scoped> <style lang="less" scoped>
.select-box { .select-box {
position: relative; position: relative;
.clear-icon {
display: none;
}
/deep/ .ivu-input-suffix { /deep/ .ivu-input-suffix {
z-index: 999; z-index: 999;
i {
position: relative;
top: 50%;
transform: translate(0, -50%);
} }
} }
.select-box .clear-tree-icon {
position: absolute;
color: #808695;
font-size: 16px;
width: 14px;
height: 14px;
top: 0;
bottom: 0;
right: 26px;
margin: auto 0;
z-index: 999;
display: none;
background-color: #fff;
} }
.select-box:hover {
.select-box:hover .clear-tree-icon { .clear-icon {
display: inline-block; display: inline-block;
} }
}
.select-box:hover .hidden-icon, .select-box:hover .hidden-icon,
.select-box .hidden-icon { .select-box .hidden-icon {
display: none; display: none;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment