1.解决清空后双向绑定失效的问题

v1.0.0
sws 2024-09-06 18:04:00 +08:00
parent b4d1f06cea
commit ee5e4c19fe
3 changed files with 10 additions and 2 deletions

View File

@ -48,6 +48,7 @@ const nav_style = ref(0);
watch(
() => props.footerData,
(newVal, oldValue) => {
console.log('footer-nav-index:', newVal);
const new_content = newVal?.content || {};
const new_style = newVal?.style || {};
nav_content.value = new_content?.nav_content || [];

View File

@ -218,8 +218,10 @@ watch(
watch(
() => props.footer,
(newValue) => {
console.log('main:', newValue);
footer_nav.value = newValue;
}
},
{ deep: true }
);
const top_padding = ref(90);
const top_margin = ref(0);

View File

@ -118,7 +118,12 @@ const export_data_event = () => {
//
const clear_data_event = () => {
let new_tem_form = cloneDeep(temp_form.value);
form.value = new_tem_form;
form.value.header.show_tabs = '1';
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.diy_data = [];
diy_data_item.value = new_tem_form.header;
};
//#region ---------------------start
//