如何使用带有 img 标签的 v-slot?
How to use v-slot with img tag?
如何使用 nuxt 正确地向图像添加 link?
我目前正在使用 tag="img"
,但标签道具似乎已被弃用。那么有没有更好的方法呢?
<nuxt-link
tag="img"
:src="require('~/assets/ProfitApp-icon.png')"
height="55"
alt="logo"
class="px-3"
to="/"
/>
WARN [vue-router] 's tag prop is deprecated and has
been removed in Vue Router 4. Use the v-slot API to remove this
warning:
https://next.router.vuejs.org/guide/migration/#removal-of-event-and-tag-props-in-router-link.
为什么不使用这里描述的插槽:
<nuxt-link to="/" class="px-3">
<img
:src="require('~/assets/ProfitApp-icon.png')"
height="55"
alt="logo"
/>
</nuxt-link>
如何使用 nuxt 正确地向图像添加 link?
我目前正在使用 tag="img"
,但标签道具似乎已被弃用。那么有没有更好的方法呢?
<nuxt-link
tag="img"
:src="require('~/assets/ProfitApp-icon.png')"
height="55"
alt="logo"
class="px-3"
to="/"
/>
WARN [vue-router] 's tag prop is deprecated and has been removed in Vue Router 4. Use the v-slot API to remove this warning: https://next.router.vuejs.org/guide/migration/#removal-of-event-and-tag-props-in-router-link.
为什么不使用这里描述的插槽:
<nuxt-link to="/" class="px-3">
<img
:src="require('~/assets/ProfitApp-icon.png')"
height="55"
alt="logo"
/>
</nuxt-link>