mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-04-06 03:57:56 +08:00
fix(editor): 数据源方法配置,设置后再次修改参数配置不显示
This commit is contained in:
parent
e209aa36e8
commit
059c0056c4
@ -72,7 +72,7 @@ const codeConfig = computed(() => ({
|
|||||||
{
|
{
|
||||||
type: 'select',
|
type: 'select',
|
||||||
name: 'codeType',
|
name: 'codeType',
|
||||||
span: 8,
|
span: 6,
|
||||||
options: [
|
options: [
|
||||||
{ value: HookCodeType.CODE, text: '代码块' },
|
{ value: HookCodeType.CODE, text: '代码块' },
|
||||||
{ value: HookCodeType.DATA_SOURCE_METHOD, text: '数据源方法' },
|
{ value: HookCodeType.DATA_SOURCE_METHOD, text: '数据源方法' },
|
||||||
@ -91,7 +91,7 @@ const codeConfig = computed(() => ({
|
|||||||
{
|
{
|
||||||
type: 'code-select-col',
|
type: 'code-select-col',
|
||||||
name: 'codeId',
|
name: 'codeId',
|
||||||
span: 16,
|
span: 18,
|
||||||
labelWidth: 0,
|
labelWidth: 0,
|
||||||
display: (mForm: FormState, { model }: any) => model.codeType !== HookCodeType.DATA_SOURCE_METHOD,
|
display: (mForm: FormState, { model }: any) => model.codeType !== HookCodeType.DATA_SOURCE_METHOD,
|
||||||
notEditable: () => !services?.codeBlockService.getEditStatus(),
|
notEditable: () => !services?.codeBlockService.getEditStatus(),
|
||||||
@ -99,7 +99,7 @@ const codeConfig = computed(() => ({
|
|||||||
{
|
{
|
||||||
type: 'data-source-method-select',
|
type: 'data-source-method-select',
|
||||||
name: 'codeId',
|
name: 'codeId',
|
||||||
span: 16,
|
span: 18,
|
||||||
labelWidth: 0,
|
labelWidth: 0,
|
||||||
display: (mForm: FormState, { model }: any) => model.codeType === HookCodeType.DATA_SOURCE_METHOD,
|
display: (mForm: FormState, { model }: any) => model.codeType === HookCodeType.DATA_SOURCE_METHOD,
|
||||||
notEditable: () => !services?.dataSourceService.get('editable'),
|
notEditable: () => !services?.dataSourceService.get('editable'),
|
||||||
|
@ -91,7 +91,7 @@ const getParamItemsConfig = ([dataSourceId, methodName]: [Id, string] = ['', '']
|
|||||||
}));
|
}));
|
||||||
};
|
};
|
||||||
|
|
||||||
const paramsConfig = ref<CodeParamStatement[]>(getParamItemsConfig(props.model.dataSourceMethod));
|
const paramsConfig = ref<CodeParamStatement[]>(getParamItemsConfig(props.model[props.name || 'dataSourceMethod']));
|
||||||
|
|
||||||
const setParamsConfig = (dataSourceMethod: [Id, string], formState: any = {}) => {
|
const setParamsConfig = (dataSourceMethod: [Id, string], formState: any = {}) => {
|
||||||
// 通过下拉框选择的codeId变化后修正model的值,避免写入其他codeId的params
|
// 通过下拉框选择的codeId变化后修正model的值,避免写入其他codeId的params
|
||||||
|
Loading…
x
Reference in New Issue
Block a user