Compare commits
2 Commits
4e7c695ab0
...
98b3e716bb
| Author | SHA1 | Date |
|---|---|---|
|
|
98b3e716bb | |
|
|
543b39d44f |
|
|
@ -5,6 +5,9 @@
|
|||
<!-- <a-button type="primary" @click="handleAdd">新增</a-button> -->
|
||||
</template>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'shpPath'">
|
||||
<div @click="copyToClipboard(record.shpPath)">{{record.shpPath}}</div>
|
||||
</template>
|
||||
<template v-if="column.key === 'action'">
|
||||
<TableAction
|
||||
:actions="[
|
||||
|
|
@ -44,7 +47,8 @@
|
|||
import { searchFormSchema, achievementColumns } from './index.data';
|
||||
// api
|
||||
import { loadTableListData } from '@/api/achievement/index';
|
||||
|
||||
import { useMessage } from '@/hooks/web/useMessage';
|
||||
const { createMessage } = useMessage();
|
||||
|
||||
const modalForm = ref();
|
||||
let openModal = ref(false);
|
||||
|
|
@ -108,6 +112,15 @@
|
|||
clearSelectedRowKeys();
|
||||
reload();
|
||||
}
|
||||
// 复制到剪贴板
|
||||
const copyToClipboard = async (record) => {
|
||||
try {
|
||||
await navigator.clipboard.writeText(record);
|
||||
createMessage.success('文本已复制到剪贴板');
|
||||
} catch (err) {
|
||||
createMessage.error('无法复制文本');
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.categories-modal {
|
||||
|
|
|
|||
|
|
@ -5,6 +5,9 @@
|
|||
<!-- <a-button type="primary" @click="handleAdd">新增</a-button> -->
|
||||
</template>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'tifPath'">
|
||||
<div @click="copyToClipboard(record.tifPath)">{{record.tifPath}}</div>
|
||||
</template>
|
||||
<template v-if="column.key === 'action'">
|
||||
<TableAction
|
||||
:actions="[
|
||||
|
|
@ -44,7 +47,8 @@
|
|||
import { searchFormSchema, achievementColumns } from './index.data';
|
||||
// api
|
||||
import { loadTifTableListData } from '@/api/achievement/index';
|
||||
|
||||
import { useMessage } from '@/hooks/web/useMessage';
|
||||
const { createMessage } = useMessage();
|
||||
|
||||
const modalForm = ref();
|
||||
let openModal = ref(false);
|
||||
|
|
@ -108,6 +112,15 @@
|
|||
clearSelectedRowKeys();
|
||||
reload();
|
||||
}
|
||||
// 复制到剪贴板
|
||||
const copyToClipboard = async (record) => {
|
||||
try {
|
||||
await navigator.clipboard.writeText(record);
|
||||
createMessage.success('文本已复制到剪贴板');
|
||||
} catch (err) {
|
||||
createMessage.error('无法复制文本');
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.categories-modal {
|
||||
|
|
|
|||
Loading…
Reference in New Issue