@@ -45,7 +45,7 @@
{{ item.data_content.subtitle || '' }}
-
+
@@ -254,6 +254,9 @@ watch(props.value.content, (val) => {
data_style.indicator_styles = indicator_style(data_style);
data_style.background_style = gradient_computer(data_style);
data_style.background_img_style = background_computer(data_style);
+ // 商品名称和价格样式
+ data_style.goods_title_style = goods_trends_config(item.data_style, 'title');
+ data_style.goods_price_style = goods_trends_config(item.data_style, 'price');
const { is_roll, rotation_direction, interval_time } = data_style;
const { goods_list, images_list } = data_content;
@@ -296,6 +299,9 @@ const carousel_change = (index: number, key: number) => {
}
}
// 根据传递的参数,从对象中取值
+const goods_trends_config = (style: any, key: string) => {
+ return text_style(style[`goods_${key}_typeface`], style[`goods_${key}_size`], style[`goods_${key}_color`]);
+}
const trends_config = (style: any, key: string) => {
return text_style(style[`${key}_typeface`], style[`${key}_size`], style[`${key}_color`]);
}
diff --git a/src/components/model-data-magic/model-data-magic-content.vue b/src/components/model-data-magic/model-data-magic-content.vue
index b65cbb6a..e3705521 100644
--- a/src/components/model-data-magic/model-data-magic-content.vue
+++ b/src/components/model-data-magic/model-data-magic-content.vue
@@ -70,6 +70,12 @@ const data_style = {
subtitle_color: '#FF852A',
subtitle_typeface: '400',
subtitle_size: 14,
+ goods_title_typeface: '500',
+ goods_title_size: 14,
+ goods_title_color: "#333333",
+ goods_price_typeface: '500',
+ goods_price_size: 18,
+ goods_price_color: "#EA3323;",
chunk_padding: {
padding: 0,
padding_top: 20,
diff --git a/src/views/layout/components/main/index.vue b/src/views/layout/components/main/index.vue
index 812aee82..1ae50ce3 100644
--- a/src/views/layout/components/main/index.vue
+++ b/src/views/layout/components/main/index.vue
@@ -181,16 +181,19 @@ watchEffect(() => {
// 已选组件逻辑处理
const drawer_selected = ref(false);
+const is_show_drawer = ref(true);
watchEffect(() => {
- if (diy_data.value.length > 0 || tabs_data.value.length > 0) {
+ if ((diy_data.value.length > 0 || tabs_data.value.length > 0) && is_show_drawer.value) {
drawer_selected.value = true;
} else {
drawer_selected.value = false;
}
});
const toggle_drawer = () => {
+ is_show_drawer.value = !is_show_drawer.value;
drawer_selected.value = !drawer_selected.value;
};
+
// 父组件调用的方法
const emits = defineEmits(['rightUpdate', 'import', 'export', 'clear']);
const activeNames = reactive(['base', 'plugins', 'tool']);