alibaba / alibaba/lowcode-engine
源码面板state变量名和数据源面板中名称的关系问题
- Dominant language
- TypeScript
- Stars
- 15.9k
- Forks
- 2.7k
- PR merge metrics
- No merged PRs in 30d
Description
## 现象
在变量面板中绑定state中的变量可以展示出来,但是如果在数据源面板中有和源码面板中state同名的变量就会导致展示不出来。
## 复现步骤
使用官方提供的在线demo。
1. 在源码面板中的state中设置一个变量,例如:infoState

2. 拖一个按钮到画布上,绑定这个变量。这时是可以展示出来这个infoState的值的

3. 将源码面板中的infoState改成info(数据源面板中有一个默认名字为info的数据源),然后修改按钮的绑定值也为info,这时就会展示不出来


4. 如果删除数据源面板中的info数据源就会展示出来了。
## 问题
在setter的变量绑定面板中点击数据源和state中的变量,右边生成的都是this.state.xxx。是不是在运行时将这两个东西合并了?
## 版本信息

Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the collision in the official online demo by binding a button to a state variable, then creating a data source with the same name in the variable binding panel. Compare the generated bindings and runtime display before and after deleting the data source. Done means a state variable remains displayable when a same-named data source exists, with the intended source resolved consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100