diff --git a/src/components/scContextmenu/index.vue b/src/components/scContextmenu/index.vue index 9490833d..8e1c8f02 100644 --- a/src/components/scContextmenu/index.vue +++ b/src/components/scContextmenu/index.vue @@ -5,7 +5,7 @@ * @Date: 2021年7月23日09:25:57 * @LastEditors: * @LastEditTime: - * @other: 代码完全开源,欢迎拿来主义,也欢迎PR + * @other: 代码完全开源,欢迎参考,也欢迎PR --> @@ -57,7 +65,7 @@ }, data() { return { - row: {}, + row: null, tableData: [ { id: '1', @@ -90,14 +98,18 @@ this.$refs.contextmenu.openMenu(event) }, openMenu(e){ + this.row = null this.$refs.contextmenu.openMenu(e) }, handleCommand(command){ this.$message('click on item ' + command) + if(command == 'e'){ + this.row.state = 1 + } }, visibleChange(visible){ if(!visible){ - this.row = {} + this.$refs.table.setCurrentRow(); } } }