Merge remote-tracking branch 'origin/dev-yxl' into dev-sws
commit
5af0e5b542
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<i class="iconfont" :class="className" :style="'font-size:' + size + 'px;' + (props.color.indexOf('#') !== -1 ? 'color:' + props.color : '') + styles" @click="onClick">
|
||||
<i class="iconfont" :class="className" :style="'font-size:' + size + 'px;' + (props.color.indexOf('#') !== -1 || props.color.indexOf('rgba') !== -1 ? 'color:' + props.color + ';' : '') + styles" @click="onClick">
|
||||
<slot></slot>
|
||||
</i>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ interface CubeItem {
|
|||
interface Props {
|
||||
flag: boolean;
|
||||
list: CubeItem[];
|
||||
type: string;
|
||||
type?: string;
|
||||
cubeWidth: number;
|
||||
cubeHeight: number;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,33 +15,20 @@
|
|||
<el-form-item label="是否显示">
|
||||
<el-switch v-model="form.is_shop_show"></el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item label="按钮样式" class="align-c">
|
||||
<div class="flex-row align-c jc-s gap-20 shopping_button_all">
|
||||
<div v-for="item in base_list.shopping_button_list" :key="item.value" :class="['pa-10 re', { 'br-c br-primary radius-sm': shop_type(item) }]" @click="shopping_button_click(item)">
|
||||
<template v-if="item.value == '0'">
|
||||
<div :class="['pl-13 pr-13 round size-12 bg-primary cr-f shopping_button', {'disabled': ['3','4','5'].includes(form.theme) }]">{{ item.name }}</div>
|
||||
</template>
|
||||
<template v-else-if="item.value == '1'">
|
||||
<div :class="['pl-13 pr-13 round size-12 bg-primary cr-f shopping_button', {'disabled': ['3','4','5'].includes(form.theme) }]">{{ item.name }}</div>
|
||||
</template>
|
||||
<template v-else-if="item.value == '2'">
|
||||
<icon class="shopping_button round pl-6 pr-6 bg-primary " name="add" color="f" size="16"></icon>
|
||||
</template>
|
||||
<template v-else>
|
||||
<icon class="shopping_button round pl-6 pr-6 bg-primary" name="cart" color="f" size="16"></icon>
|
||||
</template>
|
||||
<div v-if="shop_type(item)" class="button-checked">
|
||||
<icon name="true" color="f" size="8"></icon>
|
||||
</div>
|
||||
</div>
|
||||
<el-form-item label="按钮样式">
|
||||
<div class="flex-col w gap-10">
|
||||
<el-radio-group v-model="form.shop_type">
|
||||
<el-radio v-for="item in base_list.shopping_button_list" :key="item.value" :value="item.value">{{ item.name }}</el-radio>
|
||||
</el-radio-group>
|
||||
<template v-if="form.shop_type == 'text'">
|
||||
<el-input v-model="form.shop_button_text" placeholder="请输入按钮文字"></el-input>
|
||||
</template>
|
||||
<template v-else>
|
||||
<upload v-model:icon-value="form.shop_button_icon_class" is-icon type="icon" :limit="1" size="50"></upload>
|
||||
</template>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否显示" label-width="140">
|
||||
<el-radio-group v-model="form.shop_button_size">
|
||||
<el-radio v-for="item in base_list.shopping_button_size" :key="item.value" :value="item.value">{{ item.name }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否显示">
|
||||
<el-form-item label="按钮效果">
|
||||
<el-radio-group v-model="form.shop_button_effect">
|
||||
<el-radio v-for="item in base_list.shopping_cart_list" :key="item.value" :value="item.value">{{ item.name }}</el-radio>
|
||||
</el-radio-group>
|
||||
|
|
@ -75,19 +62,12 @@ const base_list = {
|
|||
{ name: '原价单位', value: 'original_price_unit' },
|
||||
],
|
||||
shopping_button_list: [
|
||||
{ name: '购买', value: '0' },
|
||||
{ name: '立即购买', value: '1' },
|
||||
{ name: '添加', value: '2' },
|
||||
{ name: '购物车', value: '3' },
|
||||
{ name: '文字', value: 'text' },
|
||||
{ name: 'icon', value: 'icon' },
|
||||
],
|
||||
shopping_cart_list: [
|
||||
{ name: '进入商品详情页', value: '0' },
|
||||
{ name: '商品加购', value: '1' }
|
||||
],
|
||||
shopping_button_size: [
|
||||
{ name: '大', value: '0' },
|
||||
{ name: '中', value: '1' },
|
||||
{ name: '小', value: '2' },
|
||||
]
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -55,8 +55,10 @@ const props = defineProps({
|
|||
});
|
||||
watch(
|
||||
() => props.reset,
|
||||
() => {
|
||||
init();
|
||||
(val) => {
|
||||
if (val) {
|
||||
init();
|
||||
}
|
||||
}
|
||||
);
|
||||
onMounted(() => {
|
||||
|
|
|
|||
|
|
@ -56,8 +56,10 @@ const props = defineProps({
|
|||
});
|
||||
watch(
|
||||
() => props.reset,
|
||||
() => {
|
||||
init();
|
||||
(val) => {
|
||||
if (val) {
|
||||
init();
|
||||
}
|
||||
}
|
||||
);
|
||||
onMounted(() => {
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ watch(
|
|||
);
|
||||
watch(
|
||||
() => props.reset,
|
||||
() => {
|
||||
(val) => {
|
||||
reset_data();
|
||||
custom_type_active.value = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,12 +73,12 @@ const filterData = (input: string, data: pageLinkList[]) => {
|
|||
// 遍历数组
|
||||
for (let item of data) {
|
||||
// 检查当前项的name是否匹配
|
||||
if (item.name.includes(input)) {
|
||||
if (item.name && item.name.includes(input)) {
|
||||
result.push(item);
|
||||
} else {
|
||||
if (item.items) {
|
||||
// 否则,检查当前项的data属性中的子项
|
||||
let subResult = item.items.filter((subItem) => subItem.name.includes(input));
|
||||
let subResult = item.items.filter((subItem) => subItem.name && subItem.name.includes(input));
|
||||
// 如果找到匹配的子项,将当前项(父级)添加到结果中
|
||||
if (subResult.length > 0) {
|
||||
result.push({ ...item, items: subResult });
|
||||
|
|
@ -87,7 +87,7 @@ const filterData = (input: string, data: pageLinkList[]) => {
|
|||
let result_child: pageLinkList[] = [];
|
||||
item.items.forEach((child: pageLinkList) => {
|
||||
if (child.items) {
|
||||
let subResult = child.items.filter((subItem) => subItem.name.includes(input));
|
||||
let subResult = child.items.filter((subItem) => subItem.name && subItem.name.includes(input));
|
||||
if (subResult.length > 0) {
|
||||
result_child.push({ ...child, items: subResult });
|
||||
}
|
||||
|
|
|
|||
|
|
@ -83,8 +83,10 @@ watch(
|
|||
);
|
||||
watch(
|
||||
() => props.reset,
|
||||
() => {
|
||||
init();
|
||||
(val) => {
|
||||
if (val) {
|
||||
init();
|
||||
}
|
||||
}
|
||||
);
|
||||
const emit = defineEmits(['update:link', 'type']);
|
||||
|
|
|
|||
|
|
@ -58,8 +58,10 @@ const props = defineProps({
|
|||
});
|
||||
watch(
|
||||
() => props.reset,
|
||||
() => {
|
||||
init();
|
||||
(val) => {
|
||||
if (val) {
|
||||
init();
|
||||
}
|
||||
}
|
||||
);
|
||||
onMounted(() => {
|
||||
|
|
@ -80,6 +82,7 @@ const init = () => {
|
|||
search_value.value = '';
|
||||
category_list.value = url_value_store.url_value.goods_category;
|
||||
brand_list.value = url_value_store.url_value.brand_list;
|
||||
console.log('1111122');
|
||||
get_list(1);
|
||||
};
|
||||
const handle_search = () => {
|
||||
|
|
|
|||
|
|
@ -48,8 +48,10 @@ const props = defineProps({
|
|||
});
|
||||
watch(
|
||||
() => props.reset,
|
||||
() => {
|
||||
init();
|
||||
(val) => {
|
||||
if (val) {
|
||||
init();
|
||||
}
|
||||
}
|
||||
);
|
||||
const modelValue = defineModel({ type: Array, default: [] });
|
||||
|
|
@ -84,12 +86,12 @@ const filterData = (input: string, data: pageLinkList[]) => {
|
|||
// 遍历数组
|
||||
for (let item of data) {
|
||||
// 检查当前项的name是否匹配
|
||||
if (item.name.includes(input)) {
|
||||
if (item.name && item.name.includes(input)) {
|
||||
result.push(item);
|
||||
} else {
|
||||
if (item.data) {
|
||||
// 否则,检查当前项的data属性中的子项
|
||||
let subResult = item.data.filter((subItem) => subItem.name.includes(input));
|
||||
let subResult = item.data.filter((subItem) => subItem.name && subItem.name.includes(input));
|
||||
// 如果找到匹配的子项,将当前项(父级)添加到结果中
|
||||
if (subResult.length > 0) {
|
||||
result.push({ ...item, data: subResult });
|
||||
|
|
|
|||
|
|
@ -55,8 +55,10 @@ const props = defineProps({
|
|||
});
|
||||
watch(
|
||||
() => props.reset,
|
||||
() => {
|
||||
init();
|
||||
(val) => {
|
||||
if (val) {
|
||||
init();
|
||||
}
|
||||
}
|
||||
);
|
||||
onMounted(() => {
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@
|
|||
<div class="mb-12">内容设置</div>
|
||||
<template v-if="!isEmpty(form.img_magic_list[selected_active])">
|
||||
<el-form-item label="上传图片">
|
||||
<upload v-model="form.img_magic_list[selected_active].img" :limit="1" size="40"></upload>
|
||||
<upload v-model="form.img_magic_list[selected_active].img" :limit="1" size="50"></upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="链接">
|
||||
<url-value v-model="form.img_magic_list[selected_active].img_link"></url-value>
|
||||
|
|
|
|||
|
|
@ -2,10 +2,13 @@
|
|||
<div :style="style_container">
|
||||
<template v-if="form.notice_style == 'inherit'">
|
||||
<div class="flex-row align-c news-box gap-y-8">
|
||||
<template v-if="form.title_type == 'img'">
|
||||
<template v-if="form.title_type == 'img-icon'">
|
||||
<div v-if="!isEmpty(form.img_src)">
|
||||
<image-empty v-model="form.img_src[0]" :style="img_style"></image-empty>
|
||||
</div>
|
||||
<div v-else>
|
||||
<icon :name="form.icon_class" :size="new_style.icon_size + ''" :color="new_style.icon_color"></icon>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div :style="topic_style" class="pl-6 pr-6 radius-sm">{{ form.title || '公告' }}</div>
|
||||
|
|
@ -19,8 +22,13 @@
|
|||
<template v-else>
|
||||
<div class="news-card flex-col gap-10">
|
||||
<div class="flex-row w jc-sb">
|
||||
<template v-if="form.title_type == 'img'">
|
||||
<image-empty v-model="form.img_src[0]" :style="img_style" error-img-style="width:1.6rem;height:1.6rem;"></image-empty>
|
||||
<template v-if="form.title_type == 'img-icon'">
|
||||
<template v-if="!isEmpty(form.icon_class)">
|
||||
<icon :name="form.icon_class" :size="new_style.icon_size + ''" :color="new_style.icon_color"></icon>
|
||||
</template>
|
||||
<template v-else>
|
||||
<image-empty v-model="form.img_src[0]" :style="img_style" error-img-style="width:1.6rem;height:1.6rem;"></image-empty>
|
||||
</template>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div :style="topic_style" class="pl-6 pr-6 radius-sm">{{ form.title || '公告' }}</div>
|
||||
|
|
|
|||
|
|
@ -14,12 +14,12 @@
|
|||
<div class="mb-12">公告风格</div>
|
||||
<el-form-item label="标题类型">
|
||||
<el-radio-group v-model="form.title_type" class="ml-4">
|
||||
<el-radio value="img">图片</el-radio>
|
||||
<el-radio value="img-icon">图片/图标</el-radio>
|
||||
<el-radio value="text">文字</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="!is_text" label="上传图片">
|
||||
<upload v-model="form.img_src" :limit="1" size="50"></upload>
|
||||
<upload v-model="form.img_src" v-model:icon-value="form.icon_class" is-icon :limit="1" size="50"></upload>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="is_text" label="标题文字">
|
||||
<el-input v-model="form.title" placeholder="请输入标题" maxlength="4" show-word-limit></el-input>
|
||||
|
|
|
|||
|
|
@ -12,12 +12,22 @@
|
|||
</el-form-item>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-form-item label="图片宽度">
|
||||
<slider v-model="form.topic_width" :max="1000"></slider>
|
||||
</el-form-item>
|
||||
<el-form-item label="图片高度">
|
||||
<slider v-model="form.topic_height" :max="1000"></slider>
|
||||
</el-form-item>
|
||||
<template v-if="!isEmpty(substance.icon_class)">
|
||||
<el-form-item label="图标大小">
|
||||
<slider v-model="form.icon_size" :max="100"></slider>
|
||||
</el-form-item>
|
||||
<el-form-item label="图标颜色">
|
||||
<color-picker v-model="form.icon_color" default-color="#999"></color-picker>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-form-item label="图片宽度">
|
||||
<slider v-model="form.topic_width" :max="1000"></slider>
|
||||
</el-form-item>
|
||||
<el-form-item label="图片高度">
|
||||
<slider v-model="form.topic_height" :max="1000"></slider>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</template>
|
||||
<el-form-item label="按钮颜色">
|
||||
<color-picker v-model="form.button_color" default-color="#999"></color-picker>
|
||||
|
|
@ -31,6 +41,7 @@
|
|||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { isEmpty } from "lodash";
|
||||
const props = defineProps({
|
||||
value: {
|
||||
type: Object,
|
||||
|
|
@ -49,7 +60,7 @@ const state = reactive({
|
|||
// 如果需要解构,确保使用toRefs
|
||||
const { form, substance } = toRefs(state);
|
||||
|
||||
const is_img = computed(() => substance.value.title_type == 'img');
|
||||
const is_img = computed(() => substance.value.title_type == 'img-icon');
|
||||
// 通用样式处理
|
||||
const common_styles_update = (val: Object) => {
|
||||
form.value.common_style = val;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ interface hot_word_list {
|
|||
interface search_content {
|
||||
is_center: boolean;
|
||||
is_icon_show: boolean;
|
||||
icon_type: string;
|
||||
icon_src: string;
|
||||
icon_img_src: uploadList[];
|
||||
icon_class: string;
|
||||
|
|
|
|||
|
|
@ -4,14 +4,14 @@
|
|||
<div class="search w re">
|
||||
<div class="box h oh flex align-c gap-10" :style="box_style">
|
||||
<template v-if="form.is_icon_show">
|
||||
<template v-if="form.icon_type == 'icon'">
|
||||
<el-icon :class="`iconfont ${ !isEmpty(form.icon_class) ? 'icon-' + form.icon_class : 'search' } size-14`" :style="`color:${new_style.icon_color};`" />
|
||||
</template>
|
||||
<template v-else>
|
||||
<template v-if="form.icon_img_src.length > 0">
|
||||
<div class="img-box">
|
||||
<image-empty v-model="form.icon_img_src[0]" class="img" error-img-style="width: 4rem;height: 2.5rem;" />
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-icon :class="`iconfont ${ !isEmpty(form.icon_class) ? 'icon-' + form.icon_class : 'icon-search' } size-14`" :style="`color:${new_style.icon_color};`" />
|
||||
</template>
|
||||
</template>
|
||||
<span v-if="form.is_tips_show" class="size-14" :style="`color: ${ new_style.tips_color }`">{{ form.tips }}</span>
|
||||
</div>
|
||||
|
|
@ -19,10 +19,10 @@
|
|||
<template v-if="form.search_type === 'text'">
|
||||
<div class="pl-16 pr-16 ptb-3 size-12">{{ form.search_tips }}</div>
|
||||
</template>
|
||||
<template v-if="form.search_type === 'img'">
|
||||
<template v-else-if="form.search_botton_src.length > 0">
|
||||
<image-empty v-model="form.search_botton_src[0]" class="img" :style="search_button_radius" error-img-style="width: 4rem;height: 2.8rem;" />
|
||||
</template>
|
||||
<template v-if="form.search_type === 'icon'">
|
||||
<template v-else>
|
||||
<div class="pl-16 pr-16 ptb-3 size-12">
|
||||
<el-icon :class="`iconfont ${ 'icon-' + form.search_botton_icon } size-14`" />
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -10,16 +10,7 @@
|
|||
<div class="flex-col w h gap-10">
|
||||
<el-switch v-model="form.is_icon_show"/>
|
||||
<template v-if="form.is_icon_show">
|
||||
<el-radio-group v-model="form.icon_type" class="ml-4">
|
||||
<el-radio value="img">图片</el-radio>
|
||||
<el-radio value="icon">图标</el-radio>
|
||||
</el-radio-group>
|
||||
<template v-if="form.icon_type === 'img'">
|
||||
<upload v-model="form.icon_img_src" :limit="1" size="50"></upload>
|
||||
</template>
|
||||
<template v-else>
|
||||
<upload-icon v-model:icon_class="form.icon_class" :size="50"></upload-icon>
|
||||
</template>
|
||||
<upload v-model="form.icon_img_src" v-model:icon-value="form.icon_class" is-icon :limit="1" size="50"></upload>
|
||||
</template>
|
||||
</div>
|
||||
</el-form-item>
|
||||
|
|
@ -34,15 +25,11 @@
|
|||
<el-switch v-model="form.is_search_show"/>
|
||||
<template v-if="form.is_search_show">
|
||||
<el-radio-group v-model="form.search_type" class="ml-4">
|
||||
<el-radio value="img">图片</el-radio>
|
||||
<el-radio value="icon">图标</el-radio>
|
||||
<el-radio value="img-icon">图片/图标</el-radio>
|
||||
<el-radio value="text">文字</el-radio>
|
||||
</el-radio-group>
|
||||
<template v-if="form.search_type === 'img'">
|
||||
<upload v-model="form.search_botton_src" :limit="1" size="50"></upload>
|
||||
</template>
|
||||
<template v-else-if="form.search_type === 'icon'">
|
||||
<upload-icon v-model:icon_class="form.search_botton_icon" :size="50"></upload-icon>
|
||||
<template v-if="form.search_type === 'img-icon'">
|
||||
<upload v-model="form.search_botton_src" v-model:icon-value="form.search_botton_icon" is-icon :limit="1" size="50"></upload>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-input v-model="form.search_tips" placeholder="请输入文字内容"></el-input>
|
||||
|
|
@ -74,7 +61,6 @@ const props = withDefaults(defineProps<Props>(), {
|
|||
value: () => ({
|
||||
is_center: false,
|
||||
is_icon_show: true,
|
||||
icon_type: 'icon',
|
||||
icon_src: '',
|
||||
icon_img_src: [],
|
||||
icon_class: '',
|
||||
|
|
|
|||
|
|
@ -52,17 +52,11 @@
|
|||
</div>
|
||||
</div>
|
||||
<div v-if="form.is_shop_show">
|
||||
<template v-if="form.shop_type == '0'">
|
||||
<div class="pl-13 pr-13 round cr-f shopping_button" :style="trends_config('button', 'gradient')">购买</div>
|
||||
</template>
|
||||
<template v-else-if="form.shop_type == '1'">
|
||||
<div class="pl-11 pr-11 round cr-f shopping_button" :style="trends_config('button', 'gradient')">立即购买</div>
|
||||
</template>
|
||||
<template v-else-if="form.shop_type == '2'">
|
||||
<icon :class="['shopping_button round', { 'pl-6 pr-6': shop_icon_size != '8', 'pl-5 pr-5': shop_icon_size == '8' }]" name="add" color="f" :size="shop_icon_size" :styles="button_gradient()"></icon>
|
||||
<template v-if="form.shop_type == 'text'">
|
||||
<div class="plr-11 ptb-3 round cr-f" :style="trends_config('button', 'gradient') + `color: ${ new_style.shop_button_text_color };`">{{ form.shop_button_text }}</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<icon :class="['shopping_button round', { 'pl-6 pr-6': shop_icon_size != '8', 'pl-5 pr-5': shop_icon_size == '8' }]" name="cart" color="f" :size="shop_icon_size" :styles="button_gradient()"></icon>
|
||||
<icon class="round plr-6 ptb-5" :name="!isEmpty(form.shop_button_icon_class) ? form.shop_button_icon_class : 'cart'" :color="new_style.shop_icon_color" :size="new_style.shop_icon_size + ''" :styles="button_gradient()"></icon>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -85,17 +79,11 @@
|
|||
</div>
|
||||
</div>
|
||||
<div v-if="form.is_shop_show">
|
||||
<template v-if="form.shop_type == '0'">
|
||||
<div class="pl-13 pr-13 round cr-f shopping_button" :style="trends_config('button', 'gradient')">购买</div>
|
||||
</template>
|
||||
<template v-else-if="form.shop_type == '1'">
|
||||
<div class="pl-11 pr-11 round cr-f shopping_button" :style="trends_config('button', 'gradient')">立即购买</div>
|
||||
</template>
|
||||
<template v-else-if="form.shop_type == '2'">
|
||||
<icon :class="['shopping_button round', { 'pl-6 pr-6': shop_icon_size != '8', 'pl-5 pr-5': shop_icon_size == '8' }]" name="add" color="f" :size="shop_icon_size" :styles="button_gradient()"></icon>
|
||||
<template v-if="form.shop_type == 'text'">
|
||||
<div class="plr-11 ptb-3 round cr-f" :style="trends_config('button', 'gradient') + `color: ${ new_style.shop_button_text_color };`">{{ form.shop_button_text }}</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<icon :class="['shopping_button round', { 'pl-6 pr-6': shop_icon_size != '8', 'pl-5 pr-5': shop_icon_size == '8' }]" name="cart" color="f" :size="shop_icon_size" :styles="button_gradient()"></icon>
|
||||
<icon class="round plr-6 ptb-5" :name="!isEmpty(form.shop_button_icon_class) ? form.shop_button_icon_class : 'cart'" :color="new_style.shop_icon_color" :size="new_style.shop_icon_size + ''" :styles="button_gradient()"></icon>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -177,7 +165,7 @@ const default_list = {
|
|||
name: '领劵',
|
||||
bg_color: '',
|
||||
br_color: '#EA9223',
|
||||
color: '#EA9223 ',
|
||||
color: '#EA9223',
|
||||
url: ''
|
||||
}
|
||||
]
|
||||
|
|
@ -311,26 +299,6 @@ const text_line = computed(() => {
|
|||
const is_show = (index: string) => {
|
||||
return form.value.is_show.includes(index);
|
||||
};
|
||||
// 按钮大小设置
|
||||
const button_size = computed(() => {
|
||||
let button_size = '22px';
|
||||
if (form.value.shop_button_size == '0') {
|
||||
button_size = '27px';
|
||||
} else if (form.value.shop_button_size == '2') {
|
||||
button_size = '18px';
|
||||
}
|
||||
return button_size;
|
||||
});
|
||||
// 不同大小下的icon显示
|
||||
const shop_icon_size = computed(() => {
|
||||
let size = '8';
|
||||
if (form.value.shop_button_size == '0') {
|
||||
size = '15';
|
||||
} else if (form.value.shop_button_size == '1') {
|
||||
size = '10';
|
||||
}
|
||||
return size;
|
||||
});
|
||||
// 根据传递的参数,从对象中取值
|
||||
const trends_config = (key: string, type?: string) => {
|
||||
return style_config(new_style.value[`shop_${key}_typeface`], new_style.value[`shop_${key}_size`], new_style.value[`shop_${key}_color`], type);
|
||||
|
|
@ -393,10 +361,6 @@ const style_container = computed(() => {
|
|||
border-top-right-radius: 1rem;
|
||||
padding: 0 1rem 0 0;
|
||||
}
|
||||
.shopping_button {
|
||||
height: v-bind(button_size);
|
||||
line-height: v-bind(button_size);
|
||||
}
|
||||
.two-columns {
|
||||
width: calc((100% - v-bind(two_columns)) / 2);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,9 +51,16 @@
|
|||
<el-form-item label="按钮颜色" class="topic">
|
||||
<flex-gradients-create :color-list="form.shop_button_color" default-color="#FF3D53"></flex-gradients-create>
|
||||
</el-form-item>
|
||||
<el-form-item label="立即购买">
|
||||
<color-text-size-group v-model:typeface="form.shop_button_typeface" v-model:size="form.shop_button_size" :type-list="['typeface', 'size']"></color-text-size-group>
|
||||
</el-form-item>
|
||||
<template v-if="data.shop_type == 'text'">
|
||||
<el-form-item label="文字设置">
|
||||
<color-text-size-group v-model:color="form.shop_button_text_color" v-model:typeface="form.shop_button_typeface" v-model:size="form.shop_button_size" default-color="#fff"></color-text-size-group>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-form-item label="icon设置">
|
||||
<color-text-size-group v-model:color="form.shop_icon_color" v-model:size="form.shop_icon_size" default-color="#fff" :type-list="['color', 'size']"></color-text-size-group>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</card-container>
|
||||
</el-form>
|
||||
<common-styles :value="form.common_style" @update:value="common_style_update" />
|
||||
|
|
|
|||
|
|
@ -63,9 +63,16 @@
|
|||
<el-form-item label="按钮颜色" class="topic">
|
||||
<flex-gradients-create :color-list="form.shop_button_color" default-color="#2a94ff"></flex-gradients-create>
|
||||
</el-form-item>
|
||||
<el-form-item label="立即购买">
|
||||
<color-text-size-group v-model:typeface="form.shop_button_typeface" v-model:size="form.shop_button_size" :type-list="['typeface', 'size']"></color-text-size-group>
|
||||
</el-form-item>
|
||||
<template v-if="data.shop_type == 'text'">
|
||||
<el-form-item label="文字设置">
|
||||
<color-text-size-group v-model:color="form.shop_button_text_color" v-model:typeface="form.shop_button_typeface" v-model:size="form.shop_button_size" default-color="#fff"></color-text-size-group>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-form-item label="icon设置">
|
||||
<color-text-size-group v-model:color="form.shop_icon_color" v-model:size="form.shop_icon_size" default-color="#fff" :type-list="['color', 'size']"></color-text-size-group>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</card-container>
|
||||
</el-form>
|
||||
<common-styles :value="form.common_style" @update:value="common_style_update" />
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<el-input v-model="form.title" placeholder="请输入标题"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="标题链接">
|
||||
<el-input v-model="form.title_link" placeholder="请输入链接"></el-input>
|
||||
<url-value v-model="form.title_link"></url-value>
|
||||
</el-form-item>
|
||||
</card-container>
|
||||
<card-container class="mb-8">
|
||||
|
|
|
|||
|
|
@ -69,10 +69,7 @@ const defaultArticleTabs: DefaultArticleTabs = {
|
|||
field_show: ['0', '1'],
|
||||
},
|
||||
style: {
|
||||
tabs_checked: [
|
||||
{ color: 'rgba(212,212,212,2)', color_percentage: '' },
|
||||
{ color: 'rgba(255,210,210,1)', color_percentage: '' },
|
||||
],
|
||||
tabs_checked: [{ color: '#FF2222', color_percentage: '' }, { color: '#FF9898', color_percentage: '' }],
|
||||
tabs_direction: '90deg',
|
||||
tabs_weight_checked: '500',
|
||||
tabs_size_checked: 14,
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ interface defaultSearch {
|
|||
title: string;
|
||||
direction: string;
|
||||
img_src: uploadList[];
|
||||
icon_class: string;
|
||||
more_link: object;
|
||||
interval_time: number;
|
||||
is_right_button: string;
|
||||
|
|
@ -30,6 +31,8 @@ interface defaultSearch {
|
|||
topic_size: number;
|
||||
topic_width: number;
|
||||
topic_height: number;
|
||||
icon_size: number;
|
||||
icon_color: string;
|
||||
common_style: object;
|
||||
};
|
||||
}
|
||||
|
|
@ -37,9 +40,10 @@ const defaultSearch: defaultSearch = {
|
|||
content: {
|
||||
notice_style: 'inherit',
|
||||
direction: 'vertical',
|
||||
title_type: 'img',
|
||||
title_type: 'img-icon',
|
||||
title: '测试标题',
|
||||
img_src: [],
|
||||
icon_class: '',
|
||||
is_right_button: 'show',
|
||||
interval_time: 2,
|
||||
more_link: {},
|
||||
|
|
@ -71,6 +75,8 @@ const defaultSearch: defaultSearch = {
|
|||
topic_size: 14,
|
||||
topic_width: 24,
|
||||
topic_height: 24,
|
||||
icon_size: 12,
|
||||
icon_color: '#999',
|
||||
button_color: '#999',
|
||||
common_style: defaultCommon,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ interface defaultSearch {
|
|||
content: {
|
||||
is_center: boolean;
|
||||
is_icon_show: boolean;
|
||||
icon_type: string;
|
||||
icon_src: string;
|
||||
icon_img_src: uploadList[];
|
||||
icon_class: string;
|
||||
|
|
@ -41,7 +40,6 @@ const defaultSearch: defaultSearch = {
|
|||
content: {
|
||||
is_center: false,
|
||||
is_icon_show: true,
|
||||
icon_type: 'icon',
|
||||
icon_src: '',
|
||||
icon_img_src: [],
|
||||
icon_class: '',
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@ interface DefaultProductList {
|
|||
is_show: string[];
|
||||
is_shop_show: boolean;
|
||||
shop_type: string;
|
||||
shop_button_text: string;
|
||||
shop_button_icon_class: string;
|
||||
shop_button_effect: string;
|
||||
shop_button_size: string;
|
||||
};
|
||||
|
|
@ -40,6 +42,9 @@ interface DefaultProductList {
|
|||
shop_button_typeface:string;
|
||||
shop_button_size: number;
|
||||
shop_button_color: color_list[];
|
||||
shop_button_text_color: string,
|
||||
shop_icon_size: number;
|
||||
shop_icon_color: string;
|
||||
common_style: object;
|
||||
};
|
||||
}
|
||||
|
|
@ -57,7 +62,9 @@ const defaultProductList: DefaultProductList = {
|
|||
sort_rules: '0',
|
||||
is_show: ['title', 'plugins_view_icon', 'price', 'sales_count', 'original_price'],
|
||||
is_shop_show: true,
|
||||
shop_type: '0',
|
||||
shop_type: 'text',
|
||||
shop_button_text: '购买',
|
||||
shop_button_icon_class: '',
|
||||
shop_button_effect: '0',
|
||||
shop_button_size: '1',
|
||||
},
|
||||
|
|
@ -111,6 +118,9 @@ const defaultProductList: DefaultProductList = {
|
|||
color_percentage: ''
|
||||
}
|
||||
],
|
||||
shop_button_text_color: '#fff',
|
||||
shop_icon_size: 10,
|
||||
shop_icon_color: "#fff",
|
||||
common_style: { ...defaultCommon, padding: 10, padding_top: 10, padding_bottom: 10, padding_left: 10, padding_right: 10 },
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@ interface DefaultProductList {
|
|||
is_shop_show: boolean;
|
||||
is_price_solo: boolean;
|
||||
shop_type: string;
|
||||
shop_button_text: string;
|
||||
shop_button_icon_class: string;
|
||||
shop_button_effect: string;
|
||||
shop_button_size: string;
|
||||
};
|
||||
|
|
@ -56,6 +58,9 @@ interface DefaultProductList {
|
|||
shop_button_typeface:string;
|
||||
shop_button_size: number;
|
||||
shop_button_color: color_list[];
|
||||
shop_button_text_color: string,
|
||||
shop_icon_size: number;
|
||||
shop_icon_color: string;
|
||||
common_style: object;
|
||||
};
|
||||
}
|
||||
|
|
@ -73,12 +78,14 @@ const defaultProductList: DefaultProductList = {
|
|||
is_show: ['title', 'plugins_view_icon', 'price', 'sales_count', 'original_price'],
|
||||
is_shop_show: true,
|
||||
is_price_solo: true,
|
||||
shop_type: '0',
|
||||
shop_type: 'text',
|
||||
shop_button_text: '购买',
|
||||
shop_button_icon_class: '',
|
||||
shop_button_effect: '0',
|
||||
shop_button_size: '1',
|
||||
},
|
||||
style: {
|
||||
tabs_checked: [{ color: 'rgba(212,212,212,2)', color_percentage: '' }, { color: 'rgba(255,210,210,1)', color_percentage: '' }],
|
||||
tabs_checked: [{ color: '#FF2222', color_percentage: '' }, { color: '#FF9898', color_percentage: '' }],
|
||||
tabs_direction: '90deg',
|
||||
tabs_weight_checked: '500',
|
||||
tabs_size_checked: 14,
|
||||
|
|
@ -135,6 +142,9 @@ const defaultProductList: DefaultProductList = {
|
|||
color_percentage: ''
|
||||
}
|
||||
],
|
||||
shop_button_text_color: '#fff',
|
||||
shop_icon_size: 10,
|
||||
shop_icon_color: "#fff",
|
||||
common_style: { ...defaultCommon, padding: 10, padding_top: 10, padding_bottom: 10, padding_left: 10, padding_right: 10 },
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ const defaultTabs: defaultTabs = {
|
|||
],
|
||||
},
|
||||
style: {
|
||||
tabs_checked: [{ color: 'rgba(212,212,212,2)', color_percentage: '' }, { color: 'rgba(255,210,210,1)', color_percentage: '' }],
|
||||
tabs_checked: [{ color: '#FF2222', color_percentage: '' }, { color: '#FF9898', color_percentage: '' }],
|
||||
tabs_direction: '90deg',
|
||||
tabs_weight_checked: '500',
|
||||
tabs_size_checked: 14,
|
||||
|
|
|
|||
|
|
@ -4,18 +4,18 @@ import defaultCommon from "./index";
|
|||
interface carousel_list {
|
||||
id: string;
|
||||
title: string;
|
||||
link: string;
|
||||
link: object;
|
||||
is_show: boolean;
|
||||
}
|
||||
interface defaultSearch {
|
||||
content: {
|
||||
title: string,
|
||||
title_link: string,
|
||||
title_link: object,
|
||||
keyword_show: true,
|
||||
keyword_list: carousel_list[]
|
||||
right_show: true,
|
||||
right_title: string,
|
||||
right_link: string,
|
||||
right_link: object,
|
||||
};
|
||||
style: {
|
||||
title_color: string,
|
||||
|
|
@ -31,16 +31,16 @@ interface defaultSearch {
|
|||
const defaultSearch: defaultSearch = {
|
||||
content: {
|
||||
title: '',
|
||||
title_link: '',
|
||||
title_link: {},
|
||||
keyword_show: true,
|
||||
right_show: true,
|
||||
right_title: '更多',
|
||||
right_link: '',
|
||||
right_link: {},
|
||||
keyword_list: [
|
||||
{
|
||||
id: get_math(),
|
||||
title: '',
|
||||
link: '',
|
||||
link: {},
|
||||
is_show: true
|
||||
}
|
||||
]
|
||||
|
|
|
|||
Loading…
Reference in New Issue