From 795408f90242e32d32fd32ded8ff4245149d12bf Mon Sep 17 00:00:00 2001 From: SonyLeo <746591437@qq.com> Date: Sun, 26 Jan 2025 19:16:03 -0800 Subject: [PATCH 1/9] fix: the entry delete button is gray and cannot be deleted --- packages/plugins/i18n/src/Main.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/plugins/i18n/src/Main.vue b/packages/plugins/i18n/src/Main.vue index 6296f59332..52c0c777d2 100644 --- a/packages/plugins/i18n/src/Main.vue +++ b/packages/plugins/i18n/src/Main.vue @@ -189,7 +189,7 @@ export default { const upload = ref('upload') const i18nTable = ref(null) const selectedRowLength = computed(() => { - return i18nTable.value?.getSelectRecords().length + return i18nTable.value?.getAllSelection().length }) const notEmpty = computed(() => langList.value.length > 0) const current = ref({ From fa8a73588c377f182fdebd8df3fe396732b9c8a3 Mon Sep 17 00:00:00 2001 From: SonyLeo <746591437@qq.com> Date: Sun, 26 Jan 2025 00:03:03 -0800 Subject: [PATCH 2/9] fix: resource alert message is wrong --- .../render/src/application-function/utils.ts | 43 +++++++++++-------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/packages/canvas/render/src/application-function/utils.ts b/packages/canvas/render/src/application-function/utils.ts index 96195106e1..3aef975b2a 100644 --- a/packages/canvas/render/src/application-function/utils.ts +++ b/packages/canvas/render/src/application-function/utils.ts @@ -54,26 +54,31 @@ export function useUtils(context: Record) { } }) - const npmUtilsImports = data + const npmUtilPromises = data .filter((item) => item.type === 'npm' && item.content.cdnLink) - .map((item) => import(/* @vite-ignore */ item.content.cdnLink)) - const npmUtils = await Promise.allSettled(npmUtilsImports) - - npmUtils.forEach((res, index) => { - const { name, content } = data[index] - const { exportName, destructuring, cdnLink } = content - - if (res.status !== 'fulfilled') { - globalNotify({ - type: 'error', - message: `加载工具类“${name}”失败,请检查cdn链接是否正确,${cdnLink}` - }) - - return - } - - const module = res.value - utilsCollection[name] = destructuring ? module[exportName] : module.default + .map(async (item) => { + const promise = import(/* @vite-ignore */ item.content.cdnLink) + const results = await Promise.allSettled([promise]) + + return { ...item, cdnResult: results[0] } + }) + + Promise.all(npmUtilPromises).then((resolvedItems) => { + resolvedItems.forEach(({ name, content, cdnResult }) => { + const { exportName, destructuring, cdnLink } = content + const { status, value } = cdnResult + + if (status !== 'fulfilled') { + globalNotify({ + type: 'error', + message: `加载工具类“${name}”失败,请检查cdn链接是否正确:${cdnLink}` + }) + return + } + + const module = value + utilsCollection[name] = destructuring ? module[exportName] : module.default + }) }) Object.assign(utils, utilsCollection) From 003f78d315fd59e171d08fdb24bf8070edc1f2dc Mon Sep 17 00:00:00 2001 From: SonyLeo <746591437@qq.com> Date: Sun, 26 Jan 2025 01:16:31 -0800 Subject: [PATCH 3/9] fix: simplify promise handling to avoid unnecessary nesting. --- .../canvas/render/src/application-function/utils.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/canvas/render/src/application-function/utils.ts b/packages/canvas/render/src/application-function/utils.ts index 3aef975b2a..ab4962572a 100644 --- a/packages/canvas/render/src/application-function/utils.ts +++ b/packages/canvas/render/src/application-function/utils.ts @@ -57,10 +57,12 @@ export function useUtils(context: Record) { const npmUtilPromises = data .filter((item) => item.type === 'npm' && item.content.cdnLink) .map(async (item) => { - const promise = import(/* @vite-ignore */ item.content.cdnLink) - const results = await Promise.allSettled([promise]) - - return { ...item, cdnResult: results[0] } + try { + const module = await import(/* @vite-ignore */ item.content.cdnLink) + return { ...item, cdnResult: { status: 'fulfilled', value: module } } + } catch (error) { + return { ...item, cdnResult: { status: 'rejected', reason: error } } + } }) Promise.all(npmUtilPromises).then((resolvedItems) => { From 7d023217729de55193818d0018f63cf4b85a7903 Mon Sep 17 00:00:00 2001 From: SonyLeo <746591437@qq.com> Date: Fri, 7 Feb 2025 03:15:08 -0800 Subject: [PATCH 4/9] fix: the inaccurate search of the material block according to the keyword --- packages/plugins/materials/src/meta/block/src/http.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/plugins/materials/src/meta/block/src/http.js b/packages/plugins/materials/src/meta/block/src/http.js index 10480c2384..74187b390f 100644 --- a/packages/plugins/materials/src/meta/block/src/http.js +++ b/packages/plugins/materials/src/meta/block/src/http.js @@ -121,6 +121,7 @@ export const fetchAvailableBlocks = ({ groupId, label_contains, author, tag, pub getMetaApi(META_SERVICE.Http).get( `/material-center/api/block/notgroup/${groupId}${getParams({ label_contains, + name_cn_contains: label_contains, createdBy: author, tags_contains: tag, public: publicType From abf0cbdaeda1964af615809c22904ef6a9a14f8e Mon Sep 17 00:00:00 2001 From: SonyLeo <746591437@qq.com> Date: Fri, 7 Feb 2025 03:31:39 -0800 Subject: [PATCH 5/9] fix: update the datasource type style --- packages/plugins/datasource/src/DataSourceType.vue | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/plugins/datasource/src/DataSourceType.vue b/packages/plugins/datasource/src/DataSourceType.vue index f01cd5d5ba..f50157a2c6 100644 --- a/packages/plugins/datasource/src/DataSourceType.vue +++ b/packages/plugins/datasource/src/DataSourceType.vue @@ -3,9 +3,13 @@ -
- -
+
From 7761307c41c518ad0cadabc854821cbd660ad4a0 Mon Sep 17 00:00:00 2001 From: SonyLeo <746591437@qq.com> Date: Fri, 7 Feb 2025 17:14:33 -0800 Subject: [PATCH 6/9] fix: history backup page preview failed --- packages/plugins/page/src/PageHistory.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/plugins/page/src/PageHistory.vue b/packages/plugins/page/src/PageHistory.vue index 876be23136..6ff6066e87 100644 --- a/packages/plugins/page/src/PageHistory.vue +++ b/packages/plugins/page/src/PageHistory.vue @@ -58,7 +58,11 @@ export default { id: item.page, history: item.id, framework: getMergeMeta('engine.config')?.dslMode, - platform: getMergeMeta('engine.config')?.platformId + platform: getMergeMeta('engine.config')?.platformId, + pageInfo: { + name: item.name + }, + ancestors: [item] }) } From 3fd2381a690e0494e612b67191324c0d5bf1d6e1 Mon Sep 17 00:00:00 2001 From: SonyLeo <746591437@qq.com> Date: Fri, 7 Feb 2025 18:37:24 -0800 Subject: [PATCH 7/9] fix: switch data source type not to update --- packages/plugins/datasource/src/DataSourceType.vue | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/plugins/datasource/src/DataSourceType.vue b/packages/plugins/datasource/src/DataSourceType.vue index f50157a2c6..e0aca28860 100644 --- a/packages/plugins/datasource/src/DataSourceType.vue +++ b/packages/plugins/datasource/src/DataSourceType.vue @@ -52,6 +52,13 @@ export default { const dataSourceType = ref(props.modelValue) + watch( + () => props.modelValue, + (newVal) => { + dataSourceType.value = newVal + } + ) + watch( () => dataSourceType.value, (newVal) => { From 73dc5b702549c7e933eea5747cf5354b3ac596d8 Mon Sep 17 00:00:00 2001 From: SonyLeo <746591437@qq.com> Date: Tue, 11 Feb 2025 04:34:23 -0800 Subject: [PATCH 8/9] fix: optimization function writing --- .../render/src/application-function/utils.ts | 47 ++++++++----------- 1 file changed, 20 insertions(+), 27 deletions(-) diff --git a/packages/canvas/render/src/application-function/utils.ts b/packages/canvas/render/src/application-function/utils.ts index ab4962572a..16bf82791f 100644 --- a/packages/canvas/render/src/application-function/utils.ts +++ b/packages/canvas/render/src/application-function/utils.ts @@ -54,33 +54,26 @@ export function useUtils(context: Record) { } }) - const npmUtilPromises = data - .filter((item) => item.type === 'npm' && item.content.cdnLink) - .map(async (item) => { - try { - const module = await import(/* @vite-ignore */ item.content.cdnLink) - return { ...item, cdnResult: { status: 'fulfilled', value: module } } - } catch (error) { - return { ...item, cdnResult: { status: 'rejected', reason: error } } - } - }) - - Promise.all(npmUtilPromises).then((resolvedItems) => { - resolvedItems.forEach(({ name, content, cdnResult }) => { - const { exportName, destructuring, cdnLink } = content - const { status, value } = cdnResult - - if (status !== 'fulfilled') { - globalNotify({ - type: 'error', - message: `加载工具类“${name}”失败,请检查cdn链接是否正确:${cdnLink}` - }) - return - } - - const module = value - utilsCollection[name] = destructuring ? module[exportName] : module.default - }) + const validNPMUtils = data.filter((item) => item.type === 'npm' && item.content.cdnLink) + + const npmUtilsImports = validNPMUtils.map((item) => import(/* @vite-ignore */ item.content.cdnLink)) + const npmUtils = await Promise.allSettled(npmUtilsImports) + + npmUtils.forEach((res, index) => { + const { name, content } = validNPMUtils[index] + const { exportName, destructuring, cdnLink } = content + + if (res.status !== 'fulfilled') { + globalNotify({ + type: 'error', + message: `加载工具类“${name}”失败,请检查cdn链接是否正确,${cdnLink}` + }) + + return + } + + const module = res.value + utilsCollection[name] = destructuring ? module[exportName] : module.default }) Object.assign(utils, utilsCollection) From 0ab227ba09469ca977757f00a44350969b1bc1be Mon Sep 17 00:00:00 2001 From: SonyLeo <746591437@qq.com> Date: Tue, 11 Feb 2025 18:55:52 -0800 Subject: [PATCH 9/9] fix: update search input placeholder --- .../plugins/materials/src/meta/block/src/BlockGroupPanel.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/plugins/materials/src/meta/block/src/BlockGroupPanel.vue b/packages/plugins/materials/src/meta/block/src/BlockGroupPanel.vue index 4136e3ab9e..1393b163ee 100644 --- a/packages/plugins/materials/src/meta/block/src/BlockGroupPanel.vue +++ b/packages/plugins/materials/src/meta/block/src/BlockGroupPanel.vue @@ -13,7 +13,7 @@