增加是否可评论

This commit is contained in:
aixianling
2022-05-25 11:55:34 +08:00
parent bcef93975e
commit 67d3ad9bca
2 changed files with 188 additions and 183 deletions

View File

@@ -1,73 +1,72 @@
<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" :instance="instance" :dict="dict"/>
</keep-alive>
</div>
</template>
<script>
import List from './components/List'
import Add from './components/Add'
import Detail from './components/Detail'
import List from './components/List'
import Add from './components/Add'
import Detail from './components/Detail'
export default {
name: 'AppContentManage',
label: '内容管理',
export default {
name: 'AppContentManage',
label: '内容管理',
props: {
instance: Function,
dict: Object
},
props: {
instance: Function,
dict: Object
},
data () {
return {
component: 'List',
params: {},
include: []
data() {
return {
component: 'List',
params: {},
include: []
}
},
components: {
Add,
List,
Detail
},
created() {
this.dict.load("yesOrNo")
},
methods: {
onChange(data) {
if (data.type === 'Add') {
this.component = 'Add'
this.params = data.params
}
},
components: {
Add,
List,
Detail
},
if (data.type === 'Detail') {
this.component = 'Detail'
this.params = data.params
}
mounted () {
},
if (data.type === 'list') {
this.component = 'List'
this.params = data.params
methods: {
onChange (data) {
if (data.type === 'Add') {
this.component = 'Add'
this.params = data.params
}
if (data.type === 'Detail') {
this.component = 'Detail'
this.params = data.params
}
if (data.type === 'list') {
this.component = 'List'
this.params = data.params
this.$nextTick(() => {
if (data.isRefresh) {
this.$refs.component.getList()
}
})
}
this.$nextTick(() => {
if (data.isRefresh) {
this.$refs.component.getList()
}
})
}
}
}
}
</script>
<style lang="scss">
.doc-circulation {
height: 100%;
background: #F3F6F9;
overflow: auto;
}
.doc-circulation {
height: 100%;
background: #F3F6F9;
overflow: auto;
}
</style>