1.解决清空后双向绑定失效的问题
parent
b4d1f06cea
commit
ee5e4c19fe
|
|
@ -48,6 +48,7 @@ const nav_style = ref(0);
|
||||||
watch(
|
watch(
|
||||||
() => props.footerData,
|
() => props.footerData,
|
||||||
(newVal, oldValue) => {
|
(newVal, oldValue) => {
|
||||||
|
console.log('footer-nav-index:', newVal);
|
||||||
const new_content = newVal?.content || {};
|
const new_content = newVal?.content || {};
|
||||||
const new_style = newVal?.style || {};
|
const new_style = newVal?.style || {};
|
||||||
nav_content.value = new_content?.nav_content || [];
|
nav_content.value = new_content?.nav_content || [];
|
||||||
|
|
|
||||||
|
|
@ -218,8 +218,10 @@ watch(
|
||||||
watch(
|
watch(
|
||||||
() => props.footer,
|
() => props.footer,
|
||||||
(newValue) => {
|
(newValue) => {
|
||||||
|
console.log('main:', newValue);
|
||||||
footer_nav.value = newValue;
|
footer_nav.value = newValue;
|
||||||
}
|
},
|
||||||
|
{ deep: true }
|
||||||
);
|
);
|
||||||
const top_padding = ref(90);
|
const top_padding = ref(90);
|
||||||
const top_margin = ref(0);
|
const top_margin = ref(0);
|
||||||
|
|
|
||||||
|
|
@ -118,7 +118,12 @@ const export_data_event = () => {
|
||||||
// 清空数据
|
// 清空数据
|
||||||
const clear_data_event = () => {
|
const clear_data_event = () => {
|
||||||
let new_tem_form = cloneDeep(temp_form.value);
|
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
|
//#region 页面初始化数据 ---------------------start
|
||||||
// 页面加载
|
// 页面加载
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue