We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
为了序列化所以使用字符串的形式写gettext等,但是我想要实现 在修改前校验一下数据 比如有没有重复的,或限制长度以及执行其他代码等操作,该如何实现
暂无
想要实现 能序列化的同时, 在修改前校验一下数据 比如有没有重复的,或限制长度以及执行其他代码等操作
No response
The text was updated successfully, but these errors were encountered:
如果要实现你的需求,一种思路是在设置值之前增加校验,但是这样同样会存在不能序列化的问题,如果你们没有序列化的需求,可以基于 CellEditor 来自定义自己的节点编辑工具。另外一种思路是监听节点文本的修改,修改后增加判断,如果判断不通过,再将文本恢复之前的值。
Sorry, something went wrong.
试了下有几个问题。。。 我用cell:change:attrs监听,触发双击编辑的那一刻,会触发这个监听,options.propertyValue传一个空的值,按理说不应该触发吧。其次 编辑之后 会触发两次监听,第一次options.propertyValue的值是修改后的值,第二次options.propertyValue的值是原先的值
之前确实没有考虑到修改校验的需求,这个需求给我们的 node-editor 的设计带来了新的思路: 带有函数配置的工具需要采用延迟创建模式,也就是在事件触发之后再动态添加工具。
No branches or pull requests
问题描述
为了序列化所以使用字符串的形式写gettext等,但是我想要实现 在修改前校验一下数据 比如有没有重复的,或限制长度以及执行其他代码等操作,该如何实现
重现链接
暂无
重现步骤
暂无
预期行为
想要实现 能序列化的同时, 在修改前校验一下数据 比如有没有重复的,或限制长度以及执行其他代码等操作
平台
屏幕截图或视频(可选)
No response
补充说明(可选)
No response
The text was updated successfully, but these errors were encountered: