ui: use vditor as default markdown editor

This commit is contained in:
undefined committed 2021-04-17 23:01:13 +08:00
1 parent 981b21160f
commit d7a6e30743
13 files changed
+109 -266

No files matched your search

@@ -114,13 +114,9 @@ export default class AutoComplete extends DOMAttachedObject {
}
async getItems(val) {
if (this.cache[val] !== undefined) {
return this.cache[val];
}
if (this.cache[val] !== undefined) return this.cache[val];
const data = await this.options.items(val);
if (this.options.cache) {
this.cache[val] = data;
}
if (this.options.cache) this.cache[val] = data;
return data;
}
@@ -148,9 +144,7 @@ export default class AutoComplete extends DOMAttachedObject {
}
open() {
if (this.isOpen) {
return;
}
if (this.isOpen) return;
this.dropInstance.open();
this.isOpen = true;
}