refactor(frontend): use useTemplateRef for DOM referencing
This commit is contained in:
		| @@ -25,7 +25,7 @@ SPDX-License-Identifier: AGPL-3.0-only | ||||
| </template> | ||||
|  | ||||
| <script lang="ts" setup> | ||||
| import { shallowRef, ref } from 'vue'; | ||||
| import { useTemplateRef, ref } from 'vue'; | ||||
| import * as Misskey from 'misskey-js'; | ||||
| import MkModalWindow from '@/components/MkModalWindow.vue'; | ||||
| import MkTextarea from '@/components/MkTextarea.vue'; | ||||
| @@ -42,7 +42,7 @@ const emit = defineEmits<{ | ||||
| 	(ev: 'closed'): void; | ||||
| }>(); | ||||
|  | ||||
| const dialog = shallowRef<InstanceType<typeof MkModalWindow>>(); | ||||
| const dialog = useTemplateRef('dialog'); | ||||
|  | ||||
| const caption = ref(props.default); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 syuilo
					syuilo