public.js
655 Bytes
import { getForm } from "../flowform";
import { getHomeNoticeList } from "@/api/user.js"
export default {
data () {
return {
noticeList: [],
}
},
created () {
getHomeNoticeList().then(res => {
if (res.result) {
this.noticeList = res.result.noticeList
}
})
},
methods: {
//右侧表单选项卡事件
beforeLeave (activeName, oldActiveName) {
if (activeName && activeName != 0) this.getFromRouter(activeName)
},
//切换选项卡内容组件
getFromRouter (tabname) {
console.log(tabname);
this.componentTag = getForm(tabname, this.$route.query.sqywbm);
}
}
}