素材库

This commit is contained in:
yanran200730
2023-03-02 18:01:56 +08:00
parent 6a91ea51c9
commit 152defa377
5 changed files with 303 additions and 218 deletions

View File

@@ -1,14 +1,13 @@
<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" :instance="instance" :dict="dict"></component>
</keep-alive>
</div>
</template>
<script>
import List from './components/List'
import Add from './components/Add'
export default {
name: 'AppMaterialLibrary',
@@ -28,7 +27,6 @@
},
components: {
Add,
List
},
@@ -36,23 +34,6 @@
},
methods: {
onChange (data) {
if (data.type === 'Add') {
this.component = 'Add'
this.params = data.params
}
if (data.type === 'list') {
this.component = 'List'
this.params = data.params
this.$nextTick(() => {
if (data.isRefresh) {
this.$refs.component.getList()
}
})
}
}
}
}
</script>