This commit is contained in:
@@ -18,7 +18,14 @@
|
||||
</vab-query-form>
|
||||
|
||||
<el-table v-loading="listLoading" :data="list" :element-loading-text="elementLoadingText">
|
||||
<el-table-column align="center" label="ID" prop="id" show-overflow-tooltip />
|
||||
<el-table-column align="center" label="ID" prop="id" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
<span style="cursor: pointer" @click="handleCopyId(row.id)">
|
||||
<i class="el-icon-copy-document" />
|
||||
{{ row.id }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" label="排序" prop="sort" show-overflow-tooltip />
|
||||
|
||||
@@ -95,6 +102,15 @@
|
||||
clearTimeout(this.timeOutID)
|
||||
},
|
||||
methods: {
|
||||
handleCopyId(text) {
|
||||
const input = document.createElement('input')
|
||||
input.value = text
|
||||
document.body.appendChild(input)
|
||||
input.select()
|
||||
document.execCommand('copy')
|
||||
document.body.removeChild(input)
|
||||
this.$baseMessage('复制成功', 'success')
|
||||
},
|
||||
setSelectRows(val) {
|
||||
this.selectRows = val
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user