chore(组件): 全局组件改为按需引用

This commit is contained in:
2025-12-26 14:29:38 +08:00
parent e949b14090
commit 86831b8551
27 changed files with 287 additions and 103 deletions

View File

@@ -1,42 +1,51 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view>
<view class="iconfont iconshang navigate-back" @click="navigateBack"></view>
<web-view :src="src"></web-view>
<!-- #ifdef MP-WEIXIN -->
<!-- 小程序隐私协议 -->
<privacy-popup ref="privacyPopup"></privacy-popup>
<!-- #endif -->
</view>
</template>
<script>
export default {
data() {
return {
src: ''
};
},
onLoad(option) {
this.src = decodeURIComponent(option.src);
},
methods: {
navigateBack() {
uni.navigateBack({
delta: 1
});
}
}
};
</script>
<style lang="scss">
.navigate-back {
position: absolute;
top: 34rpx;
left: 34rpx;
z-index: 5;
font-size: $font-size-toolbar;
}
</style>
<template>
<page-meta :page-style="themeColor"></page-meta>
<view>
<view class="iconfont iconshang navigate-back" @click="navigateBack"></view>
<web-view :src="src"></web-view>
<!-- #ifdef MP-WEIXIN -->
<!-- 小程序隐私协议 -->
<privacy-popup ref="privacyPopup"></privacy-popup>
<!-- #endif -->
</view>
</template>
<script>
// #ifdef MP-WEIXIN
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
// #endif
export default {
components: {
// #ifdef MP-WEIXIN
privacyPopup
// #endif
},
data() {
return {
src: ''
};
},
onLoad(option) {
this.src = decodeURIComponent(option.src);
},
methods: {
navigateBack() {
uni.navigateBack({
delta: 1
});
}
}
};
</script>
<style lang="scss">
.navigate-back {
position: absolute;
top: 34rpx;
left: 34rpx;
z-index: 5;
font-size: $font-size-toolbar;
}
</style>