Merge branch 'dev-sws' into dev-yxl
commit
e45d26cb83
|
|
@ -297,9 +297,7 @@ watch(
|
|||
get_tree();
|
||||
// 获取附件列表
|
||||
get_attachment_list();
|
||||
|
||||
icon_value.value = '';
|
||||
temp_icon_value.value = '';
|
||||
|
||||
icon_index.value = -1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@
|
|||
<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 + 1" @mouseleave="is_hover = 0">
|
||||
<div v-if="footerData.content.nav_style !== '2'" class="img re">
|
||||
<img class="img-item abs radius-xs animate-linear w" :class="is_hover != index + 1 ? 'active' : ''" :src="item.src[0]?.url" width="22" height="22" />
|
||||
<img class="img-item abs radius-xs animate-linear w" :class="is_hover == index + 1 ? 'active' : ''" :src="item.src_checked[0]?.url" width="22" height="22" />
|
||||
<img class="img-item abs radius-xs animate-linear w" :class="is_hover == index + 1 || index == 0 ? 'active' : ''" :src="item.src_checked[0]?.url" width="22" height="22" />
|
||||
</div>
|
||||
<span v-if="footerData.content.nav_style !== '1'" class="animate-linear size-12" :style="is_hover == index + 1 ? text_color_checked : default_text_color">{{ item.name }}</span>
|
||||
<span v-if="footerData.content.nav_style !== '1'" class="animate-linear size-12" :style="is_hover == index + 1 || index == 0 ? text_color_checked : default_text_color">{{ item.name }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -14,7 +14,12 @@
|
|||
<div class="title" :class="article_theme == '3' ? 'text-line-1 flex-1 flex-width' : 'text-line-2'" :style="article_name">{{ !isEmpty(item.new_title) ? item.new_title : item.data.title }}</div>
|
||||
<div class="flex-row jc-sb gap-8" :class="article_theme == '3' ? 'ml-10' : 'align-e mt-10'">
|
||||
<div :style="article_date">{{ field_show.includes('0') ? (!is_obj_empty(item.data) ? item.data.add_time : '2020-06-05 15:20') : '' }}</div>
|
||||
<icon v-show="field_show.includes('1')" name="eye" :style="article_page_view">{{ item.data.access_count ? item.data.access_count : '16' }}</icon>
|
||||
<div class="flex-row align-c gap-3" :style="article_page_view">
|
||||
<icon v-show="field_show.includes('1')" name="eye"></icon>
|
||||
<div>
|
||||
{{ item.data.access_count ? item.data.access_count : '16' }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -89,7 +94,6 @@ const default_data_list: ArticleList = {
|
|||
watch(
|
||||
props.value,
|
||||
(newVal, oldValue) => {
|
||||
console.log(newVal);
|
||||
const new_content = newVal?.content;
|
||||
const new_style = newVal?.style;
|
||||
// 内容
|
||||
|
|
|
|||
|
|
@ -70,8 +70,26 @@ const props = defineProps({
|
|||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
styles: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
defaultConfig: {
|
||||
type: Object,
|
||||
default: () => ({
|
||||
// 图片不同风格下的圆角
|
||||
img_radius_0: 4,
|
||||
img_radius_1: 0,
|
||||
}),
|
||||
},
|
||||
});
|
||||
const form = reactive(props.value);
|
||||
// 默认值
|
||||
const state = reactive({
|
||||
form: props.value,
|
||||
data: props.styles,
|
||||
});
|
||||
// 如果需要解构,确保使用toRefs
|
||||
const { form, data } = toRefs(state);
|
||||
const base_list = reactive({
|
||||
theme_list: [
|
||||
{ name: '单列展示', value: '0' },
|
||||
|
|
@ -121,17 +139,34 @@ const init = () => {
|
|||
};
|
||||
const theme_change = (val: any) => {
|
||||
if (val == '3' || val == '4') {
|
||||
form.field_show = ['1'];
|
||||
form.value.field_show = ['1'];
|
||||
} else {
|
||||
form.field_show = ['0', '1'];
|
||||
form.value.field_show = ['0', '1'];
|
||||
}
|
||||
if (val == '0') {
|
||||
if (data.value.img_radius.radius == props.defaultConfig.img_radius_0 || (data.value.img_radius.radius_bottom_left == props.defaultConfig.img_radius_1 && data.value.img_radius.radius_bottom_right == props.defaultConfig.img_radius_1 && data.value.img_radius.radius_top_left == props.defaultConfig.img_radius_1 && data.value.img_radius.radius_top_right == props.defaultConfig.img_radius_1)) {
|
||||
data.value.img_radius.radius = props.defaultConfig.img_radius_0;
|
||||
data.value.img_radius.radius_bottom_left = props.defaultConfig.img_radius_0;
|
||||
data.value.img_radius.radius_bottom_right = props.defaultConfig.img_radius_0;
|
||||
data.value.img_radius.radius_top_left = props.defaultConfig.img_radius_0;
|
||||
data.value.img_radius.radius_top_right = props.defaultConfig.img_radius_0;
|
||||
}
|
||||
} else {
|
||||
if (data.value.img_radius.radius == props.defaultConfig.img_radius_0 || (data.value.img_radius.radius_bottom_left == props.defaultConfig.img_radius_1 && data.value.img_radius.radius_bottom_right == props.defaultConfig.img_radius_1 && data.value.img_radius.radius_top_left == props.defaultConfig.img_radius_1 && data.value.img_radius.radius_top_right == props.defaultConfig.img_radius_1)) {
|
||||
data.value.img_radius.radius = props.defaultConfig.img_radius_1;
|
||||
data.value.img_radius.radius_bottom_left = props.defaultConfig.img_radius_1;
|
||||
data.value.img_radius.radius_bottom_right = props.defaultConfig.img_radius_1;
|
||||
data.value.img_radius.radius_top_left = props.defaultConfig.img_radius_1;
|
||||
data.value.img_radius.radius_top_right = props.defaultConfig.img_radius_1;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const data_list_remove = (index: number) => {
|
||||
form.data_list.splice(index, 1);
|
||||
form.value.data_list.splice(index, 1);
|
||||
};
|
||||
const data_list_sort = (item: any) => {
|
||||
form.data_list = item;
|
||||
form.value.data_list = item;
|
||||
};
|
||||
const add = () => {
|
||||
url_value_dialog_visible.value = true;
|
||||
|
|
@ -140,7 +175,7 @@ const add = () => {
|
|||
const url_value_dialog_visible = ref(false);
|
||||
const url_value_dialog_call_back = (item: any[]) => {
|
||||
item.forEach((child: any) => {
|
||||
form.data_list.push({
|
||||
form.value.data_list.push({
|
||||
id: get_math(),
|
||||
new_title: '',
|
||||
new_cover: [],
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
<template>
|
||||
<div class="setting-content">
|
||||
<template v-if="type == '1'">
|
||||
<model-article-list-content :value="value.content"></model-article-list-content>
|
||||
<model-article-list-content :value="value.content" :styles="value.style" :default-config="data_config"></model-article-list-content>
|
||||
</template>
|
||||
<template v-else-if="type == '2'">
|
||||
<model-article-list-styles :value="value.style" :content="value.content"></model-article-list-styles>
|
||||
<model-article-list-styles :value="value.style" :content="value.content" :default-config="data_config"></model-article-list-styles>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -19,4 +19,9 @@ const props = defineProps({
|
|||
default: () => ({}),
|
||||
},
|
||||
});
|
||||
const data_config = reactive({
|
||||
// 图片不同风格下的圆角
|
||||
img_radius_0: 4,
|
||||
img_radius_1: 0,
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -57,6 +57,14 @@ const props = defineProps({
|
|||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
defaultConfig: {
|
||||
type: Object,
|
||||
default: () => ({
|
||||
// 图片不同风格下的圆角
|
||||
img_radius_0: 4,
|
||||
img_radius_1: 0,
|
||||
}),
|
||||
},
|
||||
});
|
||||
// 默认值
|
||||
const state = reactive({
|
||||
|
|
@ -66,11 +74,24 @@ const state = reactive({
|
|||
// 如果需要解构,确保使用toRefs
|
||||
const { form, data } = toRefs(state);
|
||||
const theme = computed(() => data.value.theme);
|
||||
if (theme.value == '0') {
|
||||
if (form.value.img_radius.radius == props.defaultConfig.img_radius_0 || (form.value.img_radius.radius_bottom_left == props.defaultConfig.img_radius_1 && form.value.img_radius.radius_bottom_right == props.defaultConfig.img_radius_1 && form.value.img_radius.radius_top_left == props.defaultConfig.img_radius_1 && form.value.img_radius.radius_top_right == props.defaultConfig.img_radius_1)) {
|
||||
form.value.img_radius.radius = props.defaultConfig.img_radius_0;
|
||||
form.value.img_radius.radius_bottom_left = props.defaultConfig.img_radius_0;
|
||||
form.value.img_radius.radius_bottom_right = props.defaultConfig.img_radius_0;
|
||||
form.value.img_radius.radius_top_left = props.defaultConfig.img_radius_0;
|
||||
form.value.img_radius.radius_top_right = props.defaultConfig.img_radius_0;
|
||||
}
|
||||
} else {
|
||||
if (form.value.img_radius.radius == props.defaultConfig.img_radius_0 || (form.value.img_radius.radius_bottom_left == props.defaultConfig.img_radius_1 && form.value.img_radius.radius_bottom_right == props.defaultConfig.img_radius_1 && form.value.img_radius.radius_top_left == props.defaultConfig.img_radius_1 && form.value.img_radius.radius_top_right == props.defaultConfig.img_radius_1)) {
|
||||
form.value.img_radius.radius = props.defaultConfig.img_radius_1;
|
||||
form.value.img_radius.radius_bottom_left = props.defaultConfig.img_radius_1;
|
||||
form.value.img_radius.radius_bottom_right = props.defaultConfig.img_radius_1;
|
||||
form.value.img_radius.radius_top_left = props.defaultConfig.img_radius_1;
|
||||
form.value.img_radius.radius_top_right = props.defaultConfig.img_radius_1;
|
||||
}
|
||||
}
|
||||
const emit = defineEmits(['update:value']);
|
||||
const font_weight = reactive([
|
||||
{ name: '加粗', value: '500' },
|
||||
{ name: '正常', value: '400' },
|
||||
]);
|
||||
const common_style_update = (value: any) => {
|
||||
form.value.common_style = value;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -96,7 +96,15 @@ const props = defineProps({
|
|||
tabStyle: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
}
|
||||
},
|
||||
defaultConfig: {
|
||||
type: Object,
|
||||
default: () => ({
|
||||
// 图片不同风格下的圆角
|
||||
img_radius_0: 4,
|
||||
img_radius_1: 0,
|
||||
}),
|
||||
},
|
||||
});
|
||||
const form = reactive(props.value);
|
||||
const base_list = reactive({
|
||||
|
|
@ -158,6 +166,23 @@ const article_theme_change = (val: any) => {
|
|||
} else {
|
||||
form.field_show = ['0', '1'];
|
||||
}
|
||||
if (val == '0') {
|
||||
if (styles.img_radius.radius == props.defaultConfig.img_radius_0 || (styles.img_radius.radius_bottom_left == props.defaultConfig.img_radius_1 && styles.img_radius.radius_bottom_right == props.defaultConfig.img_radius_1 && styles.img_radius.radius_top_left == props.defaultConfig.img_radius_1 && styles.img_radius.radius_top_right == props.defaultConfig.img_radius_1)) {
|
||||
styles.img_radius.radius = props.defaultConfig.img_radius_0;
|
||||
styles.img_radius.radius_bottom_left = props.defaultConfig.img_radius_0;
|
||||
styles.img_radius.radius_bottom_right = props.defaultConfig.img_radius_0;
|
||||
styles.img_radius.radius_top_left = props.defaultConfig.img_radius_0;
|
||||
styles.img_radius.radius_top_right = props.defaultConfig.img_radius_0;
|
||||
}
|
||||
} else {
|
||||
if (styles.img_radius.radius == props.defaultConfig.img_radius_0 || (styles.img_radius.radius_bottom_left == props.defaultConfig.img_radius_1 && styles.img_radius.radius_bottom_right == props.defaultConfig.img_radius_1 && styles.img_radius.radius_top_left == props.defaultConfig.img_radius_1 && styles.img_radius.radius_top_right == props.defaultConfig.img_radius_1)) {
|
||||
styles.img_radius.radius = props.defaultConfig.img_radius_1;
|
||||
styles.img_radius.radius_bottom_left = props.defaultConfig.img_radius_1;
|
||||
styles.img_radius.radius_bottom_right = props.defaultConfig.img_radius_1;
|
||||
styles.img_radius.radius_top_left = props.defaultConfig.img_radius_1;
|
||||
styles.img_radius.radius_top_right = props.defaultConfig.img_radius_1;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// 开启关闭链接
|
||||
|
|
@ -216,7 +241,7 @@ const url_value_dialog_call_back = (item: any[]) => {
|
|||
};
|
||||
|
||||
const styles = reactive(props.tabStyle);
|
||||
const tabs_theme_change = (val: string | number | boolean | undefined):void => {
|
||||
const tabs_theme_change = (val: string | number | boolean | undefined): void => {
|
||||
styles.tabs_color_checked = tabs_style(styles.tabs_color_checked, val);
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
<template>
|
||||
<div class="setting-content">
|
||||
<template v-if="type == '1'">
|
||||
<model-article-tabs-content :value="value.content" :tab-style="value.style"></model-article-tabs-content>
|
||||
<model-article-tabs-content :value="value.content" :tab-style="value.style" :default-config="data_config"></model-article-tabs-content>
|
||||
</template>
|
||||
<template v-else-if="type == '2'">
|
||||
<model-article-tabs-styles :value="value.style" :content="value.content"></model-article-tabs-styles>
|
||||
<model-article-tabs-styles :value="value.style" :content="value.content" :default-config="data_config"></model-article-tabs-styles>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -19,4 +19,9 @@ const props = defineProps({
|
|||
default: () => ({}),
|
||||
},
|
||||
});
|
||||
const data_config = reactive({
|
||||
// 图片不同风格下的圆角
|
||||
img_radius_0: 4,
|
||||
img_radius_1: 0,
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -67,6 +67,14 @@ const props = defineProps({
|
|||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
defaultConfig: {
|
||||
type: Object,
|
||||
default: () => ({
|
||||
// 图片不同风格下的圆角
|
||||
img_radius_0: 4,
|
||||
img_radius_1: 0,
|
||||
}),
|
||||
},
|
||||
});
|
||||
// 默认值
|
||||
const state = reactive({
|
||||
|
|
@ -76,6 +84,23 @@ const state = reactive({
|
|||
// 如果需要解构,确保使用toRefs
|
||||
const { form, data } = toRefs(state);
|
||||
const theme = computed(() => data.value.theme);
|
||||
if (theme.value == '0') {
|
||||
if (form.value.img_radius.radius == props.defaultConfig.img_radius_0 || (form.value.img_radius.radius_bottom_left == props.defaultConfig.img_radius_1 && form.value.img_radius.radius_bottom_right == props.defaultConfig.img_radius_1 && form.value.img_radius.radius_top_left == props.defaultConfig.img_radius_1 && form.value.img_radius.radius_top_right == props.defaultConfig.img_radius_1)) {
|
||||
form.value.img_radius.radius = props.defaultConfig.img_radius_0;
|
||||
form.value.img_radius.radius_bottom_left = props.defaultConfig.img_radius_0;
|
||||
form.value.img_radius.radius_bottom_right = props.defaultConfig.img_radius_0;
|
||||
form.value.img_radius.radius_top_left = props.defaultConfig.img_radius_0;
|
||||
form.value.img_radius.radius_top_right = props.defaultConfig.img_radius_0;
|
||||
}
|
||||
} else {
|
||||
if (form.value.img_radius.radius == props.defaultConfig.img_radius_0 || (form.value.img_radius.radius_bottom_left == props.defaultConfig.img_radius_1 && form.value.img_radius.radius_bottom_right == props.defaultConfig.img_radius_1 && form.value.img_radius.radius_top_left == props.defaultConfig.img_radius_1 && form.value.img_radius.radius_top_right == props.defaultConfig.img_radius_1)) {
|
||||
form.value.img_radius.radius = props.defaultConfig.img_radius_1;
|
||||
form.value.img_radius.radius_bottom_left = props.defaultConfig.img_radius_1;
|
||||
form.value.img_radius.radius_bottom_right = props.defaultConfig.img_radius_1;
|
||||
form.value.img_radius.radius_top_left = props.defaultConfig.img_radius_1;
|
||||
form.value.img_radius.radius_top_right = props.defaultConfig.img_radius_1;
|
||||
}
|
||||
}
|
||||
const font_weight = reactive([
|
||||
{ name: '加粗', value: '500' },
|
||||
{ name: '正常', value: '400' },
|
||||
|
|
|
|||
|
|
@ -73,10 +73,10 @@ const rect_style = computed(() => {
|
|||
.hot {
|
||||
min-height: 1rem;
|
||||
.hot_box {
|
||||
background: rgba(42, 148, 255, 0.25);
|
||||
border: 1px dashed #8ec6ff;
|
||||
background: rgba(42, 148, 255, 0.15);
|
||||
border: 1px dashed rgba(142, 198, 255, 0.5);
|
||||
position: absolute;
|
||||
opacity: 0.6;
|
||||
opacity: 0.4;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -67,12 +67,25 @@ const props = defineProps({
|
|||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
styles: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
defaultConfig: {
|
||||
type: Object,
|
||||
default: () => ({
|
||||
// 图片不同风格下的圆角
|
||||
img_radius_0: 4,
|
||||
img_radius_1: 0,
|
||||
}),
|
||||
},
|
||||
});
|
||||
const state = reactive({
|
||||
form: props.value,
|
||||
data: props.styles,
|
||||
});
|
||||
// 如果需要解构,确保使用toRefs
|
||||
const { form } = toRefs(state);
|
||||
const { form, data } = toRefs(state);
|
||||
|
||||
const base_list = reactive({
|
||||
product_style_list: [
|
||||
|
|
@ -159,6 +172,23 @@ const change_style = (val: any): void => {
|
|||
form.value.shop_type = 'text';
|
||||
}
|
||||
}
|
||||
if (['0', '4'].includes(val)) {
|
||||
if (data.value.shop_img_radius.radius == props.defaultConfig.img_radius_0 || (data.value.shop_img_radius.radius_bottom_left == props.defaultConfig.img_radius_1 && data.value.shop_img_radius.radius_bottom_right == props.defaultConfig.img_radius_1 && data.value.shop_img_radius.radius_top_left == props.defaultConfig.img_radius_1 && data.value.shop_img_radius.radius_top_right == props.defaultConfig.img_radius_1)) {
|
||||
data.value.shop_img_radius.radius = props.defaultConfig.img_radius_0;
|
||||
data.value.shop_img_radius.radius_bottom_left = props.defaultConfig.img_radius_0;
|
||||
data.value.shop_img_radius.radius_bottom_right = props.defaultConfig.img_radius_0;
|
||||
data.value.shop_img_radius.radius_top_left = props.defaultConfig.img_radius_0;
|
||||
data.value.shop_img_radius.radius_top_right = props.defaultConfig.img_radius_0;
|
||||
}
|
||||
} else {
|
||||
if (data.value.shop_img_radius.radius == props.defaultConfig.img_radius_0 || (data.value.shop_img_radius.radius_bottom_left == props.defaultConfig.img_radius_1 && data.value.shop_img_radius.radius_bottom_right == props.defaultConfig.img_radius_1 && data.value.shop_img_radius.radius_top_left == props.defaultConfig.img_radius_1 && data.value.shop_img_radius.radius_top_right == props.defaultConfig.img_radius_1)) {
|
||||
data.value.shop_img_radius.radius = props.defaultConfig.img_radius_1;
|
||||
data.value.shop_img_radius.radius_bottom_left = props.defaultConfig.img_radius_1;
|
||||
data.value.shop_img_radius.radius_bottom_right = props.defaultConfig.img_radius_1;
|
||||
data.value.shop_img_radius.radius_top_left = props.defaultConfig.img_radius_1;
|
||||
data.value.shop_img_radius.radius_top_right = props.defaultConfig.img_radius_1;
|
||||
}
|
||||
}
|
||||
};
|
||||
const is_revise = ref(false);
|
||||
const change_shop_type = () => {
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
<template>
|
||||
<div class="auxiliary-line-setting">
|
||||
<template v-if="type == '1'">
|
||||
<model-shop-list-content :value="value.content"></model-shop-list-content>
|
||||
<model-shop-list-content :value="value.content" :styles="value.style" :default-config="data_config"></model-shop-list-content>
|
||||
</template>
|
||||
<template v-if="type == '2'">
|
||||
<model-shop-list-styles :value="value.style" :content="value.content"></model-shop-list-styles>
|
||||
<model-shop-list-styles :value="value.style" :content="value.content" :default-config="data_config"></model-shop-list-styles>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -19,6 +19,11 @@ const props = defineProps({
|
|||
default: () => ({}),
|
||||
},
|
||||
});
|
||||
const data_config = reactive({
|
||||
// 图片不同风格下的圆角
|
||||
img_radius_0: 4,
|
||||
img_radius_1: 0,
|
||||
});
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.auxiliary-line-setting {
|
||||
|
|
|
|||
|
|
@ -21,14 +21,14 @@
|
|||
<color-picker v-model="form.shop_score_color" default-color="#000000"></color-picker>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="内容圆角">
|
||||
<radius :value="form.shop_radius" @update:value="shop_radius_change"></radius>
|
||||
<radius :value="form.shop_radius"></radius>
|
||||
</el-form-item>
|
||||
<template v-if="theme != '6'">
|
||||
<el-form-item label="图片圆角">
|
||||
<radius :value="form.shop_img_radius" @update:value="img_radius_change"></radius>
|
||||
<radius :value="form.shop_img_radius"></radius>
|
||||
</el-form-item>
|
||||
<el-form-item label="内间距">
|
||||
<padding :value="form.shop_padding" @update:value="shop_padding_change"></padding>
|
||||
<padding :value="form.shop_padding"></padding>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="['0', '4'].includes(theme)" label="内容间距">
|
||||
<slider v-model="form.content_spacing" :max="100"></slider>
|
||||
|
|
@ -76,50 +76,46 @@ const props = defineProps({
|
|||
content: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
}
|
||||
},
|
||||
defaultConfig: {
|
||||
type: Object,
|
||||
default: () => ({
|
||||
// 图片不同风格下的圆角
|
||||
img_radius_0: 4,
|
||||
img_radius_1: 0,
|
||||
}),
|
||||
},
|
||||
});
|
||||
|
||||
// 默认值
|
||||
const state = reactive({
|
||||
form: props.value,
|
||||
data: props.content
|
||||
data: props.content,
|
||||
});
|
||||
// 如果需要解构,确保使用toRefs
|
||||
const { form, data } = toRefs(state);
|
||||
|
||||
const theme = computed(() => data.value.theme);
|
||||
|
||||
if (['0', '4'].includes(theme.value)) {
|
||||
if (form.value.shop_img_radius.radius == props.defaultConfig.img_radius_0 || (form.value.shop_img_radius.radius_bottom_left == props.defaultConfig.img_radius_1 && form.value.shop_img_radius.radius_bottom_right == props.defaultConfig.img_radius_1 && form.value.shop_img_radius.radius_top_left == props.defaultConfig.img_radius_1 && form.value.shop_img_radius.radius_top_right == props.defaultConfig.img_radius_1)) {
|
||||
form.value.shop_img_radius.radius = props.defaultConfig.img_radius_0;
|
||||
form.value.shop_img_radius.radius_bottom_left = props.defaultConfig.img_radius_0;
|
||||
form.value.shop_img_radius.radius_bottom_right = props.defaultConfig.img_radius_0;
|
||||
form.value.shop_img_radius.radius_top_left = props.defaultConfig.img_radius_0;
|
||||
form.value.shop_img_radius.radius_top_right = props.defaultConfig.img_radius_0;
|
||||
}
|
||||
} else {
|
||||
if (form.value.shop_img_radius.radius == props.defaultConfig.img_radius_0 || (form.value.shop_img_radius.radius_bottom_left == props.defaultConfig.img_radius_1 && form.value.shop_img_radius.radius_bottom_right == props.defaultConfig.img_radius_1 && form.value.shop_img_radius.radius_top_left == props.defaultConfig.img_radius_1 && form.value.shop_img_radius.radius_top_right == props.defaultConfig.img_radius_1)) {
|
||||
form.value.shop_img_radius.radius = props.defaultConfig.img_radius_1;
|
||||
form.value.shop_img_radius.radius_bottom_left = props.defaultConfig.img_radius_1;
|
||||
form.value.shop_img_radius.radius_bottom_right = props.defaultConfig.img_radius_1;
|
||||
form.value.shop_img_radius.radius_top_left = props.defaultConfig.img_radius_1;
|
||||
form.value.shop_img_radius.radius_top_right = props.defaultConfig.img_radius_1;
|
||||
}
|
||||
}
|
||||
const common_style_update = (value: any) => {
|
||||
form.value.common_style = value;
|
||||
};
|
||||
const shop_padding_change = (padding: any) => {
|
||||
form.value.shop_padding = Object.assign(form.value.shop_padding, pick(padding, [
|
||||
'padding',
|
||||
'padding_top',
|
||||
'padding_bottom',
|
||||
'padding_left',
|
||||
'padding_right'
|
||||
]));
|
||||
}
|
||||
// 内容圆角
|
||||
const shop_radius_change = (radius: any) => {
|
||||
form.value.shop_radius = Object.assign(form.value.shop_radius, pick(radius, [
|
||||
'radius',
|
||||
'radius_top_left',
|
||||
'radius_top_right',
|
||||
'radius_bottom_left',
|
||||
'radius_bottom_right',
|
||||
]));
|
||||
}
|
||||
const img_radius_change = (radius: any) => {
|
||||
form.value.shop_img_radius = Object.assign(form.value.shop_img_radius, pick(radius, [
|
||||
'radius',
|
||||
'radius_top_left',
|
||||
'radius_top_right',
|
||||
'radius_bottom_left',
|
||||
'radius_bottom_right',
|
||||
]));
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.topic {
|
||||
|
|
|
|||
|
|
@ -96,7 +96,15 @@ const props = defineProps({
|
|||
tabStyle: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
}
|
||||
},
|
||||
defaultConfig: {
|
||||
type: Object,
|
||||
default: () => ({
|
||||
// 图片不同风格下的圆角
|
||||
img_radius_0: 4,
|
||||
img_radius_1: 0,
|
||||
}),
|
||||
},
|
||||
});
|
||||
const state = reactive({
|
||||
form: props.value,
|
||||
|
|
@ -223,7 +231,7 @@ const url_value_dialog_call_back = (item: any[]) => {
|
|||
});
|
||||
};
|
||||
|
||||
const tabs_theme_change = (val: string | number | boolean | undefined):void => {
|
||||
const tabs_theme_change = (val: string | number | boolean | undefined): void => {
|
||||
styles.value.tabs_color_checked = tabs_style(styles.value.tabs_color_checked, val);
|
||||
};
|
||||
// 选择某些风格时, 切换到对应的按钮
|
||||
|
|
@ -236,6 +244,23 @@ const change_style = (val: any): void => {
|
|||
form.value.shop_type = 'text';
|
||||
}
|
||||
}
|
||||
if (['0', '4'].includes(val)) {
|
||||
if (styles.value.shop_img_radius.radius == props.defaultConfig.img_radius_0 || (styles.value.shop_img_radius.radius_bottom_left == props.defaultConfig.img_radius_1 && styles.value.shop_img_radius.radius_bottom_right == props.defaultConfig.img_radius_1 && styles.value.shop_img_radius.radius_top_left == props.defaultConfig.img_radius_1 && styles.value.shop_img_radius.radius_top_right == props.defaultConfig.img_radius_1)) {
|
||||
styles.value.shop_img_radius.radius = props.defaultConfig.img_radius_0;
|
||||
styles.value.shop_img_radius.radius_bottom_left = props.defaultConfig.img_radius_0;
|
||||
styles.value.shop_img_radius.radius_bottom_right = props.defaultConfig.img_radius_0;
|
||||
styles.value.shop_img_radius.radius_top_left = props.defaultConfig.img_radius_0;
|
||||
styles.value.shop_img_radius.radius_top_right = props.defaultConfig.img_radius_0;
|
||||
}
|
||||
} else {
|
||||
if (styles.value.shop_img_radius.radius == props.defaultConfig.img_radius_0 || (styles.value.shop_img_radius.radius_bottom_left == props.defaultConfig.img_radius_1 && styles.value.shop_img_radius.radius_bottom_right == props.defaultConfig.img_radius_1 && styles.value.shop_img_radius.radius_top_left == props.defaultConfig.img_radius_1 && styles.value.shop_img_radius.radius_top_right == props.defaultConfig.img_radius_1)) {
|
||||
styles.value.shop_img_radius.radius = props.defaultConfig.img_radius_1;
|
||||
styles.value.shop_img_radius.radius_bottom_left = props.defaultConfig.img_radius_1;
|
||||
styles.value.shop_img_radius.radius_bottom_right = props.defaultConfig.img_radius_1;
|
||||
styles.value.shop_img_radius.radius_top_left = props.defaultConfig.img_radius_1;
|
||||
styles.value.shop_img_radius.radius_top_right = props.defaultConfig.img_radius_1;
|
||||
}
|
||||
}
|
||||
};
|
||||
const is_revise = ref(false);
|
||||
const change_shop_type = () => {
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
<template>
|
||||
<div class="auxiliary-line-setting">
|
||||
<template v-if="type == '1'">
|
||||
<model-shop-tabs-content :value="value.content" :tab-style="value.style"></model-shop-tabs-content>
|
||||
<model-shop-tabs-content :value="value.content" :tab-style="value.style" :default-config="data_config"></model-shop-tabs-content>
|
||||
</template>
|
||||
<template v-if="type == '2'">
|
||||
<model-shop-tabs-styles :value="value.style" :content="value.content"></model-shop-tabs-styles>
|
||||
<model-shop-tabs-styles :value="value.style" :content="value.content" :default-config="data_config"></model-shop-tabs-styles>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -19,6 +19,11 @@ const props = defineProps({
|
|||
default: () => ({}),
|
||||
},
|
||||
});
|
||||
const data_config = reactive({
|
||||
// 图片不同风格下的圆角
|
||||
img_radius_0: 4,
|
||||
img_radius_1: 0,
|
||||
});
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.auxiliary-line-setting {
|
||||
|
|
|
|||
|
|
@ -27,14 +27,14 @@
|
|||
</el-form-item>
|
||||
</template>
|
||||
<el-form-item label="内容圆角">
|
||||
<radius :value="form.shop_radius" @update:value="shop_radius_change"></radius>
|
||||
<radius :value="form.shop_radius"></radius>
|
||||
</el-form-item>
|
||||
<template v-if="theme != '6'">
|
||||
<el-form-item label="图片圆角">
|
||||
<radius :value="form.shop_img_radius" @update:value="img_radius_change"></radius>
|
||||
<radius :value="form.shop_img_radius"></radius>
|
||||
</el-form-item>
|
||||
<el-form-item label="内间距">
|
||||
<padding :value="form.shop_padding" @update:value="shop_padding_change"></padding>
|
||||
<padding :value="form.shop_padding"></padding>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="['0', '4'].includes(theme)" label="内容间距">
|
||||
<slider v-model="form.content_spacing" :max="100"></slider>
|
||||
|
|
@ -88,52 +88,46 @@ const props = defineProps({
|
|||
content: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
}
|
||||
},
|
||||
defaultConfig: {
|
||||
type: Object,
|
||||
default: () => ({
|
||||
// 图片不同风格下的圆角
|
||||
img_radius_0: 4,
|
||||
img_radius_1: 0,
|
||||
}),
|
||||
},
|
||||
});
|
||||
|
||||
// 默认值
|
||||
const state = reactive({
|
||||
form: props.value,
|
||||
data: props.content
|
||||
data: props.content,
|
||||
});
|
||||
// 如果需要解构,确保使用toRefs
|
||||
const { form, data } = toRefs(state);
|
||||
|
||||
const theme = computed(() => data.value.theme);
|
||||
|
||||
if (['0', '4'].includes(theme.value)) {
|
||||
if (form.value.shop_img_radius.radius == props.defaultConfig.img_radius_0 || (form.value.shop_img_radius.radius_bottom_left == props.defaultConfig.img_radius_1 && form.value.shop_img_radius.radius_bottom_right == props.defaultConfig.img_radius_1 && form.value.shop_img_radius.radius_top_left == props.defaultConfig.img_radius_1 && form.value.shop_img_radius.radius_top_right == props.defaultConfig.img_radius_1)) {
|
||||
form.value.shop_img_radius.radius = props.defaultConfig.img_radius_0;
|
||||
form.value.shop_img_radius.radius_bottom_left = props.defaultConfig.img_radius_0;
|
||||
form.value.shop_img_radius.radius_bottom_right = props.defaultConfig.img_radius_0;
|
||||
form.value.shop_img_radius.radius_top_left = props.defaultConfig.img_radius_0;
|
||||
form.value.shop_img_radius.radius_top_right = props.defaultConfig.img_radius_0;
|
||||
}
|
||||
} else {
|
||||
if (form.value.shop_img_radius.radius == props.defaultConfig.img_radius_0 || (form.value.shop_img_radius.radius_bottom_left == props.defaultConfig.img_radius_1 && form.value.shop_img_radius.radius_bottom_right == props.defaultConfig.img_radius_1 && form.value.shop_img_radius.radius_top_left == props.defaultConfig.img_radius_1 && form.value.shop_img_radius.radius_top_right == props.defaultConfig.img_radius_1)) {
|
||||
form.value.shop_img_radius.radius = props.defaultConfig.img_radius_1;
|
||||
form.value.shop_img_radius.radius_bottom_left = props.defaultConfig.img_radius_1;
|
||||
form.value.shop_img_radius.radius_bottom_right = props.defaultConfig.img_radius_1;
|
||||
form.value.shop_img_radius.radius_top_left = props.defaultConfig.img_radius_1;
|
||||
form.value.shop_img_radius.radius_top_right = props.defaultConfig.img_radius_1;
|
||||
}
|
||||
}
|
||||
const common_style_update = (value: any) => {
|
||||
form.value.common_style = value;
|
||||
};
|
||||
// 内容圆角
|
||||
const shop_radius_change = (radius: any) => {
|
||||
form.value.shop_radius = Object.assign(form.value.shop_radius, pick(radius, [
|
||||
'radius',
|
||||
'radius_top_left',
|
||||
'radius_top_right',
|
||||
'radius_bottom_left',
|
||||
'radius_bottom_right',
|
||||
]));
|
||||
}
|
||||
|
||||
const img_radius_change = (radius: any) => {
|
||||
form.value.shop_img_radius = Object.assign(form.value.shop_img_radius, pick(radius, [
|
||||
'radius',
|
||||
'radius_top_left',
|
||||
'radius_top_right',
|
||||
'radius_bottom_left',
|
||||
'radius_bottom_right',
|
||||
]));
|
||||
}
|
||||
|
||||
const shop_padding_change = (padding: any) => {
|
||||
form.value.shop_padding = Object.assign(form.value.shop_padding, pick(padding, [
|
||||
'padding',
|
||||
'padding_top',
|
||||
'padding_bottom',
|
||||
'padding_left',
|
||||
'padding_right'
|
||||
]));
|
||||
}
|
||||
|
||||
const tabs_checked_event = (arry: string[], type: number) => {
|
||||
form.value.tabs_checked = arry;
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ interface DefaultArticleList {
|
|||
}
|
||||
const defaultArticleList: DefaultArticleList = {
|
||||
content: {
|
||||
theme: '1',
|
||||
theme: '0',
|
||||
data_type: '0',
|
||||
category: [],
|
||||
data_list: [],
|
||||
|
|
@ -71,13 +71,13 @@ const defaultArticleList: DefaultArticleList = {
|
|||
radius_bottom_left: 8,
|
||||
radius_bottom_right: 8,
|
||||
},
|
||||
// 图片圆角
|
||||
// 图片圆角 ---- 除了风格一圆角是4,其他都是0
|
||||
img_radius: {
|
||||
radius: 0,
|
||||
radius_top_left: 0,
|
||||
radius_top_right: 0,
|
||||
radius_bottom_left: 0,
|
||||
radius_bottom_right: 0,
|
||||
radius: 4,
|
||||
radius_top_left: 4,
|
||||
radius_top_right: 4,
|
||||
radius_bottom_left: 4,
|
||||
radius_bottom_right: 4,
|
||||
},
|
||||
// 内间距
|
||||
padding: {
|
||||
|
|
|
|||
|
|
@ -94,13 +94,13 @@ const defaultArticleTabs: DefaultArticleTabs = {
|
|||
radius_bottom_left: 8,
|
||||
radius_bottom_right: 8,
|
||||
},
|
||||
// 图片圆角
|
||||
// 图片圆角 ---- 除了风格一圆角是4,其他都是0
|
||||
img_radius: {
|
||||
radius: 0,
|
||||
radius_top_left: 0,
|
||||
radius_top_right: 0,
|
||||
radius_bottom_left: 0,
|
||||
radius_bottom_right: 0,
|
||||
radius: 4,
|
||||
radius_top_left: 4,
|
||||
radius_top_right: 4,
|
||||
radius_bottom_left: 4,
|
||||
radius_bottom_right: 4,
|
||||
},
|
||||
// 内间距
|
||||
padding: {
|
||||
|
|
@ -114,7 +114,7 @@ const defaultArticleTabs: DefaultArticleTabs = {
|
|||
article_spacing: 10, // 文章间距
|
||||
article_width: 155, // 文章宽度
|
||||
article_height: 155, // 文章宽度
|
||||
common_style: { ...defaultCommon, padding:10, padding_top:10, padding_left: 10, padding_right: 10, padding_bottom: 10 },
|
||||
common_style: { ...defaultCommon, padding: 10, padding_top: 10, padding_left: 10, padding_right: 10, padding_bottom: 10 },
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import defaultCommon from './index';
|
||||
import { online_url } from '@/utils';
|
||||
|
||||
let new_url = await online_url();
|
||||
const new_url = online_url();
|
||||
|
||||
interface DefaultFooterNav {
|
||||
content: {
|
||||
|
|
|
|||
|
|
@ -172,7 +172,6 @@ watch(
|
|||
() => props.diyData,
|
||||
(newValue) => {
|
||||
diy_data.value = newValue;
|
||||
console.log(newValue);
|
||||
}
|
||||
);
|
||||
// 监听
|
||||
|
|
|
|||
|
|
@ -315,11 +315,19 @@ export const tabs_style = (color: string, style: string | number | boolean | und
|
|||
return color;
|
||||
}
|
||||
};
|
||||
// 在线地址
|
||||
/**
|
||||
* 获取在线资源URL的异步函数
|
||||
* 该函数根据当前环境变量的配置选择不同的方式来获取资源URL
|
||||
* 如果环境变量VITE_APP_BASE_API被设置为'/dev-api',则从本地开发环境中导入临时数据
|
||||
* 否则,从cookie中获取资源主机地址
|
||||
* 这种设计允许开发者在不同的环境中灵活切换资源URL的来源,以适应不同的开发和生产需求
|
||||
*
|
||||
* @returns {Promise<string>} 返回一个Promise,解析为包含资源URL的字符串
|
||||
*/
|
||||
export const online_url = async () => {
|
||||
if (import.meta.env.VITE_APP_BASE_API == '/dev-api') {
|
||||
let temp_value = await import('../../temp.d');
|
||||
return temp_value.default.temp_attachment_host + '/static/app/tabbar/';
|
||||
let temp_data = await import(import.meta.env.VITE_APP_BASE_API == '/dev-api' ? '../../temp.d' : '../../temp_pro.d');
|
||||
return temp_data.default.temp_attachment_host + '/static/app/tabbar/';
|
||||
} else {
|
||||
return (await get_cookie('temp_attachment_host')) + '/static/app/tabbar/';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,13 +9,14 @@ const service = axios.create({
|
|||
timeout: 50000,
|
||||
headers: { 'Content-Type': 'application/json;charset=utf-8' },
|
||||
});
|
||||
/** @ts-ignore */
|
||||
// 请求拦截器
|
||||
service.interceptors.request.use(
|
||||
async (config: InternalAxiosRequestConfig) => {
|
||||
// 如果是本地则使用静态tonken如果是线上则使用cookie的token
|
||||
const cookie = get_cookie('admin_info');
|
||||
if (import.meta.env.VITE_APP_BASE_API == '/dev-api') {
|
||||
let temp_data = await import('../../temp.d');
|
||||
let temp_data = await import(import.meta.env.VITE_APP_BASE_API == '/dev-api' ? '../../temp.d' : '../../temp_pro.d');
|
||||
config.url = config.url + '?token=' + temp_data.default.temp_token;
|
||||
} else {
|
||||
if (cookie) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue