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

18 lines
476 B
JavaScript
Raw Normal View History

2020-09-26 11:21:52 +08:00
Vue.component("more-options-tbody", {
data: function () {
return {
isVisible: false
}
},
methods: {
show: function () {
this.isVisible = !this.isVisible
this.$emit("change", this.isVisible)
}
},
template: `<tbody>
<tr>
<td colspan="2"><a href="" @click.prevent="show()"><span v-if="!isVisible">更多选项</span><span v-if="isVisible"></span><i class="icon angle" :class="{down:!isVisible, up:isVisible}"></i></a></td>
</tr>
</tbody>`
})