Skip to content

Commit

Permalink
fix: 字段修改
Browse files Browse the repository at this point in the history
  • Loading branch information
yy-wow committed Jan 9, 2025
1 parent 9ec89fb commit 50ef894
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/canvas/container/src/CanvasContainer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export default {
const beforeCanvasReady = () => {
if (iframe.value) {
const win = iframe.value.contentWindow
win.componentsDeps = useResource().resState.canvasDeps.scripts.filter((item) => item.components)
win.componentsDeps = useResource().appSchemaState.canvasDeps.scripts.filter((item) => item.components)
const { subscribe, unsubscribe } = useMessage()
const { getSchemaDiff, patchLatestSchema, getSchema, getNode } = useCanvas()
Expand Down
2 changes: 1 addition & 1 deletion packages/common/js/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const open = (params = {}) => {
params.app = paramsMap.get('id')
params.tenant = paramsMap.get('tenant')

const { scripts, styles } = useResource().resState.canvasDeps
const { scripts, styles } = useResource().appSchemaState.canvasDeps
params.scripts = {}

scripts
Expand Down
6 changes: 3 additions & 3 deletions packages/plugins/materials/src/composable/useMaterial.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ const addComponentSnippets = (componentSnippets, snippetsData) => {
* @returns
*/
const getUtilsDependencies = () => {
const { utils } = useResource().resState
const { utils } = useResource().appSchemaState

return utils
.filter((item) => item.type === 'npm' && item.content.cdnLink)
Expand All @@ -302,7 +302,7 @@ const getUtilsDependencies = () => {
* 组装画布的依赖,通知画布初始化或更新importmap
*/
const setCanvasDeps = () => {
const { scripts, styles } = useResource().resState.canvasDeps
const { scripts, styles } = useResource().appSchemaState.canvasDeps

// 将utils依赖添加到canvasDeps中
getUtilsDependencies().forEach((util) => {
Expand All @@ -323,7 +323,7 @@ const setCanvasDeps = () => {
const parseMaterialsDependencies = (materialBundle) => {
const { packages, components } = materialBundle

const { scripts: scriptsDeps, styles: stylesDeps } = useResource().resState.canvasDeps
const { scripts: scriptsDeps, styles: stylesDeps } = useResource().appSchemaState.canvasDeps

packages?.forEach((pkg) => {
if (scriptsDeps.find((item) => item.package === pkg.package)) {
Expand Down

0 comments on commit 50ef894

Please sign in to comment.