forked from FoundKeyGang/FoundKey
Pages埋め込みノートで詳細表示にするかどうか選べるように
This commit is contained in:
parent
f655b54937
commit
77de3f2b9d
3 changed files with 7 additions and 3 deletions
|
@ -1181,6 +1181,7 @@ _pages:
|
||||||
_note:
|
_note:
|
||||||
id: "ノートID"
|
id: "ノートID"
|
||||||
idDescription: "ノートURLをペーストして設定することもできます。"
|
idDescription: "ノートURLをペーストして設定することもできます。"
|
||||||
|
detailed: "詳細な表示"
|
||||||
|
|
||||||
switch: "スイッチ"
|
switch: "スイッチ"
|
||||||
_switch:
|
_switch:
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="voxdxuby">
|
<div class="voxdxuby">
|
||||||
<XNote v-if="note" v-model:note="note" :key="note.id"/>
|
<XNote v-if="note" v-model:note="note" :key="note.id" :detail="value.detailed"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,9 @@
|
||||||
<span>{{ $t('_pages.blocks._note.id') }}</span>
|
<span>{{ $t('_pages.blocks._note.id') }}</span>
|
||||||
<template #desc>{{ $t('_pages.blocks._note.idDescription') }}</template>
|
<template #desc>{{ $t('_pages.blocks._note.idDescription') }}</template>
|
||||||
</MkInput>
|
</MkInput>
|
||||||
|
<MkSwitch v-model:value="value.detailed"><span>{{ $t('_pages.blocks._note.detailed') }}</span></MkSwitch>
|
||||||
|
|
||||||
<XNote v-if="note" v-model:note="note" :key="note.id" style="margin-bottom: 16px;"/>
|
<XNote v-if="note" v-model:note="note" :key="note.id + ':' + (value.detailed ? 'detailed' : 'normal')" :detail="value.detailed" style="margin-bottom: 16px;"/>
|
||||||
</section>
|
</section>
|
||||||
</XContainer>
|
</XContainer>
|
||||||
</template>
|
</template>
|
||||||
|
@ -18,12 +19,13 @@ import { defineComponent } from 'vue';
|
||||||
import { faStickyNote } from '@fortawesome/free-solid-svg-icons';
|
import { faStickyNote } from '@fortawesome/free-solid-svg-icons';
|
||||||
import XContainer from '../page-editor.container.vue';
|
import XContainer from '../page-editor.container.vue';
|
||||||
import MkInput from '@/components/ui/input.vue';
|
import MkInput from '@/components/ui/input.vue';
|
||||||
|
import MkSwitch from '@/components/ui/switch.vue';
|
||||||
import XNote from '@/components/note.vue';
|
import XNote from '@/components/note.vue';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
XContainer, MkInput, XNote
|
XContainer, MkInput, MkSwitch, XNote
|
||||||
},
|
},
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
|
@ -57,6 +59,7 @@ export default defineComponent({
|
||||||
|
|
||||||
created() {
|
created() {
|
||||||
if (this.value.note == null) this.value.note = null;
|
if (this.value.note == null) this.value.note = null;
|
||||||
|
if (this.value.detailed == null) this.value.detailed = false;
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in a new issue