refactor:界面重构、渲染逻辑重构
This commit is contained in:
@ -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 }
|
||||
})
|
||||
Reference in New Issue
Block a user