优化修复网站导航的bug

This commit is contained in:
2024-08-28 23:55:01 +08:00
parent 31ec8e057a
commit 2655874948
34 changed files with 1764 additions and 849 deletions
+40 -7
View File
@@ -9,6 +9,7 @@
:columns="columns"
:datasource="datasource"
:customRow="customRow"
:need-page="false"
tool-class="ele-toolbar-form"
class="sys-org-table"
>
@@ -17,8 +18,12 @@
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'name'">
<div class="ele-text-heading">{{ record.name }}</div>
<span class="ele-text-placeholder">{{ record.comments }}</span>
<div
class="ele-text-heading"
@click="copyText(`config.${record.name}`)"
>{{ record.name }}</div
>
<!-- <span class="ele-text-placeholder">{{ record.comments }}</span>-->
</template>
<template v-if="column.key === 'value'">
<a-image
@@ -26,7 +31,15 @@
:src="record.value"
:width="120"
/>
<span v-else>{{ record.value }}</span>
<div v-else>{{ record.value }}</div>
</template>
<template v-if="column.key === 'comments'">
<a-popover>
<template #content>
{{ record.comments }}
</template>
<ExclamationCircleOutlined />
</a-popover>
</template>
<template v-if="column.key === 'action'">
<a @click="copyText('{{ config.' + record.name + ' }}')">调用</a>
@@ -66,6 +79,7 @@
<script lang="ts" setup>
import { ref, watch } from 'vue';
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
import { message } from 'ant-design-vue';
import type { EleProTable } from 'ele-admin-pro';
import type { DatasourceFunction } from 'ele-admin-pro/es/ele-pro-table/types';
@@ -77,6 +91,7 @@
WebsiteFieldParam
} from '@/api/cms/website/field/model';
import {
listWebsiteField,
pageWebsiteField,
removeWebsiteField,
undeleteWebsiteField,
@@ -100,7 +115,7 @@
// 表格数据源
const datasource: DatasourceFunction = ({ page, limit, where, orders }) => {
// 搜索条件
return pageWebsiteField({
return listWebsiteField({
...where,
...orders,
page,
@@ -111,14 +126,32 @@
// 表格列配置
const columns = ref<any[]>([
{
title: '键',
title: '参数名',
dataIndex: 'name',
width: 180,
key: 'name'
},
{
title: '值',
title: '描述',
dataIndex: 'comments',
key: 'comments',
width: 120,
align: 'center'
},
{
title: '配置值',
dataIndex: 'value',
key: 'value'
key: 'value',
width: 400,
ellipsis: true
},
{
title: '默认值',
dataIndex: 'defaultValue'
},
{
title: '可设置范围',
dataIndex: 'modifyRange'
},
{
title: '排序',