Hufe921 / canvas-editor

rich text editor by canvas/svg
https://hufe.club/canvas-editor-docs
MIT License
3.43k stars 498 forks source link

需要获取id来实现动态数据 #654

Closed hl201910 closed 2 months ago

hl201910 commented 2 months ago

What problem does this feature solve?

表格的部分内容需要动态生成数据,需要给表格单元格绑定对应配置信息

What does the proposed API look like?

希望在getValue方法获取data数据的main数组中每个对象增加一个id

Hufe921 commented 2 months ago

表格可以绑定唯一conceptId看看是否满足需求

hl201910 commented 2 months ago

表格可以绑定唯一conceptId看看是否满足需求

文档里没有看到有关于conceptId设置的方法,请问一下参数是在executeInsertTable中传入吗

hl201910 commented 2 months ago

表格可以绑定唯一conceptId看看是否满足需求

单纯只是表格的id好像不太够用,可能需要拿到表格行和单元格的对应id,我尝试通过行号列号来确定单元格,但是如果做了删除行列操作得话序号就没有办法对应了

Hufe921 commented 2 months ago

td上增加属性conceptId用于区分 https://hufe.club/canvas-editor-docs/guide/schema.html

hl201910 commented 2 months ago

td上增加属性conceptId用于区分 https://hufe.club/canvas-editor-docs/guide/schema.html

谢谢,我明白应该怎么做了