修改字段显示

v1.0.0
于肖磊 2024-09-05 14:36:23 +08:00
parent 1cf30ef30b
commit 3f551363b4
8 changed files with 26 additions and 26 deletions

View File

@ -27,11 +27,11 @@
<div class="w">
<el-form-item label="图标" label-width="45">
<div class="flex-col jc-c align-c mr-12">
<upload v-model="row.src" :limit="1" :size="44" :styles="1"></upload>
<upload v-model="row.img" :limit="1" :size="44" :styles="1"></upload>
<text class="cr-9 size-12">未选中</text>
</div>
<div class="flex-col jc-c align-c">
<upload v-model="row.src_checked" :limit="1" :size="44" :styles="1"></upload>
<upload v-model="row.img_checked" :limit="1" :size="44" :styles="1"></upload>
<text class="cr-9 size-12">选中</text>
</div>
</el-form-item>
@ -39,7 +39,7 @@
<el-input v-model="row.name" placeholder="请输入名称" clearable />
</el-form-item>
<el-form-item label="链接" label-width="45">
<url-value v-model="row.href"></url-value>
<url-value v-model="row.link"></url-value>
</el-form-item>
</div>
</template>
@ -78,7 +78,7 @@ const add = () => {
name: '',
src: [],
src_checked: [],
href: {},
link: {},
});
};
</script>

View File

@ -5,10 +5,10 @@
<li v-for="(item, index) in nav_content" :key="index" class="flex-1 flex-col jc-c align-c gap-5" @mouseenter="is_hover = index" @mouseleave="is_hover = 0">
<div v-if="footerData.content.nav_style !== '2'" class="img re">
<div class="img-item abs radius-xs animate-linear w" :class="is_hover != index ? 'active' : ''">
<image-empty v-model="item.src[0]" error-img-style="width:1.5rem;height:1.5rem;"></image-empty>
<image-empty v-model="item.img[0]" error-img-style="width:1.5rem;height:1.5rem;"></image-empty>
</div>
<div class="img-item abs radius-xs animate-linear w" :class="is_hover == index ? 'active' : ''">
<image-empty v-model="item.src_checked[0]" error-img-style="width:1.5rem;height:1.5rem;"></image-empty>
<image-empty v-model="item.img_checked[0]" error-img-style="width:1.5rem;height:1.5rem;"></image-empty>
</div>
</div>
<span v-if="footerData.content.nav_style !== '1'" class="animate-linear size-12 re z-i" :style="is_hover == index ? text_color_checked : default_text_color">{{ item.name }}</span>
@ -47,16 +47,16 @@ watch(
const clone_nav_content = cloneDeep(new_content.nav_content);
nav_content.value =
clone_nav_content.map((item: any) => {
item.src = item.src.map((img: any) => {
item.img = item.img.map((img: any) => {
return {
...img,
url: item.src.includes('/') ? img.url : url + img.url,
url: item.img.includes('/') ? img.url : url + img.url,
};
});
item.src_checked = item.src_checked.map((img: any) => {
item.img_checked = item.img_checked.map((img: any) => {
return {
...img,
url: item.src_checked.includes('/') ? img.url : url + img.url,
url: item.img_checked.includes('/') ? img.url : url + img.url,
};
});
return item;

View File

@ -5,10 +5,10 @@
<li v-for="(item, index) in footerData?.content?.nav_content" :key="index" class="flex-1 flex-col jc-c align-c gap-5" @mouseenter="is_hover = index" @mouseleave="is_hover = 0">
<div v-if="footerData.content.nav_style !== '2'" class="img re">
<div class="img-item abs radius-xs animate-linear w" :class="is_hover != index ? 'active' : ''">
<image-empty v-model="item.src[0]" error-img-style="width:1.5rem;height:1.5rem;"></image-empty>
<image-empty v-model="item.img[0]" error-img-style="width:1.5rem;height:1.5rem;"></image-empty>
</div>
<div class="img-item abs radius-xs animate-linear w" :class="is_hover == index ? 'active' : ''">
<image-empty v-model="item.src_checked[0]" error-img-style="width:1.5rem;height:1.5rem;"></image-empty>
<image-empty v-model="item.img_checked[0]" error-img-style="width:1.5rem;height:1.5rem;"></image-empty>
</div>
</div>
<span v-if="footerData.content.nav_style !== '1'" class="animate-linear size-12 re z-i" :style="is_hover == index ? text_color_checked : default_text_color">{{ item.name }}</span>

View File

@ -38,7 +38,7 @@ const visibleDialog = ref(false);
const rich_upload_type = ref('img');
//
interface InsertFnType {
(url: string, alt?: string, href?: string): void;
(url: string, alt?: string, link?: string): void;
}
const editor_config = ref({
placeholder: '请输入内容...',

View File

@ -48,12 +48,12 @@ interface icon_params {
id: string;
src: uploadList[];
icon: string;
href: string;
link: string;
}
const user_info = ref<string[]>(['1', '2', '3', '4']);
const icon_setting = ref<icon_params[]>([
{ id: '1', src: [], icon: '', href: 'a' },
{ id: '2', src: [], icon: '', href: 'a' },
{ id: '1', src: [], icon: '', link: 'a' },
{ id: '2', src: [], icon: '', link: 'a' },
]);
const base_data = reactive({
//

View File

@ -17,7 +17,7 @@
<drag :data="form.icon_setting" :space-col="20" @remove="icon_setting_remove" @on-sort="icon_setting_sort">
<template #default="{ row }">
<upload v-model="row.src" v-model:icon-value="row.icon" is-icon type="img" :limit="1" :styles="2" :size="30"></upload>
<url-value v-model="row.href"></url-value>
<url-value v-model="row.link"></url-value>
</template>
</drag>
<el-button class="mtb-20 w" @click="add">+</el-button>
@ -54,7 +54,7 @@ const add = () => {
id: get_math(),
src: [],
icon: '',
href: {},
link: {},
});
emit('update:value', form);
};

View File

@ -5,7 +5,7 @@ interface DefaultFooterNav {
content: {
nav_style: string;
nav_type: string;
nav_content: { id: string; name: string; src: uploadList[]; src_checked: uploadList[]; href: object }[];
nav_content: { id: string; name: string; img: uploadList[]; img_checked: uploadList[]; link: object }[];
};
style: {
text_color_checked: string;
@ -18,10 +18,10 @@ const defaultFooterNav = ref<DefaultFooterNav>({
nav_style: '0',
nav_type: '0',
nav_content: [
{ id: '1', name: '首页', src: [{ id: 1, url: new_url + 'home.png', original: '头像1', title: '头像1', ext: '.png', type: 'img' }], src_checked: [{ id: 1, url: new_url + 'active/home.png', original: '头像1', title: '头像1', ext: '.png', type: 'img' }], href: {} },
{ id: '2', name: '分类', src: [{ id: 1, url: new_url + 'category.png', original: '头像1', title: '头像1', ext: '.png', type: 'img' }], src_checked: [{ id: 1, url: new_url + 'active/category.png', original: '头像1', title: '头像1', ext: '.png', type: 'img' }], href: {} },
{ id: '3', name: '购物车', src: [{ id: 1, url: new_url + 'cart.png', original: '头像1', title: '头像1', ext: '.png', type: 'img' }], src_checked: [{ id: 1, url: new_url + 'active/cart.png', original: '头像1', title: '头像1', ext: '.png', type: 'img' }], href: {} },
{ id: '4', name: '我的', src: [{ id: 1, url: new_url + 'user.png', original: '头像1', title: '头像1', ext: '.png', type: 'img' }], src_checked: [{ id: 1, url: new_url + 'active/user.png', original: '头像1', title: '头像1', ext: '.png', type: 'img' }], href: {} },
{ id: '1', name: '首页', img: [{ id: 1, url: new_url + 'home.png', original: '头像1', title: '头像1', ext: '.png', type: 'img' }], img_checked: [{ id: 1, url: new_url + 'active/home.png', original: '头像1', title: '头像1', ext: '.png', type: 'img' }], link: {} },
{ id: '2', name: '分类', img: [{ id: 1, url: new_url + 'category.png', original: '头像1', title: '头像1', ext: '.png', type: 'img' }], img_checked: [{ id: 1, url: new_url + 'active/category.png', original: '头像1', title: '头像1', ext: '.png', type: 'img' }], link: {} },
{ id: '3', name: '购物车', img: [{ id: 1, url: new_url + 'cart.png', original: '头像1', title: '头像1', ext: '.png', type: 'img' }], img_checked: [{ id: 1, url: new_url + 'active/cart.png', original: '头像1', title: '头像1', ext: '.png', type: 'img' }], link: {} },
{ id: '4', name: '我的', img: [{ id: 1, url: new_url + 'user.png', original: '头像1', title: '头像1', ext: '.png', type: 'img' }], img_checked: [{ id: 1, url: new_url + 'active/user.png', original: '头像1', title: '头像1', ext: '.png', type: 'img' }], link: {} },
],
},
style: {

View File

@ -2,7 +2,7 @@ import defaultCommon from './index';
interface DefaultUserInfo {
content: {
user_info: string[];
icon_setting: { id: string; src: uploadList[]; href: object; icon: string }[];
icon_setting: { id: string; src: uploadList[]; link: object; icon: string }[];
};
style: {
user_avatar_size: string;
@ -29,8 +29,8 @@ const defaultUserInfo: DefaultUserInfo = {
content: {
user_info: ['1', '2', '3', '4', '5'],
icon_setting: [
{ id: '1', src: [], icon: 'applet-me-settings-acquiesce', href: {} },
{ id: '2', src: [], icon: 'applet-me-message-acquiesce', href: {} },
{ id: '1', src: [], icon: 'applet-me-settings-acquiesce', link: {} },
{ id: '2', src: [], icon: 'applet-me-message-acquiesce', link: {} },
],
},
style: {