![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
vant-vue
老君-hjs
屎山雕花师
展开
-
vue3.x使用vantUI离开当前的组件,在onBeforeRouteLeave中触发vant弹框失效
版本号:vue/cli:4.5.12vant:^3.0.10问题离开当前的组件,在onBeforeRouteLeave中触发vant弹框失效解决方案import { ref} from 'vue';import { onBeforeRouteLeave} from "vue-router";export default { setup() { const showDialog = ref(false); onBeforeRouteLeave((to) => {原创 2021-11-05 18:17:02 · 1982 阅读 · 0 评论 -
vue3.x使用vantUI报警告:Input elements should have autocomplete attributes (suggested: “new-password“)
问题使用van-field 输入框, 当 type="password" 时, 报以下警告:Input elements should have autocomplete attributes (suggested: "new-password")解决方案<van-field type="password" autocomplete />参考资料:强烈建议大家看一下!!里面有很多其他类型,可以了解一番~input 标签原生的自动完成属性...原创 2021-11-05 16:41:10 · 385 阅读 · 0 评论 -
vue3.x使用vantUI报错Failed to resolve component: van-**-**
版本号:vue/cli:4.5.12vant:^3.0.10问题:Failed to resolve component: van-cell-group at <Home onVnodeUnmounted=fn<onVnodeUnmounted> ref=Ref< undefined > key=0 >原因:van-cell-group 该组件未引入解决方案:在`main.js`文件中引入然后再在页面使用即可具体如下:impo..原创 2021-11-05 16:14:03 · 6599 阅读 · 0 评论 -
vant展示组件之Lazyload 懒加载
版本号:vue/cli:4.5.12vant:^3.0.10使用方式:// 在main.js文件中import { createApp} from 'vue'import { Lazyload} from 'vant'import default from '@/assets/images/default.png'// 注册createApp(App).use(Lazyload, { lazyComponent: true, attempt: 3,原创 2021-09-26 19:49:20 · 2350 阅读 · 0 评论