Skip to content

Commit f0bf8f9

Browse files
committed
fix: 修改jsExpression 数据源state引用
1 parent 4bd7133 commit f0bf8f9

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@alilc/lowcode-engine-ext",
3-
"version": "1.0.2-beta.1",
3+
"version": "1.0.2-beta.2",
44
"description": "",
55
"files": [
66
"dist",

src/setter/expression-setter/index.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,19 @@ export default class ExpressionView extends PureComponent {
132132
const stateMap = schema.componentsTree[0].state;
133133
const dataSource = [];
134134

135+
const datasourceMap = schema.componentsTree[0]?.dataSource;
136+
const list = datasourceMap?.list || [];
137+
135138
for (const key in stateMap) {
136139
dataSource.push(`this.state.${key}`);
137140
}
138141

142+
for (const item of list) {
143+
if (item && item.id) {
144+
dataSource.push(`this.state.${item.id}`);
145+
}
146+
}
147+
139148
return dataSource;
140149
}
141150

0 commit comments

Comments
 (0)