摘要:
代码 <template> <div class="box">childB</div> </template> <script lang="ts" setup> import { reactive, watch, ref } from "vue"; const data1 = reactive({ 阅读全文
摘要:
概论 defineEmits 用来定义子组件暴漏给父组件的自定义事件 测试代码 子组件 <template> <div class="box">child</div> </template> <script lang="ts" setup> interface Emit { (e: "emitfn1 阅读全文
摘要:
自动导入vite配置 需要安装: npm install -D unplugin-vue-components unplugin-auto-import vite.config.ts配置 // vite.config.ts import { defineConfig } from 'vite' im 阅读全文
摘要:
安装 # 使用 npm npm install pinia@next # 使用 yarn yarn add pinia@next 代码使用 store代码 import { ref, computed } from 'vue' import { defineStore } from 'pinia' 阅读全文