diff --git a/src/api/diy.ts b/src/api/diy.ts index c6b507b4..3d819fbf 100644 --- a/src/api/diy.ts +++ b/src/api/diy.ts @@ -52,6 +52,7 @@ export interface headerAndFooter { com_data: any; } export interface diyConfig { + tabs_data: Array; diy_data: Array; footer: headerAndFooter; header: headerAndFooter; diff --git a/src/components/base/color-picker/index.vue b/src/components/base/color-picker/index.vue index 9d806667..d64a8e4a 100644 --- a/src/components/base/color-picker/index.vue +++ b/src/components/base/color-picker/index.vue @@ -18,7 +18,6 @@ const props = withDefaults(defineProps(), { const color = defineModel({ type: String }); const reset_event = () => { - console.log(1); if (color.value == props.defaultColor) { return; } else { diff --git a/src/components/common/div-content/index.vue b/src/components/common/div-content/index.vue index 42e2b2c4..ba2b6c8c 100644 --- a/src/components/common/div-content/index.vue +++ b/src/components/common/div-content/index.vue @@ -3,7 +3,7 @@
- +
@@ -104,17 +104,17 @@ diff --git a/src/views/layout/index.vue b/src/views/layout/index.vue index 314422fb..cc28eec1 100644 --- a/src/views/layout/index.vue +++ b/src/views/layout/index.vue @@ -4,7 +4,7 @@ @@ -36,6 +36,7 @@ interface diy_data_item { }; header: headerAndFooter; footer: headerAndFooter; + tabs_data: Array; diy_data: Array; } const temp_form = ref({ @@ -58,6 +59,7 @@ const temp_form = ref({ key: 'footer-nav', com_data: defaultSettings.footer_nav, }, + tabs_data: [], diy_data: [], }); const form = ref({ @@ -80,17 +82,19 @@ const form = ref({ key: 'footer-nav', com_data: {}, }, + tabs_data: [], diy_data: [], }); const diy_data_item = ref({}); const key = ref(''); -const right_update = (item: any, diy: [Array], header: headerAndFooter, footer: headerAndFooter) => { +const right_update = (item: any, diy: [Array], header: headerAndFooter, footer: headerAndFooter, tabs_data: [Array]) => { diy_data_item.value = item; form.value.diy_data = diy; form.value.header = header; form.value.footer = footer; + form.value.tabs_data = tabs_data; // 生成随机id key.value = Math.random().toString(36).substring(2); }; @@ -121,6 +125,7 @@ const clear_data_event = () => { form.value.footer.show_tabs = '0'; form.value.header.com_data = new_tem_form.header.com_data; form.value.footer.com_data = new_tem_form.footer.com_data; + form.value.tabs_data = []; form.value.diy_data = []; diy_data_item.value = new_tem_form.header; }; @@ -262,6 +267,7 @@ const form_data_transfor_diy_data = (clone_form: diyData) => { }, header: is_obj(temp_config) ? (temp_config as diyConfig).header : JSON.parse(temp_config as string).header, footer: is_obj(temp_config) ? (temp_config as diyConfig).footer : JSON.parse(temp_config as string).footer, + tabs_data: is_obj(temp_config) ? (temp_config as diyConfig).tabs_data : JSON.parse(temp_config as string).tabs_data, diy_data: is_obj(temp_config) ? (temp_config as diyConfig).diy_data : JSON.parse(temp_config as string).diy_data, }; } catch (error) { @@ -275,6 +281,7 @@ const form_data_transfor_diy_data = (clone_form: diyData) => { }, header: new_tem_form.header, footer: new_tem_form.footer, + tabs_data: new_tem_form.tabs_data, diy_data: new_tem_form.diy_data, }; }