07 2021 档案
摘要:wx.getMenuButtonBoundingClientRect() ios手机偶尔复现是0 这个问题很早就有但是微信官方也一直没有解决,下面给大家介绍一个兼容做法(wx.getMenuButtonBoundingClientRect()["top"]举个例子) 1,步骤一 在app.js on
阅读全文
摘要:覆盖Ant Design Vue Drawer组件的默认样式 1,在组件的html中设置wrapClassName="drawer-style" <a-drawer :mask-style="{'background':'rgba(51, 51, 51, 0)'}" width="512px" pl
阅读全文
摘要:1,引入vuex import { createStore } from "vuex"; 2,创建store const store = createStore({ state(){ return { count: 1, } } mutations: { add(state){ state.coun
阅读全文
摘要:组件watch选项和实例方法$watch不再支持点分隔符字符串路径 以,分隔的表达式不再被watch和$watch支持,可以使用计算函数作为$watch参数实现。 1,vue3同时监听多个参数执行相同的方法 watch([() => book.name, count], ([name, count]
阅读全文
摘要:1,v-enter -> v-enter-from 2,v-leave -> v-leave-from 相对应的就是 v-enter-from + v-enter-to -> v-enter-active v-leave-from + v-leave-to -> v-leave-active <te
阅读全文
摘要:bind -> beforeMount 组件挂载之前 inserted -> mounted beforeUpdate 元素自身更新前调用,和组件生命周期钩子很像(更新前用) componentUpdate -> updated(更新后用) beforeUnmount 和生命周期相似,元素将要被调用
阅读全文
摘要:一,vue3路由跳转 1,引入vue-router import { useRouter } from 'vue-router'; 2,steup中定义方法push,replace等等 const { push, replace} = useRouter(); 二,vue3路由url传参 1,用pu
阅读全文