Commit 361a03d6 authored by 王康's avatar 王康

tab

parent fdc1b20f
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
<script> <script>
// import _ from 'lodash' // import _ from 'lodash'
// import request from '@/utils/request' // import request from '@/utils/request'
import schema from '../../schemas/hm_org_schema' // import schema from '../../schemas/hm_org_schema'
/** /**
* 毫末科技的选项卡组件. * 毫末科技的选项卡组件.
...@@ -55,11 +55,14 @@ ...@@ -55,11 +55,14 @@
* 对于所有毫末科技的组件,必须传schema,以完成数据的交互 * 对于所有毫末科技的组件,必须传schema,以完成数据的交互
*/ */
props: { props: {
schema: {
type: Object,
required: true
}
}, },
data() { data() {
return { return {
activeName: 'first', activeName: 'first',
schema: schema['CcHmUser'],
swiperOption: { swiperOption: {
slidesPerView: 2, slidesPerView: 2,
slidesPerGroup: 2, slidesPerGroup: 2,
......
<template> <template>
<div> <div>
<hm-tab></hm-tab> <hm-tab :schema="schema['CcHmUser']"></hm-tab>
</div> </div>
</template> </template>
<script> <script>
import HmTab from './HmTab.vue' import HmTab from './HmTab.vue'
// import schema from '../../schemas/hm_org_schema' import schema from '../../schemas/hm_org_schema'
export default { export default {
name: 'HmTab', name: 'HmTab',
// 继承其他组件 // 继承其他组件
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
filters: { filters: {
}, },
created() { created() {
this.schema = schema
}, },
methods: {} methods: {}
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment