导航组字段更新
parent
3145d6e281
commit
15b9f79e6b
|
|
@ -1,8 +1,8 @@
|
|||
interface nav_group {
|
||||
id: string;
|
||||
nav_image: uploadList[];
|
||||
img: uploadList[];
|
||||
title: string;
|
||||
title_link: object,
|
||||
link: object,
|
||||
}
|
||||
|
||||
interface nav_group_content {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<div ref="bannerImg" class="flex flex-wrap gap-x-10">
|
||||
<div v-for="(item1, index1) in item.split_list" :key="index1" class="item flex-col gap-10 align-c">
|
||||
<div v-if="['image_with_text', 'image'].includes(nav_style)" class="top-img flex align-c jc-c">
|
||||
<image-empty v-model="item1.nav_image[0]" :style="img_style"></image-empty>
|
||||
<image-empty v-model="item1.img[0]" :style="img_style"></image-empty>
|
||||
</div>
|
||||
<p v-if="['image_with_text', 'text'].includes(nav_style)" class="size-12 ma-0" :style="text_style">{{ item1.title }}</p>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -39,13 +39,13 @@
|
|||
<drag :data="form.nav_content_list" type="card" :space-col="27" @remove="remove" @on-sort="on_sort">
|
||||
<template #default="scoped">
|
||||
<div class="flex-row align-c jc-c">
|
||||
<upload v-model="scoped.row.nav_image" :limit="1" size="72"></upload>
|
||||
<upload v-model="scoped.row.img" :limit="1" size="72"></upload>
|
||||
<div class="flex-col align-c jc-c gap-20">
|
||||
<el-form-item label="标题" class="mb-0" label-width="50">
|
||||
<el-input v-model="scoped.row.title" placeholder="请输入标题" maxlength="4" show-word-limit></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="链接" class="w mb-0" label-width="50">
|
||||
<url-value v-model="scoped.row.title_link"></url-value>
|
||||
<url-value v-model="scoped.row.link"></url-value>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -71,27 +71,27 @@ const props = withDefaults(defineProps<Props>(),{
|
|||
nav_content_list: [
|
||||
{
|
||||
id: get_math(), // 唯一标识使用,避免使用index作为唯一标识导致渲染节点出现问题
|
||||
nav_image: [],
|
||||
img: [],
|
||||
title: '',
|
||||
title_link: {},
|
||||
link: {},
|
||||
},
|
||||
{
|
||||
id: get_math(), // 唯一标识使用,避免使用index作为唯一标识导致渲染节点出现问题
|
||||
nav_image: [],
|
||||
img: [],
|
||||
title: '',
|
||||
title_link: {},
|
||||
link: {},
|
||||
},
|
||||
{
|
||||
id: get_math(), // 唯一标识使用,避免使用index作为唯一标识导致渲染节点出现问题
|
||||
nav_image: [],
|
||||
img: [],
|
||||
title: '',
|
||||
title_link: {},
|
||||
link: {},
|
||||
},
|
||||
{
|
||||
id: get_math(), // 唯一标识使用,避免使用index作为唯一标识导致渲染节点出现问题
|
||||
nav_image: [],
|
||||
img: [],
|
||||
title: '',
|
||||
title_link: {},
|
||||
link: {},
|
||||
}
|
||||
]
|
||||
})
|
||||
|
|
@ -104,9 +104,9 @@ const { form } = toRefs(state);
|
|||
const add = () => {
|
||||
form.value.nav_content_list.push({
|
||||
id: get_math(),
|
||||
nav_image: [],
|
||||
img: [],
|
||||
title: '',
|
||||
title_link: {},
|
||||
link: {},
|
||||
});
|
||||
}
|
||||
const remove = (index: number) => {
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@ import { get_math } from '@/utils';
|
|||
import defaultCommon from './index';
|
||||
interface nav_group {
|
||||
id: string;
|
||||
nav_image: uploadList[];
|
||||
img: uploadList[];
|
||||
title: string;
|
||||
title_link: object;
|
||||
link: object;
|
||||
}
|
||||
interface defaultSearch {
|
||||
content: {
|
||||
|
|
@ -44,27 +44,27 @@ const defaultSearch: defaultSearch = {
|
|||
nav_content_list: [
|
||||
{
|
||||
id: get_math(), // 唯一标识使用,避免使用index作为唯一标识导致渲染节点出现问题
|
||||
nav_image: [],
|
||||
img: [],
|
||||
title: '测试标题',
|
||||
title_link: {},
|
||||
link: {},
|
||||
},
|
||||
{
|
||||
id: get_math(), // 唯一标识使用,避免使用index作为唯一标识导致渲染节点出现问题
|
||||
nav_image: [],
|
||||
img: [],
|
||||
title: '测试标题',
|
||||
title_link: {},
|
||||
link: {},
|
||||
},
|
||||
{
|
||||
id: get_math(), // 唯一标识使用,避免使用index作为唯一标识导致渲染节点出现问题
|
||||
nav_image: [],
|
||||
img: [],
|
||||
title: '测试标题',
|
||||
title_link: {},
|
||||
link: {},
|
||||
},
|
||||
{
|
||||
id: get_math(), // 唯一标识使用,避免使用index作为唯一标识导致渲染节点出现问题
|
||||
nav_image: [],
|
||||
img: [],
|
||||
title: '测试标题',
|
||||
title_link: {},
|
||||
link: {},
|
||||
},
|
||||
],
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue