| | |
| | | <template> |
| | | <div class="UI-dynamic" :id="'UI-dynamic-'+areasName+componentVO.oid"> |
| | | <div v-if="isError" style="color: #F56C6C">这个自定义页面的地址格式不正确。推荐使用bs=?type=xxx&context=yyy&pparam=zzz这种形式</div> |
| | | <div v-if="isError" style="color: #F56C6C">这个自定义页面的地址格式不正确。推荐使用bs=组件name?type=xxx&context=yyy&pparam=zzz这种形式</div> |
| | | <component v-else :is="currentComponent" |
| | | :btmType="btmType" |
| | | :content="content" |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import {queryStringToObject} from '@/util/util' |
| | | export default { |
| | | name: "dynamic-custom", |
| | | components:{ |
| | |
| | | } |
| | | } |
| | | }, |
| | | computed:{ |
| | | }, |
| | | computed: {}, |
| | | created() { |
| | | |
| | | }, |
| | |
| | | if(this.customClass.split('?')[0]!='' && this.customClass.split('?')[0]!='UI' && this.customClass.split('?')[0]!='ui'){ |
| | | this.currentComponent=this.customClass.split('?')[0]; |
| | | } |
| | | this.customClass=this.componentVO.customClass.split("?")[1].split('&'); |
| | | let urlParams={}; |
| | | let btmType='' |
| | | let content='' |
| | | this.customClass.forEach(item=>{ |
| | | var preParam =item.split("="); |
| | | if(preParam[0]=='type'){ |
| | | btmType=preParam[1]; |
| | | }else if(preParam[0]=='context'){ |
| | | content=preParam[1]; |
| | | }else{ |
| | | urlParams[preParam[0]] = preParam[1]; |
| | | } |
| | | }) |
| | | let urlParams = queryStringToObject(this.customClass); |
| | | let btmType = urlParams.type; |
| | | let content = urlParams.context; |
| | | |
| | | |
| | | this.btmType=btmType, |
| | | this.content=content, |
| | | this.btmType = btmType; |
| | | this.content = content; |
| | | this.urlParams=Object.assign(this.paramVOS,urlParams) |
| | | |
| | | //this.getHeight(this.$parent); |