feat: 增加复制组件,解决 useClipboard 兼容性问题

This commit is contained in:
diamont1001
2024-07-01 16:54:59 +08:00
parent 02637f71fa
commit fd86dc3ca7
5 changed files with 107 additions and 46 deletions

View File

@@ -82,7 +82,14 @@ const contentConfig: IContentConfig<UserPageQuery> = {
});
},
},
{ label: "手机号码", align: "center", prop: "mobile", width: 120 },
{
label: "手机号码",
align: "center",
prop: "mobile",
templet: "custom",
slotName: "mobile",
width: 150,
},
{
label: "状态",
align: "center",

View File

@@ -40,6 +40,14 @@
{{ scope.row[scope.prop] == 1 ? "启用" : "禁用" }}
</el-tag>
</template>
<template #mobile="scope">
<el-text> {{ scope.row[scope.prop] }} </el-text>
<copy-button
v-if="scope.row[scope.prop]"
:text="scope.row[scope.prop]"
style="margin-left: 2px"
/>
</template>
</page-content>
<!-- 新增 -->