| | |
| | | <el-table |
| | | :data="tableData" |
| | | style="width: 100%" |
| | | border |
| | | @selection-change="handleSelectionChange" |
| | | @cell-dblclick="copyText" |
| | | height="calc(100% - 1px)" |
| | | > |
| | | <el-table-column |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | copyText(row, column, cell, event) { |
| | | // 双击复制 |
| | | let save = function (e) { |
| | | e.clipboardData.setData('text/plain', event.target.innerText); |
| | | e.preventDefault(); //阻止默认行为 |
| | | } |
| | | document.addEventListener('copy', save);//添加一个copy事件 |
| | | document.execCommand("copy");//执行copy方法 |
| | | this.$message({ message: '复制成功', type: 'success' })//提示 |
| | | }, |
| | | setOptions() { |
| | | var std = []; |
| | | for (var i = 0; i < 21; i++) { |
| | |
| | | }, |
| | | //预览弹窗关闭 |
| | | handleClose() { |
| | | this.getTableData(); |
| | | this.dialogVisible = false; |
| | | this.showMapView = false; |
| | | |