From 31f4d2b4e26f5a941041c41c0843828d70ed3cd8 Mon Sep 17 00:00:00 2001 From: roymondchen Date: Thu, 9 Apr 2026 15:32:35 +0800 Subject: [PATCH] =?UTF-8?q?fix(editor):=20=E6=95=B0=E6=8D=AE=E6=BA=90?= =?UTF-8?q?=E6=96=B9=E6=B3=95=E9=80=89=E6=8B=A9=E5=99=A8=E5=B1=95=E7=A4=BA?= =?UTF-8?q?=E6=89=80=E6=9C=89=E6=95=B0=E6=8D=AE=E6=BA=90=E5=B9=B6=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E5=AD=97=E6=AE=B5=E9=9D=9E=E5=8F=B6=E5=AD=90=E8=8A=82?= =?UTF-8?q?=E7=82=B9=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 移除 methodsOptions 中过滤无自定义方法数据源的逻辑,因为所有数据源都有内置"设置数据"方法;字段选择增加 checkStrictly 支持选择非叶子节点 Made-with: Cursor --- .../src/fields/DataSourceMethodSelect.vue | 33 +++++++++---------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/packages/editor/src/fields/DataSourceMethodSelect.vue b/packages/editor/src/fields/DataSourceMethodSelect.vue index 1fbb6981..205d1086 100644 --- a/packages/editor/src/fields/DataSourceMethodSelect.vue +++ b/packages/editor/src/fields/DataSourceMethodSelect.vue @@ -101,6 +101,7 @@ const getParamItemsConfig = ([dataSourceId, methodName]: [Id, string] = ['', ''] text: '字段', type: 'data-source-field-select', dataSourceId, + checkStrictly: true, }, { name: 'data', @@ -146,23 +147,21 @@ const paramsConfig = ref(getParamItemsConfig(props.model[p const methodsOptions = computed( () => - dataSources.value - ?.filter((ds) => ds.methods?.length || dataSourceService.getFormMethod(ds.type).length) - ?.map((ds) => ({ - label: ds.title || ds.id, - value: ds.id, - children: [ - { - label: '设置数据', - value: DATA_SOURCE_SET_DATA_METHOD_NAME, - }, - ...(dataSourceService?.getFormMethod(ds.type) || []), - ...(ds.methods || []).map((method) => ({ - label: method.name, - value: method.name, - })), - ], - })) || [], + dataSources.value?.map((ds) => ({ + label: ds.title || ds.id, + value: ds.id, + children: [ + { + label: '设置数据', + value: DATA_SOURCE_SET_DATA_METHOD_NAME, + }, + ...(dataSourceService?.getFormMethod(ds.type) || []), + ...(ds.methods || []).map((method) => ({ + label: method.name, + value: method.name, + })), + ], + })) || [], ); const cascaderConfig = computed(() => ({