mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2026-04-23 10:18:55 +00:00
fix(editor): 数据源方法选择器展示所有数据源并支持字段非叶子节点选择
移除 methodsOptions 中过滤无自定义方法数据源的逻辑,因为所有数据源都有内置"设置数据"方法;字段选择增加 checkStrictly 支持选择非叶子节点 Made-with: Cursor
This commit is contained in:
parent
b2888962df
commit
31f4d2b4e2
@ -101,6 +101,7 @@ const getParamItemsConfig = ([dataSourceId, methodName]: [Id, string] = ['', '']
|
|||||||
text: '字段',
|
text: '字段',
|
||||||
type: 'data-source-field-select',
|
type: 'data-source-field-select',
|
||||||
dataSourceId,
|
dataSourceId,
|
||||||
|
checkStrictly: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'data',
|
name: 'data',
|
||||||
@ -146,9 +147,7 @@ const paramsConfig = ref<CodeParamStatement[]>(getParamItemsConfig(props.model[p
|
|||||||
|
|
||||||
const methodsOptions = computed(
|
const methodsOptions = computed(
|
||||||
() =>
|
() =>
|
||||||
dataSources.value
|
dataSources.value?.map((ds) => ({
|
||||||
?.filter((ds) => ds.methods?.length || dataSourceService.getFormMethod(ds.type).length)
|
|
||||||
?.map((ds) => ({
|
|
||||||
label: ds.title || ds.id,
|
label: ds.title || ds.id,
|
||||||
value: ds.id,
|
value: ds.id,
|
||||||
children: [
|
children: [
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user