Skip to content
New issue

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

添加 option.value #30

Closed
XShellv opened this issue Jan 4, 2020 · 3 comments
Closed

添加 option.value #30

XShellv opened this issue Jan 4, 2020 · 3 comments
Assignees
Milestone

Comments

@XShellv
Copy link

XShellv commented Jan 4, 2020

当前如果在react中使用父组件传递过来的defaultValue值时无法通过数据流渲染到vditor,只能通过setValue方法处理,该方法只能在compoenntDidUpdate中调用,可能存在堆栈溢出的现象。

@Vanessa219
Copy link
Owner

有一个 after 方法,可以在里面 setValue,不行的话我加一个 defaultValue 参数?

@XShellv
Copy link
Author

XShellv commented Jan 5, 2020

期待!

@Vanessa219 Vanessa219 changed the title 给vditor编辑器设置默认值存在局限性 添加 option.value Jan 5, 2020
@Vanessa219
Copy link
Owner

初始值顺序为:

  • 如果启用缓存,且缓存有值的话,优先使用缓存值
  • option.value 和 DOM 中都存在值的话,优先使用 option.value

@Vanessa219 Vanessa219 self-assigned this Jan 5, 2020
@Vanessa219 Vanessa219 added this to the 2.0 milestone Jan 5, 2020
Vanessa219 added a commit that referenced this issue Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants