fix
This commit is contained in:
		| @@ -1,38 +1,19 @@ | ||||
| <template> | ||||
|   <ai-list v-if="!isShowDetail"> | ||||
|     <template slot="title"> | ||||
|       <ai-title title="大屏列表" :isShowBottomBorder="false" :instance="instance"></ai-title> | ||||
|     </template> | ||||
|     <template slot="tabs"> | ||||
|       <el-tabs v-model="currIndex"> | ||||
|         <el-tab-pane v-for="(tab,i) in tabs" :key="i" :label="tab.label"> | ||||
|           <component :urlPrefix="urlPrefix" :areaId="areaId" :ref="tab.name" v-if="currIndex == i" :is="tab.comp" @change="onChange" lazy :instance="instance" :dict="dict" :permissions="permissions" /> | ||||
|         </el-tab-pane> | ||||
|       </el-tabs> | ||||
|     </template> | ||||
|   </ai-list> | ||||
|   <Add v-else-if="componentName === 'Add'" :urlPrefix="urlPrefix" :areaId="areaId" :params="params" :instance="instance" :dict="dict" :permissions="permissions" @change="onChange"></Add> | ||||
|   <SourceData v-else-if="componentName === 'SourceData'" :urlPrefix="urlPrefix" :params="params" :instance="instance" :dict="dict" :permissions="permissions" @change="onChange"></SourceData> | ||||
|   <section class="AppDesigner"> | ||||
|     <component :is="currentPage" v-bind="$props"/> | ||||
|   </section> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import List from './components/List.vue' | ||||
| import Add from './components/Add' | ||||
| import SourceData from './components/SourceData' | ||||
| import dvui from '../../../project/dvui/entries' | ||||
| import Vue from "vue"; | ||||
|   | ||||
| Vue.use(dvui) | ||||
| export default { | ||||
|   name: 'AppDesigner' , | ||||
|   label: '大屏设计', | ||||
|   | ||||
|   components: { | ||||
|     List, | ||||
|     Add, | ||||
|     SourceData | ||||
|   }, | ||||
| import Preview from "./components/preview"; | ||||
|  | ||||
| export default { | ||||
|   name: 'AppDesigner', | ||||
|   label: '大屏设计', | ||||
|   components: {Preview, List, Add, SourceData}, | ||||
|   props: { | ||||
|     instance: Function, | ||||
|     dict: Object, | ||||
| @@ -44,6 +25,12 @@ export default { | ||||
|   }, | ||||
|  | ||||
|   computed: { | ||||
|     currentPage() { | ||||
|       const {hash} = this.$route | ||||
|       return hash == "#sourceData" ? SourceData : | ||||
|           hash == "#add" ? Add : | ||||
|               hash == "#preview" ? Preview : List | ||||
|     }, | ||||
|     tabs() { | ||||
|       return [ | ||||
|         {label: '大屏列表', name: 'FormList', comp: List, permission: ''} | ||||
| @@ -84,8 +71,6 @@ export default { | ||||
|       } | ||||
|     } | ||||
|   }, | ||||
|   created() { | ||||
|   } | ||||
| } | ||||
| </script> | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user