mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
feat: 完成用户列表
This commit is contained in:
@ -241,7 +241,7 @@ getDataNames();
|
||||
@reset="resetSearchParams"
|
||||
@search="getDataByPage"
|
||||
/>
|
||||
<TableColumnCheckAlert v-model:columns="checkedRowKeys" />
|
||||
<TableRowCheckAlert v-model:checked-row-keys="checkedRowKeys" />
|
||||
<NCard title="代码生成" :bordered="false" size="small" class="sm:flex-1-hidden card-wrapper">
|
||||
<template #header-extra>
|
||||
<TableHeaderOperation
|
||||
|
@ -34,7 +34,7 @@ const { columns, data, getData, getDataByPage, loading, mobilePagination, search
|
||||
showTotal: true,
|
||||
apiParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 15,
|
||||
pageSize: 30,
|
||||
// if you want to use the searchParams in Form, you need to define the following properties, and the value is null
|
||||
// the value can not be undefined, otherwise the property in Form will not be reactive
|
||||
dataName: null,
|
||||
@ -102,7 +102,7 @@ watch(visible, () => {
|
||||
@reset="resetSearchParams"
|
||||
@search="getDataByPage"
|
||||
/>
|
||||
<TableColumnCheckAlert v-model:columns="checkedRowKeys" class="mb-16px" />
|
||||
<TableRowCheckAlert v-model:checked-row-keys="checkedRowKeys" class="mb-16px" />
|
||||
<NDataTable
|
||||
v-model:checked-row-keys="checkedRowKeys"
|
||||
:columns="columns"
|
||||
|
@ -1,6 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { useLoading } from '@sa/hooks';
|
||||
import { ref, watch } from 'vue';
|
||||
import { useClipboard } from '@vueuse/core';
|
||||
import { fetchGetGenPreview } from '@/service/api/tool';
|
||||
import MonacoEditor from '@/components/common/monaco-editor.vue';
|
||||
|
||||
@ -51,6 +52,24 @@ async function handleSubmit() {
|
||||
emit('submitted');
|
||||
}
|
||||
|
||||
const { copy, isSupported } = useClipboard();
|
||||
|
||||
async function handleCopyCode() {
|
||||
if (!isSupported) {
|
||||
window.$message?.error('您的浏览器不支持Clipboard API');
|
||||
return;
|
||||
}
|
||||
|
||||
const code = previewData.value[tab.value];
|
||||
|
||||
if (!previewData.value[tab.value]) {
|
||||
return;
|
||||
}
|
||||
|
||||
await copy(code);
|
||||
window.$message?.success('代码复制成功');
|
||||
}
|
||||
|
||||
watch(visible, () => {
|
||||
if (visible.value) {
|
||||
previewData.value = {};
|
||||
@ -117,6 +136,14 @@ function getGenLanguage(name: string) {
|
||||
:language="getGenLanguage(genMap[tab])"
|
||||
height="calc(100vh - 162px)"
|
||||
/>
|
||||
<div class="position-absolute right-42px top-2px">
|
||||
<NButton text :focusable="false" class="flex-center" @click="handleCopyCode">
|
||||
<template #icon>
|
||||
<icon-ep-copy-document class="text-14px" />
|
||||
</template>
|
||||
<span>复制</span>
|
||||
</NButton>
|
||||
</div>
|
||||
</div>
|
||||
</NSpin>
|
||||
<template #footer>
|
||||
|
Reference in New Issue
Block a user