opentiny / opentiny/tiny-engine
🐛 [Bug]: tinyEngine编辑态,添加了stores后,在getters中写函数会导致画布绑定的stores都失效
Nobody has claimed this yet.
- Dominant language
- Vue
- Stars
- 2.8k
- Forks
- 476
- Avg merge
- 17h 35m
- Merged PRs (30d)
- 1
Description
Environment
win11,chrome最新
Version
20+
Version
tinyEngine 2.8 , opentiny/vue 3.20
Link to minimal reproduction
拖入画布中的组件设置 条件渲染,使用stores的属性值,如果在stores中的getters里加了函数,画布上绑定的stores值都会失效。 删除掉就又可以了。
getters里是按照传统的 function(){ return this.count } 类似这种写法,可以存入数据库。写法错误数据库不会存储。
Step to reproduce
- 拖入一个自定义或者内置组件,在高级选项中绑定 stores的属性值 如 isShow 为true。
- 在该stores中getters里写入函数(正确的函数,可成功保存到数据库)
- 保存后,该组件消失。
- 个人理解:在getters写入函数后,画布上无法获取到stores实例 导致永远为false
What is expected
No response
What is actually happening
No response
What is your project name
二开 tinyEngine
Any additional comments (optional)
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue in the tinyEngine editor using a component with a stores-backed conditional property, then add a getter function and save. Trace how the canvas resolves the stores instance after persistence; done means the component remains visible when the getter returns true and the binding still works after saving.
Written by the indexing model from the issue text.
Assessment
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100