opentiny / opentiny/tiny-engine

🐛 [Bug]: tinyEngine编辑态,添加了stores后,在getters中写函数会导致画布绑定的stores都失效

Open
#1,724 2 comments 1 reaction 0 assignees View on GitHub

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
  1. 拖入一个自定义或者内置组件,在高级选项中绑定 stores的属性值 如 isShow 为true。
  2. 在该stores中getters里写入函数(正确的函数,可成功保存到数据库)
  3. 保存后,该组件消失。
  4. 个人理解:在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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.