use static url instead v-bind

This commit is contained in:
Jeffrey Hsu 2025-01-14 02:57:28 +08:00
parent 011cd6a549
commit d4b8191eba

View File

@ -4,7 +4,6 @@ import { computed, ref } from 'vue'
// 使 ref x y // 使 ref x y
const mouseX = ref(0), const mouseX = ref(0),
mouseY = ref(0), mouseY = ref(0),
characterUrl = ref(''),
typedString = ['Hello, Welcome to this site!^1000', '欢迎访问本网站!^1000'], typedString = ['Hello, Welcome to this site!^1000', '欢迎访问本网站!^1000'],
littleWidget = [ littleWidget = [
@ -45,7 +44,7 @@ const mouseX = ref(0),
})) }))
onMounted(() => { onMounted(() => {
characterUrl.value = getAssetURL('common/hoshino.png')
}) })
</script> </script>
@ -112,7 +111,7 @@ onMounted(() => {
sm:visible sm:opacity-100 lg:-top-28 lg:-right-28 lg:-bottom-10" sm:visible sm:opacity-100 lg:-top-28 lg:-right-28 lg:-bottom-10"
> >
<img <img
:src="characterUrl" src="~/assets/images/common/hoshino.png"
alt="" alt=""
class="float-right h-full" class="float-right h-full"
draggable="false" draggable="false"