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

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>
<div class="doc-circulation ailist-wrapper">
<keep-alive :include="['List']">
<component ref="component" :is="component" @change="onChange" :params="params" :instance="instance" :dict="dict"></component>
<component ref="component" :is="component" @change="onChange" :params="params" v-bind="$props"/>
</keep-alive>
</div>
</template>
@@ -14,12 +14,11 @@
export default {
name: 'AppVillageIntroduction',
label: '本村简介',
props: {
instance: Function,
dict: Object
dict: Object,
menuName: {default: "本村简介"}
},
data() {
return {
component: 'List',
@@ -27,7 +26,6 @@
include: []
}
},
components: {
Add,
List,

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">
@@ -44,13 +44,15 @@
<script>
import {mapState} from 'vuex'
export default {
name: 'Add',
props: {
instance: Function,
dict: Object,
params: Object
params: Object,
menuName: String
},
data() {
@@ -74,9 +76,9 @@
},
computed: {
...mapState(['user'])
...mapState(['user']),
pageTitle: v => `${!!v.params.id ? '编辑' : '添加'}${v.menuName}`
},
created() {
this.form.areaId = this.user.info.areaId
this.disabledLevel = this.user.info.areaList.length

View File

@@ -1,7 +1,7 @@
<template>
<ai-list class="notice">
<template slot="title">
<ai-title title="本村简介" isShowBottomBorder isShowArea v-model="search.areaId" :instance="instance" @change="search.current = 1, getList()"></ai-title>
<ai-title :title="menuName" isShowBottomBorder isShowArea v-model="search.areaId" :instance="instance" @change="search.current = 1, getList()"></ai-title>
</template>
<template slot="content">
<ai-search-bar class="search-bar">
@@ -57,9 +57,9 @@
props: {
instance: Function,
dict: Object
dict: Object,
menuName:String
},
data() {
return {
search: {

View File

@@ -1,7 +1,7 @@
<template>
<div class="doc-circulation ailist-wrapper">
<keep-alive :include="['List']">
<component ref="component" :is="component" @change="onChange" :params="params" :instance="instance" :dict="dict"></component>
<component ref="component" :is="component" @change="onChange" :params="params" v-bind="$props"/>
</keep-alive>
</div>
</template>
@@ -17,7 +17,8 @@
props: {
instance: Function,
dict: Object
dict: Object,
menuName: {default: "村规民约"}
},
data() {

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 () {

View File

@@ -1,7 +1,7 @@
<template>
<ai-list class="notice">
<template slot="title">
<ai-title title="村规民约" isShowBottomBorder isShowArea v-model="search.areaId" :instance="instance" @change="search.current = 1, getList()"></ai-title>
<ai-title :title="menuName" isShowBottomBorder isShowArea v-model="search.areaId" :instance="instance" @change="search.current = 1, getList()"></ai-title>
</template>
<template slot="content">
<ai-search-bar class="search-bar">
@@ -52,12 +52,14 @@
<script>
import {mapState} from 'vuex'
export default {
name: 'List',
props: {
instance: Function,
dict: Object
dict: Object,
menuName: String
},
data() {