vue activated在子组件中的使用方法
页面:base:
<template> <div class="tab-container"> <h1 style="text-align: center"> 申请{{ form.category }}{{ form.companyType }}入驻 </h1> <div class="form-panel" style="margin-left: 20px;text-align: right;"> <el-button type="info" @click="cancelSave">取消</el-button> <el-button type="warning" @click="transientSave">暂存</el-button> <el-button type="danger" @click="persistSave">保存</el-button> </div> <el-tabs v-model="activeName" style="margin-top: 15px" type="border-card" :before-leave="collectPaneFormData" @tab-click="initPaneData"> <el-tab-pane v-for="item in tabMapOptions" :key="item.key" :label="item.label" :name="item.key"> <keep-alive> <tab-pane :is="item.key" :ref="item.key" :type="item.key" @create="showCreatedTimes" /> <!--<component :is="item.key" :ref="item.key" :type="item.key" @create="showCreatedTimes" />--> </keep-alive> </el-tab-pane> </el-tabs> </div> </template>
有五个tab-pane, 其中三个子组件中有activated方法。这三个子组件中都有连接跳转到person, 当在person中进行:this.$router.go(-1)
// 取消,关闭返回 cancelSubmit() { // 调用全局挂载的方法,关闭当前页 this.$store.dispatch('tagsView/delView', this.$route) this.$router.go(-1) },
这时三个子组件的activated方法都会执行吗?如何只让跳转到person中的哪个子组件的activated方法执行,其它两个不执行activated方法
关于vue activated在子组件中的使用详情的文章就介绍至此,更多相关vue activated在子组件中的使用内容请搜索编程宝库以前的文章,希望以后支持编程宝库!
问题描述表格中的表头一般都是不换行的,不过有时候在某些业务场景中,需要让表头的文字换行展示一下,我们先看一下效果图 效果图 三种方式的代码看注释就行啦。演示的话,直接复 ...