优化<more-options-indicator>组件

This commit is contained in:
GoEdgeLab
2022-12-10 15:57:39 +08:00
parent 204ff17c5d
commit a21e6b0845

View File

@@ -2,6 +2,7 @@
* 更多选项 * 更多选项
*/ */
Vue.component("more-options-indicator", { Vue.component("more-options-indicator", {
props:[],
data: function () { data: function () {
return { return {
visible: false visible: false
@@ -14,6 +15,7 @@ Vue.component("more-options-indicator", {
Tea.Vue.moreOptionsVisible = this.visible Tea.Vue.moreOptionsVisible = this.visible
} }
this.$emit("change", 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>' 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>'