01 2021 档案
摘要:方式1 Props 父组件代码 <template> <!-- 父组件 --> <div class="parent"> <Child :num="count" @handle="changeValue" /> <button @click="add">父组件的按钮</button> </div>
阅读全文
摘要:首先在组件中导入 getCurrentInstance 1 import { 2 defineComponent, 3 reactive, 4 getCurrentInstance // 从此函数的返回值中获取到ctx属性调用$router.push() 5 } from 'vue' 然后在setu
阅读全文
摘要:main.ts代码 import { createApp } from 'vue' import App from './App.vue' import router from './router' import store from './store' // Element Plus import
阅读全文