setup() {
17 const activeComponent = ref("ComponentA")
18 function changeHandler() {
19 activeComponent.value = activeComponent.value === "ComponentA" ? "ComponentB" : "ComponentA"
20 }
老师,为什么这个setup写在script标签里面就不可以了啊
这是什么原因................................................................................
getCount: (state) => {
state.count
}
为啥加个大括号就不成功了
屏幕截图 2023-02-19 115540.png
老师,我的这个res为undefined是怎么回事
老师,您帮我看一下为什么会报错
没听懂,尤其是interface 怎么跑出来的,这个之前没讲过啊
老师组件式编程式导航使用路由名字跳转应该怎么跳转呢?
生命周期中的创建期,相应的元素都读取不到,这个时期的钩子函数有什么用?
.................
屏幕截图 2023-02-20 202054.png
为什么我这个vuex内容是next,用也用不了
老师这个地方,A组件向B组件传递函数,函数传递不应该用@onEvent吗?这地方为啥用冒号:onEvent传递了呢
import { useRouter } from 'vue-router' const router = useRouter() function clickhander() { // 命名路由的使用 router.push({ name: 'home' }) } // 在导航结束之后触发 router.afterEach((to, from) => { console.log(to, from); })
在组件中这样引用行吗
为什么我这个include没有效果,反而使keepalive标签也失效了
<keep-alive include="ComponentA">
<component :is="activeComponent"></component>
</keep-alive>
------------------------------------------------------------------
setup () {
const activeComponent = ref('ComponentA')
function changeHandle () {
activeComponent.value = activeComponent.value === 'ComponentA'?'ComponentB':'ComponentA'
return {
activeComponent,
changeHandle
vue-base.rar
为什么全局注册没生效...
非常抱歉给您带来不好的体验!为了更深入的了解您的学习情况以及遇到的问题,您可以直接拨打投诉热线:
我们将在第一时间处理好您的问题!
关于
课程分类
百战程序员微信公众号
百战程序员微信小程序
©2014-2025百战汇智(北京)科技有限公司 All Rights Reserved 北京亦庄经济开发区科创十四街 赛蒂国际工业园网站维护:百战汇智(北京)科技有限公司 京公网安备 11011402011233号 京ICP备18060230号-3 营业执照 经营许可证:京B2-20212637