Pages埋め込みノートで詳細表示にするかどうか選べるように
This commit is contained in:
parent
f655b54937
commit
77de3f2b9d
|
@ -1181,6 +1181,7 @@ _pages:
|
|||
_note:
|
||||
id: "ノートID"
|
||||
idDescription: "ノートURLをペーストして設定することもできます。"
|
||||
detailed: "詳細な表示"
|
||||
|
||||
switch: "スイッチ"
|
||||
_switch:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<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>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -7,8 +7,9 @@
|
|||
<span>{{ $t('_pages.blocks._note.id') }}</span>
|
||||
<template #desc>{{ $t('_pages.blocks._note.idDescription') }}</template>
|
||||
</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>
|
||||
</XContainer>
|
||||
</template>
|
||||
|
@ -18,12 +19,13 @@ import { defineComponent } from 'vue';
|
|||
import { faStickyNote } from '@fortawesome/free-solid-svg-icons';
|
||||
import XContainer from '../page-editor.container.vue';
|
||||
import MkInput from '@/components/ui/input.vue';
|
||||
import MkSwitch from '@/components/ui/switch.vue';
|
||||
import XNote from '@/components/note.vue';
|
||||
import * as os from '@/os';
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
XContainer, MkInput, XNote
|
||||
XContainer, MkInput, MkSwitch, XNote
|
||||
},
|
||||
|
||||
props: {
|
||||
|
@ -57,6 +59,7 @@ export default defineComponent({
|
|||
|
||||
created() {
|
||||
if (this.value.note == null) this.value.note = null;
|
||||
if (this.value.detailed == null) this.value.detailed = false;
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue