mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: fix #74 (multi-lang edit for problem)
This commit is contained in:
1 parent
ef5ee468bd
commit
ebaa3f290b
10 files changed
+117
-85
No files matched your search
@@ -40,12 +40,17 @@ export default class CmEditor extends DOMAttachedObject {
|
||||
const origin = $dom.get(0);
|
||||
const ele = document.createElement('div');
|
||||
const value = $dom.val();
|
||||
const onChange = this.options.onChange;
|
||||
await new Promise((resolve) => {
|
||||
this.editor = new Vditor(ele, {
|
||||
...config,
|
||||
...this.options,
|
||||
after: resolve,
|
||||
input(v) { $dom.val(v); $dom.text(v); },
|
||||
input(v) {
|
||||
$dom.val(v);
|
||||
$dom.text(v);
|
||||
if (onChange) onChange(v);
|
||||
},
|
||||
value,
|
||||
cache: { id: Math.random().toString() },
|
||||
});
|
||||
|
||||
@@ -28,12 +28,8 @@ export default class Tab extends DOMAttachedObject {
|
||||
}
|
||||
|
||||
async switchToTab(idx) {
|
||||
if (idx === this.currentIndex) {
|
||||
return;
|
||||
}
|
||||
if (this.isAnimating) {
|
||||
return;
|
||||
}
|
||||
if (idx === this.currentIndex) return;
|
||||
if (this.isAnimating) return;
|
||||
|
||||
const $tabs = this.$content.children();
|
||||
const $currentTab = $tabs.eq(this.currentIndex);
|
||||
|
||||
Reference in new issue
Block a user