Files
EdgeAdmin/web/public/js/components/common/more-options-indicator.js

20 lines
561 B
JavaScript
Raw Normal View History

2020-07-22 22:19:39 +08:00
/**
* 更多选项
*/
Vue.component("more-options-indicator", {
data: function () {
return {
visible: false
2020-10-04 20:38:27 +08:00
}
2020-07-22 22:19:39 +08:00
},
methods: {
changeVisible: function () {
2020-10-04 20:38:27 +08:00
this.visible = !this.visible
2020-07-22 22:19:39 +08:00
if (Tea.Vue != null) {
2020-10-04 20:38:27 +08:00
Tea.Vue.moreOptionsVisible = this.visible
2020-07-22 22:19:39 +08:00
}
2020-10-04 20:38:27 +08:00
this.$emit("change", this.visible)
2020-07-22 22:19:39 +08:00
}
},
2020-09-29 11:28:39 +08:00
template: '<a href="" style="font-weight: normal" @click.prevent="changeVisible()"><span v-if="!visible">更多选项</span><span v-if="visible">收起选项</span> <i class="icon angle" :class="{down:!visible, up:visible}"></i> </a>'
2020-07-22 22:19:39 +08:00
});