AnalysisSystemForRadionucli.../src/components/CustomSelect/index.vue

41 lines
733 B
Vue

<template>
<a-select v-bind="$attrs" v-model="innerValue" show-arrow>
<img slot="suffixIcon" src="@/assets/images/global/select-down.png" alt="" />
</a-select>
</template>
<script>
export default {
props: {
value: {
type: [String, Number, Array],
}
},
data() {
return {
innerValue: this.value
}
},
watch: {
value () {
this.innerValue = this.value
},
innerValue () {
this.$emit('input', this.innerValue)
}
}
}
</script>
<style lang="less" scoped>
.ant-select {
.ant-select-arrow-icon {
transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}
&-open {
.ant-select-arrow-icon {
transform: rotate(180deg);
}
}
}
</style>