const { widgetGroup } = storeToRefs(dashPanelStore);
const styleSetting = { ...dashPanelStore.dash };
const init = () => {
if (props.styles.theme?.name) {
assign(dashboardStyle, props.styles);
} else {
assign(dashboardStyle, styleSetting.styles);
}
};
init();
// 色系选择更改
watch(
() => dashboardStyle.background.mapScheme,
(val) => {
// 找到设为背景的地图
if (get(styleSetting.styles?.background, 'type', '') === 'map') {
let backMap = widgetGroup.value.find(
(item) => item.widgetId === styleSetting.styles?.background.widgetId,
);
assign(backMap, { mapScheme: val });
}
},
);
vue3改变storage不成功示例
于 2023-10-20 14:48:44 首次发布