摘要: 虽然vite 很香,但是vite rollup 动态加载,多页面 等问题比较难搞。webpack vue3需要升级的npm 包有:vue-loader vue-template-compiler " 阅读全文
posted @ 2022-06-21 20:51 zhoulujun 阅读(575) 评论(0) 推荐(0) 编辑
摘要: vue2 动态组件加载,this $createElement非常好使!return this $createElement(chartPanel, {props:{}}),但是到vue3如何操作呢? 阅读全文
posted @ 2022-06-21 20:46 zhoulujun 阅读(473) 评论(0) 推荐(0) 编辑
摘要: the Class API proposal is being dropped。之前class components组件升级vue3,还是用composite api重头再来^ 阅读全文
posted @ 2022-06-21 20:41 zhoulujun 阅读(215) 评论(0) 推荐(0) 编辑
摘要: 因为vue2 下 vue-property-decorator + vue-tsx-support +vuex-module-decorators/vuex-class ,class components 用的爽的也是不要不要的 但是,现在是vue3的天下了,搭配vuex4,ts也是原生支持,从vu 阅读全文
posted @ 2022-06-21 20:35 zhoulujun 阅读(168) 评论(0) 推荐(0) 编辑
摘要: Vue3 removed $on, $off and $once methods from the instance completely $emit is still a part of the existing API as it s used to trigger event handlers declaratively attached by a parent component 阅读全文
posted @ 2022-06-21 20:26 zhoulujun 阅读(390) 评论(0) 推荐(0) 编辑
摘要: 使用 ts 的情况下,挂载完全局变量后,在 vue 文件中,通过 this 对象 出来不来提示的。 阅读全文
posted @ 2022-06-21 20:22 zhoulujun 阅读(507) 评论(0) 推荐(0) 编辑
摘要: 项目从vue2 升级vue3,VueI18n需要做适当的调整。主要是Vue I18n v8 x 到Vue I18n v9 or later 的变化,其中初始化:具体可以参看 阅读全文
posted @ 2022-06-21 20:18 zhoulujun 阅读(726) 评论(2) 推荐(1) 编辑
摘要: 踩坑笔记:组合式 API之Setup(props,context)—Vue2 x到Vue3注意Vue2的 sync修饰符转Vue3中v-model可以先看vue2的 sync 修饰符 文档: 阅读全文
posted @ 2022-06-21 20:08 zhoulujun 阅读(1019) 评论(0) 推荐(0) 编辑
摘要: Vue3(其实从2 6开始)中引入了一个新的指令v-slot,用来表示具名插槽和默认插槽,可以在slot容器上使用v-slot来表示一个传入组件的插槽,通过指令参数来表示插槽的名称。 vue template中的slot插槽如何在JSX中实现呢? 阅读全文
posted @ 2022-06-21 19:56 zhoulujun 阅读(1729) 评论(0) 推荐(0) 编辑