优化:把网站设置、参数配置、域名管理放到概览页面
This commit is contained in:
@@ -34,8 +34,21 @@
|
||||
v-model:value="form.url"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item label="选择栏目" name="categoryId">
|
||||
<a-tree-select
|
||||
allow-clear
|
||||
:tree-data="navigationList"
|
||||
tree-default-expand-all
|
||||
placeholder="请选择栏目"
|
||||
:value="form.categoryId || undefined"
|
||||
:dropdown-style="{ maxHeight: '360px', overflow: 'auto' }"
|
||||
@update:value="(value?: number) => (form.categoryId = value)"
|
||||
@change="onCategoryId"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item label="类型" name="linkType">
|
||||
<a-select
|
||||
allow-clear
|
||||
optionFilterProp="label"
|
||||
placeholder="请选择链接类型"
|
||||
:options="linkType"
|
||||
@@ -88,11 +101,11 @@
|
||||
import useFormData from '@/utils/use-form-data';
|
||||
import { addLink, updateLink } from '@/api/cms/link';
|
||||
import type { Link } from '@/api/cms/link/model';
|
||||
import { urlReg } from 'ele-admin-pro';
|
||||
import { ItemType } from 'ele-admin-pro/es/ele-image-upload/types';
|
||||
import { uploadFile } from '@/api/system/file';
|
||||
import { getDictionaryOptions } from '@/utils/common';
|
||||
import { FileRecord } from '@/api/system/file/model';
|
||||
import { Navigation } from '@/api/cms/navigation/model';
|
||||
|
||||
// 是否开启响应式布局
|
||||
const themeStore = useThemeStore();
|
||||
@@ -108,6 +121,7 @@
|
||||
visible: boolean;
|
||||
// 修改回显的数据
|
||||
data?: Link | null;
|
||||
navigationList?: Navigation[];
|
||||
}>();
|
||||
|
||||
//
|
||||
@@ -128,6 +142,7 @@
|
||||
url: '',
|
||||
sortNumber: 100,
|
||||
linkType: undefined,
|
||||
categoryId: undefined,
|
||||
comments: undefined
|
||||
});
|
||||
|
||||
@@ -140,13 +155,6 @@
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
linkType: [
|
||||
{
|
||||
required: true,
|
||||
type: 'string',
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
url: [
|
||||
{
|
||||
required: true,
|
||||
@@ -203,6 +211,11 @@
|
||||
form.icon = '';
|
||||
};
|
||||
|
||||
// 选择栏目
|
||||
const onCategoryId = (id: number) => {
|
||||
form.categoryId = id;
|
||||
};
|
||||
|
||||
/* 保存编辑 */
|
||||
const save = () => {
|
||||
if (!formRef.value) {
|
||||
|
||||
Reference in New Issue
Block a user