2020-11-15 04:42:04 +00:00
|
|
|
<template>
|
|
|
|
<div class="voxdxuby">
|
2021-01-15 14:18:14 +00:00
|
|
|
<XNote v-if="note && !value.detailed" v-model:note="note" :key="note.id + ':normal'"/>
|
|
|
|
<XNoteDetailed v-if="note && value.detailed" v-model:note="note" :key="note.id + ':detail'"/>
|
2020-11-15 04:42:04 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import { defineComponent } from 'vue';
|
|
|
|
import XNote from '@/components/note.vue';
|
2021-01-15 14:18:14 +00:00
|
|
|
import XNoteDetailed from '@/components/note-detailed.vue';
|
2020-11-15 04:42:04 +00:00
|
|
|
import * as os from '@/os';
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
|
|
components: {
|
2021-01-15 14:18:14 +00:00
|
|
|
XNote,
|
|
|
|
XNoteDetailed,
|
2020-11-15 04:42:04 +00:00
|
|
|
},
|
|
|
|
props: {
|
|
|
|
value: {
|
|
|
|
required: true
|
|
|
|
},
|
|
|
|
hpml: {
|
|
|
|
required: true
|
|
|
|
}
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
note: null,
|
|
|
|
};
|
|
|
|
},
|
|
|
|
async mounted() {
|
|
|
|
this.note = await os.api('notes/show', { noteId: this.value.note });
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.voxdxuby {
|
|
|
|
margin: 1em 0;
|
|
|
|
}
|
|
|
|
</style>
|