微信小程序联调
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="subpackage-host">
|
||||
<component v-if="Impl" :is="Impl" v-bind="$attrs" v-on="$listeners" />
|
||||
<SubpackageCommonBeginReception v-if="implReady" v-bind="$attrs" />
|
||||
<view v-else class="loading">
|
||||
<text v-if="error">{{ error }}</text>
|
||||
<text v-else>正在加载...</text>
|
||||
@@ -9,11 +9,16 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import SubpackageCommonBeginReception from '@/pages-subpackage/furniture_reception/common_begin_reception.vue';
|
||||
|
||||
export default {
|
||||
inheritAttrs: false,
|
||||
components: {
|
||||
SubpackageCommonBeginReception
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
Impl: null,
|
||||
implReady: false,
|
||||
error: ''
|
||||
};
|
||||
},
|
||||
@@ -43,8 +48,7 @@ export default {
|
||||
async loadImpl() {
|
||||
try {
|
||||
await this.loadSubPackagePagesSubpackage();
|
||||
const mod = await import('@/pages-subpackage/furniture_reception/common_begin_reception.vue');
|
||||
this.Impl = mod && (mod.default || mod);
|
||||
this.implReady = true;
|
||||
} catch (e) {
|
||||
console.error('[CommonBeginReceptionHost] loadImpl failed:', e);
|
||||
this.error = '模块加载失败';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="subpackage-host">
|
||||
<component v-if="Impl" :is="Impl" :incomingTab="incomingTab" />
|
||||
<FurnitureReceptionImpl v-if="implReady" :incomingTab="incomingTab" />
|
||||
<view v-else class="loading">
|
||||
<text v-if="error">{{ error }}</text>
|
||||
<text v-else>正在加载接待模块...</text>
|
||||
@@ -9,10 +9,15 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import FurnitureReceptionImpl from '@/pages-subpackage/furniture_reception/furniture_reception-impl.vue';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
FurnitureReceptionImpl
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
Impl: null,
|
||||
implReady: false,
|
||||
incomingTab: '',
|
||||
error: ''
|
||||
};
|
||||
@@ -61,8 +66,7 @@ export default {
|
||||
async loadImpl() {
|
||||
try {
|
||||
await this.loadSubPackagePagesSubpackage();
|
||||
const mod = await import('@/pages-subpackage/furniture_reception/furniture_reception-impl.vue');
|
||||
this.Impl = mod && (mod.default || mod);
|
||||
this.implReady = true;
|
||||
} catch (e) {
|
||||
console.error('[FurnitureReceptionHost] loadImpl failed:', e);
|
||||
this.error = '接待模块加载失败,请重试';
|
||||
|
||||
Reference in New Issue
Block a user