refactor(frontend): use useTemplateRef for DOM referencing
This commit is contained in:
parent
81ac71f7e5
commit
7b323031b7
127 changed files with 353 additions and 359 deletions
|
|
@ -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');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue