chore: fix bug
This commit is contained in:
parent
abd3efa318
commit
50bad84747
|
@ -1,5 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="_root">
|
<div>
|
||||||
|
<MkHeader :info="header"/>
|
||||||
|
|
||||||
|
<div class="_root">
|
||||||
<MkA class="view" v-if="pageId" :to="`/@${ author.username }/pages/${ currentName }`"><i class="fas fa-external-link-square-alt"></i> {{ $ts._pages.viewPage }}</MkA>
|
<MkA class="view" v-if="pageId" :to="`/@${ author.username }/pages/${ currentName }`"><i class="fas fa-external-link-square-alt"></i> {{ $ts._pages.viewPage }}</MkA>
|
||||||
|
|
||||||
<div class="buttons" style="margin: 16px;">
|
<div class="buttons" style="margin: 16px;">
|
||||||
|
@ -56,7 +59,7 @@
|
||||||
<XDraggable tag="div" class="variables" v-show="variables.length > 0" v-model="variables" item-key="name" handle=".drag-handle" :group="{ name: 'variables' }" animation="150" swap-threshold="0.5">
|
<XDraggable tag="div" class="variables" v-show="variables.length > 0" v-model="variables" item-key="name" handle=".drag-handle" :group="{ name: 'variables' }" animation="150" swap-threshold="0.5">
|
||||||
<template #item="{element}">
|
<template #item="{element}">
|
||||||
<XVariable
|
<XVariable
|
||||||
:value="element"
|
:modelValue="element"
|
||||||
:removable="true"
|
:removable="true"
|
||||||
@remove="() => removeVariable(element)"
|
@remove="() => removeVariable(element)"
|
||||||
:hpml="hpml"
|
:hpml="hpml"
|
||||||
|
@ -76,6 +79,7 @@
|
||||||
<MkTextarea class="_code" v-model="script"/>
|
<MkTextarea class="_code" v-model="script"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -128,6 +132,21 @@ export default defineComponent({
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
[symbols.PAGE_INFO]: computed(() => {
|
[symbols.PAGE_INFO]: computed(() => {
|
||||||
|
let title = this.$ts._pages.newPage;
|
||||||
|
if (this.initPageId) {
|
||||||
|
title = this.$ts._pages.editPage;
|
||||||
|
}
|
||||||
|
else if (this.initPageName && this.initUser) {
|
||||||
|
title = this.$ts._pages.readPage;
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
title: title,
|
||||||
|
icon: 'fas fa-pencil-alt',
|
||||||
|
bg: 'var(--bg)',
|
||||||
|
};
|
||||||
|
}),
|
||||||
|
tab: 'settings',
|
||||||
|
header: computed(() => {
|
||||||
let title = this.$ts._pages.newPage;
|
let title = this.$ts._pages.newPage;
|
||||||
if (this.initPageId) {
|
if (this.initPageId) {
|
||||||
title = this.$ts._pages.editPage;
|
title = this.$ts._pages.editPage;
|
||||||
|
@ -162,7 +181,6 @@ export default defineComponent({
|
||||||
}]
|
}]
|
||||||
};
|
};
|
||||||
}),
|
}),
|
||||||
tab: 'settings',
|
|
||||||
author: this.$i,
|
author: this.$i,
|
||||||
readonly: false,
|
readonly: false,
|
||||||
page: null,
|
page: null,
|
||||||
|
|
Loading…
Reference in New Issue