51 lines
864 B
Vue
51 lines
864 B
Vue
<template>
|
|
<div class="AppMaterialLibrary-wrapper">
|
|
<component ref="component" :is="component" @change="onChange" :params="params" :instance="instance" :dict="dict"></component>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import List from './components/List'
|
|
|
|
export default {
|
|
name: 'AppMaterialLibrary',
|
|
label: '素材库',
|
|
|
|
props: {
|
|
instance: Function,
|
|
dict: Object
|
|
},
|
|
|
|
data () {
|
|
return {
|
|
component: 'List',
|
|
params: {}
|
|
}
|
|
},
|
|
|
|
components: {
|
|
List
|
|
},
|
|
|
|
mounted () {
|
|
},
|
|
|
|
methods: {
|
|
onChange (data) {
|
|
if (data.type === 'list') {
|
|
this.component = 'List'
|
|
this.params = data.params
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
.AppMaterialLibrary-wrapper {
|
|
height: 100%;
|
|
background: #F3F6F9;
|
|
overflow: auto;
|
|
}
|
|
</style>
|