摘要:
// github地址: https://github.com/antfu/unplugin-auto-import 1. npm i -D unplugin-auto-import 2. vite.config.ts import AutoImport from 'unplugin-auto-im 阅读全文
摘要:
vue3_tsx语法 // 1、插件安装 npm install @vitejs/plugin-vue-jsx -D // 2、vite.config.ts配置 import { defineConfig } from 'vite' import vue from '@vitejs/plugin-v 阅读全文
摘要:
vue3 Bus兄弟组件传参 type BusClass = { emit: (name: string) => void on: (name: string, callBack: Function) => void } type ParamsKey = string | number | symb 阅读全文
摘要:
provide依赖注入 // provide 和 inject 通常成对一起使用,使一个祖先组件作为其后代组件的依赖注入方,无论这个组件的层级有多深都可以注入成功,只要他们处于同一条组件链上。 // 只能在setup语法糖或者setup函数中使用,其他optionsApi只能使用配置方式 impor 阅读全文
摘要:
异步组件 // index.vue import { defineAsyncComponent } from 'vue' const Dialog = defineAsyncComponent(() => import('./Dialog/index.vue')) // vue3 内置组件, 用于协 阅读全文
摘要:
动态组件 import A from './A.vue' import B from './B.vue' import C from './C.vue' import { markRaw, reactive } from 'vue' type Tabs = { name: string comNam 阅读全文