Commit cb4cdda4 by chenwq

fix(群活码管理): 动态设置页面标题

在进入创建/修改群活码页面时,根据路由参数动态设置页面标题。修复了页面标题始终显示为“创建群活码”的问题,现在当 optType 为 'update' 时正确显示“修改群活码”。
1 parent 3f7385ab
...@@ -212,6 +212,11 @@ export default { ...@@ -212,6 +212,11 @@ export default {
}, },
}; };
}, },
beforeRouteEnter(to, from, next) {
console.log(to.query.optType)
to.meta.title = to.query.optType == 'update' ? '修改群活码' : '创建群活码'
next()
},
mounted() { mounted() {
const { optType, id } = this.$route.query; const { optType, id } = this.$route.query;
const promises = [this.getStoreList()]; const promises = [this.getStoreList()];
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!