diff options
| author | zyoshoka <107108195+zyoshoka@users.noreply.github.com> | 2023-12-26 14:19:35 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-26 14:19:35 +0900 |
| commit | 75034d9240c069baff5a24409ea172374261ea3b (patch) | |
| tree | 2b701b310befef3cdd6a69e78b75f66d48809826 /packages/frontend/src/pages/page-editor/page-editor.vue | |
| parent | (dev) Issue Templateに、自分で実装してPRを出したいかの意思... (diff) | |
| download | misskey-75034d9240c069baff5a24409ea172374261ea3b.tar.gz misskey-75034d9240c069baff5a24409ea172374261ea3b.tar.bz2 misskey-75034d9240c069baff5a24409ea172374261ea3b.zip | |
refactor(frontend): Reactivityで型を明示するように (#12791)
* refactor(frontend): Reactivityで型を明示するように
* fix: プロパティの参照が誤っているのを修正
* fix: 初期化の値を空配列に書き換えていた部分をnullに置き換え
Diffstat (limited to 'packages/frontend/src/pages/page-editor/page-editor.vue')
| -rw-r--r-- | packages/frontend/src/pages/page-editor/page-editor.vue | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/packages/frontend/src/pages/page-editor/page-editor.vue b/packages/frontend/src/pages/page-editor/page-editor.vue index e95dd1f39e..bcfbf5825f 100644 --- a/packages/frontend/src/pages/page-editor/page-editor.vue +++ b/packages/frontend/src/pages/page-editor/page-editor.vue @@ -62,6 +62,7 @@ SPDX-License-Identifier: AGPL-3.0-only <script lang="ts" setup> import { computed, provide, watch, ref } from 'vue'; +import * as Misskey from 'misskey-js'; import { v4 as uuid } from 'uuid'; import XBlocks from './page-editor.blocks.vue'; import MkButton from '@/components/MkButton.vue'; @@ -85,16 +86,16 @@ const props = defineProps<{ const tab = ref('settings'); const author = ref($i); const readonly = ref(false); -const page = ref(null); -const pageId = ref(null); -const currentName = ref(null); +const page = ref<Misskey.entities.Page | null>(null); +const pageId = ref<string | null>(null); +const currentName = ref<string | null>(null); const title = ref(''); -const summary = ref(null); +const summary = ref<string | null>(null); const name = ref(Date.now().toString()); -const eyeCatchingImage = ref(null); -const eyeCatchingImageId = ref(null); +const eyeCatchingImage = ref<Misskey.entities.DriveFile | null>(null); +const eyeCatchingImageId = ref<string | null>(null); const font = ref('sans-serif'); -const content = ref([]); +const content = ref<Misskey.entities.Page['content']>([]); const alignCenter = ref(false); const hideTitleWhenPinned = ref(false); |