Skip to content

Commit

Permalink
fix: api插件变量引用时标题描述隐藏问题修复 TencentBlueKing#85
Browse files Browse the repository at this point in the history
  • Loading branch information
ywywZhou committed Jan 8, 2025
1 parent a04fdca commit 602d4e0
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@
this.hookFormData[form] = varItem.value;
this.hookFormSchema[form] = { ...schema };
this.formData[form] = `\${${form}}`;
this.setHookFormItem(formSchema, { form, title: schema.title });
this.setHookFormItem(formSchema, { form, schema });
result = true;
}
}
Expand All @@ -261,18 +261,19 @@
const result = await this.hookForm(path);
if (!result) return;
this.formData[path] = `\${${path}}`;
this.setHookFormItem(this.formsScheme, { form: path, title: schema.title });
this.setHookFormItem(this.formsScheme, { form: path, schema });
this.$emit('update', tools.deepClone(this.formData));
}
this.randomKey = new Date().getTime();
},
setHookFormItem(formSchema, { form, title }) {
setHookFormItem(formSchema, { form, schema }) {
formSchema.properties[form] = {
extend: {
can_hook: true,
hook: true,
},
title,
title: schema.title,
description: schema.description,
type: 'string',
'ui:component': {
name: 'bfInput',
Expand Down Expand Up @@ -535,7 +536,7 @@
// jsonSchema表单重置hook态
if (this.isJsonSchema) {
const schema = this.hookFormSchema[form];
this.setHookFormItem(this.formsScheme, { form, title: schema.title });
this.setHookFormItem(this.formsScheme, { form, schema });
this.randomKey = new Date().getTime();
}
},
Expand Down

0 comments on commit 602d4e0

Please sign in to comment.