优化<more-options-indicator>组件

This commit is contained in:
刘祥超
2022-12-10 15:57:39 +08:00
parent 37ff2b886a
commit aa01512f89

View File

@@ -2,6 +2,7 @@
* 更多选项
*/
Vue.component("more-options-indicator", {
props:[],
data: function () {
return {
visible: false
@@ -14,6 +15,7 @@ Vue.component("more-options-indicator", {
Tea.Vue.moreOptionsVisible = this.visible
}
this.$emit("change", this.visible)
this.$emit("input", this.visible)
}
},
template: '<a href="" style="font-weight: normal" @click.prevent="changeVisible()"><slot><span v-if="!visible">更多选项</span><span v-if="visible">收起选项</span></slot> <i class="icon angle" :class="{down:!visible, up:visible}"></i> </a>'