随笔分类 - vue3.0
摘要:已经封装位 api , 直接调用就可以 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="v
阅读全文
摘要:解决方案在下面, 可以直接跳过, 这是我遇到的一些问题 先说一下问题所在,虽然vue3.0 不需要 root div, 但是 keep-alive transition 这两个标签都需要 错误示范 root div 不能加在 component 外层 <transition v-if="settin
阅读全文
摘要:插件(两个组件, 都是 antfu( vite 核心团队成员 ) 写的) npm i unplugin-auto-import unplugin-vue-components -D 使用, 下面是最简单的使用方法 vue component 文档 auto-import 文档很简单, 还需自行探索,
阅读全文
摘要:vue3.0 使用setup 语法糖 使用 props import { defineProps} from 'vue' const props = defineProps({ total: { type: Number, default: 0 }, page: { type: Number, de
阅读全文
摘要:.sync使用方法改变 带参数的 v-model 2.x <ChildComponent :title.sync="pageTitle" /> 3.x <ChildComponent v-model:title="pageTitle" /> 不带参数的 v-model 3.x <ChildCompo
阅读全文
摘要:vue3.0 中 如何在setup中使用async await 第一种方法 使用suspense 包裹你的组件 感觉不太好 文档 <template> <suspense> <router-view></router-view> </suspense> </template> <script> ex
阅读全文