amis-saas-6892 [Feature] 编辑器fx 交互优化

Change-Id: I81ef06573cb468b38cbccd7262a3d527fde7209b
This commit is contained in:
jiatianqi 2022-11-03 20:32:26 +08:00
parent 9c443957e2
commit 063c69955d
2 changed files with 4 additions and 4 deletions

View File

@ -176,7 +176,7 @@ export class TextareaFormulaControl extends React.Component<
let variables = [];
if (typeof rest?.variables === 'function') {
variables = rest.variables();
variables = rest.variables.call(this);
} else {
variables = rest?.variables || this.state.variables || [];
}

View File

@ -502,8 +502,9 @@ setSchemaTpl(
function getVariable() {
let rawVariables =
config.that.manager.dataSchema?.getDataPropsAsOptions();
let schema = config.context.schema;
window._ = _;
// 函数调用会call(this)
// @ts-ignore
let schema = (this as any).data;
let children = [];
@ -527,7 +528,6 @@ setSchemaTpl(
let optionItem = _.reduce(
schema.options,
function (result, item) {
console.log('item', item);
return {...result, ...item};
},
{}