特制化,使标题跟随菜单目录变化

This commit is contained in:
aixianling
2022-08-18 17:27:50 +08:00
parent 3b7ee0c6cc
commit 35e612d35c
6 changed files with 295 additions and 290 deletions

View File

@@ -1,7 +1,7 @@
<template>
<ai-detail>
<template slot="title">
<ai-title :title="params.id ? '编辑村规民约' : '添加村规民约'" isShowBack isShowBottomBorder @onBackClick="cancel(false)">
<ai-title :title="pageTitle" isShowBack isShowBottomBorder @onBackClick="cancel(false)">
</ai-title>
</template>
<template slot="content">
@@ -50,7 +50,8 @@
props: {
instance: Function,
dict: Object,
params: Object
params: Object,
menuName: String
},
data () {
@@ -74,7 +75,8 @@
},
computed: {
...mapState(['user'])
...mapState(['user']),
pageTitle: v => `${!!v.params.id ? '编辑' : '添加'}${v.menuName}`
},
created () {