|
@@ -4,6 +4,7 @@
|
|
|
@register="register"
|
|
|
title="更换记录"
|
|
|
:width="800"
|
|
|
+ @ok="closeModal"
|
|
|
@visible-change="handleVisibleChange"
|
|
|
>
|
|
|
<BasicTable @register="registerSubtable">
|
|
@@ -28,6 +29,7 @@
|
|
|
import { DetailsApi, IncrementDelayApi } from '/@/api/account';
|
|
|
import { usePermissionStore } from '/@/store/modules/permission';
|
|
|
import { useModal } from '/@/components/Modal';
|
|
|
+ import { copyTextToClipboard } from '/@/hooks/web/useCopyToClipboard';
|
|
|
|
|
|
const { t } = useI18n();
|
|
|
export default defineComponent({
|
|
@@ -65,6 +67,7 @@
|
|
|
{
|
|
|
title: '更换Key',
|
|
|
dataIndex: 'updateAuthorizeKey',
|
|
|
+ ellipsis: true,
|
|
|
slots: { customRender: 'copy' },
|
|
|
width: 150,
|
|
|
},
|
|
@@ -120,12 +123,7 @@
|
|
|
emit('update');
|
|
|
};
|
|
|
function handleCopy(str: string) {
|
|
|
- let save = function (e) {
|
|
|
- e.clipboardData.setData('text/plain', str);
|
|
|
- e.preventDefault(); //阻止默认行为
|
|
|
- };
|
|
|
- document.addEventListener('copy', save); //添加一个copy事件
|
|
|
- document.execCommand('copy'); //执行copy方法
|
|
|
+ copyTextToClipboard(str)
|
|
|
createMessage.success('复制成功');
|
|
|
}
|
|
|
function handleVisibleChange(v) {
|
|
@@ -141,6 +139,7 @@
|
|
|
addListFunc,
|
|
|
registerSubtable,
|
|
|
reload,
|
|
|
+ closeModal,
|
|
|
handleDelete,
|
|
|
t,
|
|
|
};
|