diff --git a/src/store/modules/viewTags.js b/src/store/modules/viewTags.js index 8dd7aef9..b34f71e6 100644 --- a/src/store/modules/viewTags.js +++ b/src/store/modules/viewTags.js @@ -24,8 +24,8 @@ export default { } }) }, - updateViewTagsTitle(state, title='', fullPath){ - const nowFullPath = fullPath || location.hash.substring(1) + updateViewTagsTitle(state, title=''){ + const nowFullPath = location.hash.substring(1) state.viewTags.forEach((item) => { if (item.fullPath == nowFullPath){ item.meta.title = title diff --git a/src/views/template/list/save.vue b/src/views/template/list/save.vue index 34c244b2..8f38b3f0 100644 --- a/src/views/template/list/save.vue +++ b/src/views/template/list/save.vue @@ -61,7 +61,6 @@ mounted() { if(this.id){ //更改tag标签 - //updateViewTagsTitle 可携带第2个参数,要更改哪个fullPath的标题,不设置就是变更当前 this.$store.commit("updateViewTagsTitle", `详情ID:${this.id}`) } },