From 254cfaea284d12f188e28f56a0cec863e3177a49 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 25 Oct 2020 01:21:41 +0900 Subject: 自前ルーティング (#6759) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip --- src/client/pages/note.vue | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/client/pages/note.vue') diff --git a/src/client/pages/note.vue b/src/client/pages/note.vue index cd31ccc338..a458d6c063 100644 --- a/src/client/pages/note.vue +++ b/src/client/pages/note.vue @@ -42,6 +42,12 @@ export default defineComponent({ MkRemoteCaution, MkButton, }, + props: { + noteId: { + type: String, + required: true + } + }, data() { return { INFO: computed(() => this.note ? { @@ -77,7 +83,7 @@ export default defineComponent({ }; }, watch: { - $route: 'fetch' + noteId: 'fetch' }, created() { this.fetch(); @@ -86,7 +92,7 @@ export default defineComponent({ fetch() { Progress.start(); os.api('notes/show', { - noteId: this.$route.params.note + noteId: this.noteId }).then(note => { Promise.all([ os.api('users/notes', { -- cgit v1.3.1-freya