mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: problem_edit: fix multi-lang
This commit is contained in:
1 parent
a5e3cf2c9b
commit
0c5f941203
5 files changed
+59
-62
No files matched your search
@@ -119,7 +119,7 @@ export default class Editor extends DOMAttachedObject {
|
||||
|
||||
value(val) {
|
||||
this.ensureValid();
|
||||
if (val) return this.editor.setValue(val);
|
||||
if (typeof val === 'string') return this.editor.setValue(val);
|
||||
return this.editor.getValue();
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ export default class Tab extends DOMAttachedObject {
|
||||
}
|
||||
|
||||
static initEventListeners() {
|
||||
$(document).on('click', '.section__tab-header-item', (ev) => {
|
||||
$(document).on('click', '[data-tab-index]', (ev) => {
|
||||
const targetIndex = $(ev.currentTarget).attr('data-tab-index');
|
||||
const $container = $(ev.currentTarget).closest('.section__tab-container');
|
||||
const tabInstance = Tab.get($container);
|
||||
@@ -61,19 +61,21 @@ export default class Tab extends DOMAttachedObject {
|
||||
|
||||
// 2. Animate transition
|
||||
$currentTab
|
||||
.transition({
|
||||
opacity: 0,
|
||||
}, {
|
||||
duration: TAB_TRANSITION_DURATION,
|
||||
easing: 'linear',
|
||||
});
|
||||
.transition(
|
||||
{ opacity: 0 },
|
||||
{
|
||||
duration: TAB_TRANSITION_DURATION,
|
||||
easing: 'linear',
|
||||
}
|
||||
);
|
||||
$newTab
|
||||
.transition({
|
||||
opacity: 1,
|
||||
}, {
|
||||
duration: TAB_TRANSITION_DURATION,
|
||||
easing: 'linear',
|
||||
});
|
||||
.transition(
|
||||
{ opacity: 1 },
|
||||
{
|
||||
duration: TAB_TRANSITION_DURATION,
|
||||
easing: 'linear',
|
||||
}
|
||||
);
|
||||
await this.$content
|
||||
.transition({
|
||||
x: animateParameter.to,
|
||||
@@ -97,9 +99,7 @@ export default class Tab extends DOMAttachedObject {
|
||||
}
|
||||
|
||||
attach() {
|
||||
if (this.attached) {
|
||||
return false;
|
||||
}
|
||||
if (this.attached) return false;
|
||||
|
||||
const $container = this.$dom
|
||||
.closest('.section__tab-container');
|
||||
|
||||
Reference in new issue
Block a user