0
0

chore: fix bug

This commit is contained in:
syuilo 2021-10-12 00:44:52 +09:00
parent abd3efa318
commit 50bad84747

View File

@ -1,5 +1,8 @@
<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>
<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">
<template #item="{element}">
<XVariable
:value="element"
:modelValue="element"
:removable="true"
@remove="() => removeVariable(element)"
:hpml="hpml"
@ -76,6 +79,7 @@
<MkTextarea class="_code" v-model="script"/>
</div>
</div>
</div>
</div>
</template>
@ -128,6 +132,21 @@ export default defineComponent({
data() {
return {
[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;
if (this.initPageId) {
title = this.$ts._pages.editPage;
@ -162,7 +181,6 @@ export default defineComponent({
}]
};
}),
tab: 'settings',
author: this.$i,
readonly: false,
page: null,