r~^h>zt}RcD+;G$8L1$09cJvFTiFwbp>p;Q-8p2
za_SV=9H*W^(&p+!)IP9zPK^YMzgpB%uv(|)g5BcOX0Z8A4F`*FOw@X?1x`%}Tj(g)
z{#K{Hge^Kp@4rF^w>dQ{>^o{(*zHaY3|s2d$}k0FM5XpWbZT$dolcDoi}50Ad031i
zQS-xM;ECEGc6VHV1)n-176VVz8?hM8qArQWXcqNLt(Q~h#8x==A$u{BPO8hhBOWn*idnm6`{Qya(D
zIW=@_y;Ez)RE&~wLyb;0I`w<3&Z+Zb^-ePY*5EV^V2?V@1=uF12?2Y|X;#2CJ53GP
z<4*Gfw#8|ZQ2sxm6VXtCZFL$iuqT}c4eTkWkptW2G<;y&oyHLCX{Uh%+u<~tU^|_L
z6l|B%xPmr4_JY&YgEczMKiG>djk#X;HLcAC5R
zR1Xws0!t)Toul`!^wFm=F*tENWm)TKt&gQvw8?AJkXDhlEbVw(+P1VC)oyLOW9=um
zuS+jY-;~~*QJS$JV^@bY9S(Hd)bXv3-*hVIRMY7|r*|_mGK({(XRgjX(wWZro!53g
zo|Tm~FKctwJ6*E6OzX0{%hz3JcRk(hqHZ(0z1zL8`wiLsvmeY(?#TX6PWPPhoSK}~
zIgL3dFSz%DGd*VX*wo`>Zdq-I@BO_`g1Umw`xf=B?%Ps0xNu3~$$qu{8v4E0zqvE4Gfz7`c4p=~3%Oof+LySz5Wga`PC*
z%p9|~Dyyods=4aFV=KqrJN8udoa)`xpNyM6?!frU@khp=olrbs$%I!Yd^xdj;+jeQ
zC*3pY#N_O%$qOc*n9_dAoGBkpT`~3erN^cfPpiAE{bk3RhIP%|kvQ6PRdZb;K~w(W
H^={{ item }}{{ form.data_source_direction == 'vertical-scroll' ? '行' : '列' }}展示
-
-
-
- 自定义设置
- 自定义编辑
+
+
+
diff --git a/src/components/model-custom/components/index-default.ts b/src/components/model-custom/components/index-default.ts
index e22174eb..7422e9d8 100644
--- a/src/components/model-custom/components/index-default.ts
+++ b/src/components/model-custom/components/index-default.ts
@@ -224,6 +224,7 @@ const custom_group_com_data = {
custom_height: 100, // 自定义高度
data_source_direction: 'vertical', // 铺满方式
data_source_carousel_col: 1, // 铺满数量
+ is_scroll_bar: false, // 是否需要滚动条
data_style: {
...defaultCustom.style
}
diff --git a/src/components/model-custom/components/index.vue b/src/components/model-custom/components/index.vue
index 93ed94be..362387be 100644
--- a/src/components/model-custom/components/index.vue
+++ b/src/components/model-custom/components/index.vue
@@ -17,7 +17,7 @@
内容设置
- 组件高度
+ 组件高度
@@ -42,7 +42,7 @@
-
+
@@ -62,12 +62,13 @@
+
-
+
@@ -110,7 +111,7 @@
+
+
\ No newline at end of file
diff --git a/src/components/model-custom/model-custom-content.vue b/src/components/model-custom/model-custom-content.vue
index f7381513..5757dd30 100644
--- a/src/components/model-custom/model-custom-content.vue
+++ b/src/components/model-custom/model-custom-content.vue
@@ -1,5 +1,5 @@
-
+
数据源
@@ -54,10 +54,7 @@
-
- 内容设置
- 自定义编辑
-
+ 自定义编辑
@@ -538,4 +535,16 @@ watch(() => data_source_content_value.value, (new_val, old_val) => {
padding: 2.4rem 3rem;
}
}
+.custom-data {
+ background: transparent;
+}
+.custom-button {
+ position: -webkit-sticky;
+ position: sticky;
+ bottom: 0; /* 固定在底部 */
+ background-color: white; /* 设置背景色以避免按钮看不见 */
+ z-index: 1000; /* 确保按钮在其他内容之上 */
+ width: 100%; /* 确保按钮宽度占满父容器 */
+ padding: 1rem; /* 添加一些内边距 */
+}
diff --git a/src/components/model-data-magic/index.vue b/src/components/model-data-magic/index.vue
index 75a6f154..dd7a952a 100644
--- a/src/components/model-data-magic/index.vue
+++ b/src/components/model-data-magic/index.vue
@@ -273,34 +273,34 @@ const default_list = {
** @return {Array}
*/
const commodity_list = (list: any[], num: number, data_content: any, data_style: any) => {
- if (list.length > 0) {
- // 深拷贝一下,确保不会出现问题
- const goods_list = cloneDeep(list).map((item: any) => ({
- ...item.data,
- title: !isEmpty(item.new_title) ? item.new_title : item.data.title,
- new_cover: item.new_cover,
- }));
- // 存储数据显示
- let nav_list: { split_list: any[] }[] = [];
- // 如果是滑动,需要根据每行显示的个数来区分来拆分数据 translation 表示的是平移
- if (data_style.rolling_fashion != 'translation') {
- // 拆分的数量
- const split_num = Math.ceil(goods_list.length / num);
- for (let i = 0; i < split_num; i++) {
- nav_list.push({ split_list: goods_list.slice(i * num, (i + 1) * num) });
- }
- return nav_list;
- } else {
- return rotation_calculation(goods_list, num, data_content, data_style)
+ if (list.length > 0) {
+ // 深拷贝一下,确保不会出现问题
+ const goods_list = cloneDeep(list).map((item: any) => ({
+ ...item.data,
+ title: !isEmpty(item.new_title) ? item.new_title : item.data.title,
+ new_cover: item.new_cover,
+ }));
+ // 存储数据显示
+ let nav_list: { split_list: any[] }[] = [];
+ // 如果是滑动,需要根据每行显示的个数来区分来拆分数据 translation 表示的是平移
+ if (data_style.rolling_fashion != 'translation') {
+ // 拆分的数量
+ const split_num = Math.ceil(goods_list.length / num);
+ for (let i = 0; i < split_num; i++) {
+ nav_list.push({ split_list: goods_list.slice(i * num, (i + 1) * num) });
}
+ return nav_list;
} else {
- const list = Array(num).fill(default_list);
- if (data_style.rolling_fashion != 'translation') {
- return [{ split_list: list }];
- } else {
- return rotation_calculation(list, num, data_content, data_style)
- }
+ return rotation_calculation(goods_list, num, data_content, data_style)
}
+ } else {
+ const list = Array(num).fill(default_list);
+ if (data_style.rolling_fashion != 'translation') {
+ return [{ split_list: list }];
+ } else {
+ return rotation_calculation(list, num, data_content, data_style)
+ }
+ }
}
const rotation_calculation = (list: Array
, num: number, data_content: any, data_style: any) => {
diff --git a/src/components/model-float-window/model-float-window-content.vue b/src/components/model-float-window/model-float-window-content.vue
index 56ffa3d0..58209529 100644
--- a/src/components/model-float-window/model-float-window-content.vue
+++ b/src/components/model-float-window/model-float-window-content.vue
@@ -7,6 +7,7 @@
页面链接
客服入口
+ 快捷导航
diff --git a/src/store/modules/custom.ts b/src/store/modules/custom.ts
index 851de64c..f835be17 100644
--- a/src/store/modules/custom.ts
+++ b/src/store/modules/custom.ts
@@ -18,6 +18,12 @@ export const DataSourceStore = defineStore('dataSource', () => {
const is_data_source_api = ref(false);
// 数据源
const data_source_list = ref([]);
+ // 自定义历史记录
+ const custom_records_index = ref(-1);
+ const custom_records = ref([]);
+ // 自定义组历史记录
+ const custom_group_records_index = ref(-1);
+ const custom_group_records = ref([]);
// 存储上传分类列表
const set_data_source = (data_source_content: data_source_content[]) => {
data_source_list.value = data_source_content;
@@ -31,13 +37,34 @@ export const DataSourceStore = defineStore('dataSource', () => {
const set_is_children_custom = (bool: boolean) => {
is_children_custom.value = bool;
};
-
+ // 设置自定义的历史数据
+ const set_custom_records_index = (index: number) => {
+ custom_records_index.value = index;
+ };
+ const set_custom_records = (records: any[]) => {
+ custom_records.value = records;
+ };
+ // 设置自定义组的历史数据
+ const set_custom_group_records_index = (index: number) => {
+ custom_group_records_index.value = index;
+ };
+ const set_custom_group_records = (records: any[]) => {
+ custom_group_records.value = records;
+ };
return {
+ custom_records,
+ custom_group_records,
+ custom_records_index,
+ custom_group_records_index,
is_children_custom,
data_source_list,
is_data_source_api,
set_data_source,
set_is_data_source_api,
set_is_children_custom,
+ set_custom_records,
+ set_custom_records_index,
+ set_custom_group_records,
+ set_custom_group_records_index,
};
});
diff --git a/src/utils/index.ts b/src/utils/index.ts
index 26407477..7115e38d 100644
--- a/src/utils/index.ts
+++ b/src/utils/index.ts
@@ -835,4 +835,29 @@ export const getPlatform = () => {
}
return 'Unknown';
+}
+
+/**
+ * 格式化日期为指定格式的时间字符串
+ *
+ * @param date 日期对象
+ * @param format 格式化字符串,默认为 'YYYY-MM-DD HH:mm:ss'
+ * @returns 格式化后的时间字符串
+ */
+export function formatDate(format: string = 'YYYY-MM-DD HH:mm:ss'): string {
+ const date = new Date();
+ const year = String(date.getFullYear());
+ const month = String(date.getMonth() + 1).padStart(2, '0');
+ const day = String(date.getDate()).padStart(2, '0');
+ const hours = String(date.getHours()).padStart(2, '0');
+ const minutes = String(date.getMinutes()).padStart(2, '0');
+ const seconds = String(date.getSeconds()).padStart(2, '0');
+
+ return format
+ .replace('YYYY', year)
+ .replace('MM', month)
+ .replace('DD', day)
+ .replace('HH', hours)
+ .replace('mm', minutes)
+ .replace('ss', seconds);
}
\ No newline at end of file
diff --git a/src/views/layout/components/settings/index.vue b/src/views/layout/components/settings/index.vue
index 20bd881d..f760703f 100644
--- a/src/views/layout/components/settings/index.vue
+++ b/src/views/layout/components/settings/index.vue
@@ -8,7 +8,7 @@
样式
-
+
@@ -155,7 +155,6 @@ const radio = ref('1'); // 创建一个响应式的数字变量,初始值为0
.setting-content {
height: calc(100vh - 14.8rem);
overflow: auto;
- background-color: #fff;
}
:deep(.el-input-number) {
width: 100%;