mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
ui: fix vditor getValue
This commit is contained in:
1 parent
dad34de9c7
commit
a70c55e585
2 files changed
+11
-11
No files matched your search
@@ -191,8 +191,8 @@ export default class Editor extends DOMAttachedObject {
|
||||
*/
|
||||
value(val) {
|
||||
this.ensureValid();
|
||||
if (typeof val === 'string') return this.editor.setValue(val);
|
||||
return this.editor.getValue();
|
||||
if (typeof val === 'string') return (this.editor || this.vditor).setValue(val);
|
||||
return (this.editor || this.vditor).getValue();
|
||||
}
|
||||
|
||||
focus() {
|
||||
|
||||
Reference in new issue
Block a user