mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-04 17:45:51 +02:00
refactor(frontend): use useTemplateRef for DOM referencing
This commit is contained in:
@@ -10,7 +10,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, onUnmounted, shallowRef } from 'vue';
|
||||
import { onMounted, onUnmounted, useTemplateRef } from 'vue';
|
||||
import { useWidgetPropsManager } from './widget.js';
|
||||
import type { WidgetComponentProps, WidgetComponentEmits, WidgetComponentExpose } from './widget.js';
|
||||
import type { GetFormResultType } from '@/utility/form.js';
|
||||
@@ -35,7 +35,7 @@ const { widgetProps, configure } = useWidgetPropsManager(name,
|
||||
emit,
|
||||
);
|
||||
|
||||
const live2d = shallowRef<HTMLIFrameElement>();
|
||||
const live2d = useTemplateRef('live2d');
|
||||
|
||||
const touched = () => {
|
||||
//if (this.live2d) this.live2d.changeExpression('gurugurume');
|
||||
|
||||
Reference in New Issue
Block a user