refactor:界面重构、渲染逻辑重构

This commit is contained in:
lhj
2024-11-06 00:17:16 +08:00
parent 9b8dbe97a8
commit 624eb717b9
15 changed files with 348 additions and 248 deletions

View File

@ -22,16 +22,19 @@ function findObjectById(obj, targetId) {
return null; // 如果没有找到则返回null
}
export const useSchemeStore = defineStore('scheme', () => {
const scheme = ref<IPageComponent[]>()
// const componnets = ref<IPageComponent[]>()
const previewData = ref<IPageComponent[]>()
const nowComponentsData = ref<IPageComponent>()
function initScheme(value) {
scheme.value = value
previewData.value = value
}
function getSchemeObj(id) {
return findObjectById(scheme.value, id)
return findObjectById(previewData.value, id)
}
function updateScheme(id,obj)
function updateScheme()
{
}
return { scheme, initScheme, getSchemeObj,updateScheme }
return { previewData,nowComponentsData, initScheme, getSchemeObj,updateScheme }
})