feat(uniapp_v2): 二开功能迁移与小程序主包优化
- 从 uniapp 迁移 HJF 页面、API、组件及用户/订单相关改动 - queue、assets 使用独立分包以降低主包体积 - 修复首页单根节点与支付结果页 v-if 链 - 关闭 HjfDemoPanel 全局注册;uniNoticeBar 注释 $getAppWebview 避免 __webviewId__ 报错 - 配置域名与 manifest 应用名称;cache/store 防御性处理 Made-with: Cursor
This commit is contained in:
98
pro_v3.5.1/view/uniapp_v2/components/customForm/index.vue
Normal file
98
pro_v3.5.1/view/uniapp_v2/components/customForm/index.vue
Normal file
@@ -0,0 +1,98 @@
|
||||
<template>
|
||||
<!-- 自定义组件 -->
|
||||
<view class='wrapper card' v-if="customForm && customForm.length && isShow">
|
||||
<view class='item acea-row row-between' v-for="(item,index) in customForm" :key="index" v-if="(item.value && ['uploadPicture','dateranges'].indexOf(item.name) == -1) || (item.value.length && ['uploadPicture','dateranges'].indexOf(item.name) != -1)">
|
||||
<view class="title">{{item.titleConfig.value}}:</view>
|
||||
<view v-if="item.name == 'uploadPicture'" class='conter'>
|
||||
<view class='pictrue' v-for="(img,indexn) in item.value" :key="indexn">
|
||||
<image :src='img' mode="aspectFill" @click='getCustomForm(index,indexn)'></image>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else-if="item.name == 'dateranges'" class="conter">
|
||||
<text v-if="item.value.length">{{item.value[0]+'/'+item.value[1]}}</text>
|
||||
</view>
|
||||
<view v-else class='conter'>{{item.value}}</view>
|
||||
</view>
|
||||
<slot name="bottom"></slot>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'customForm',
|
||||
props: {
|
||||
customForm:{
|
||||
type: Array,
|
||||
default: () => []
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isShow:0
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
customForm (value) {
|
||||
if(value && value.length){
|
||||
value.forEach((item)=>{
|
||||
if(item.value){
|
||||
return this.isShow = 1
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {},
|
||||
mounted() {},
|
||||
methods: {
|
||||
getCustomForm: function(index,indexn) {
|
||||
uni.previewImage({
|
||||
urls: this.customForm[index].value,
|
||||
current: this.customForm[index].value[indexn]
|
||||
});
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.wrapper{
|
||||
background-color: #fff;
|
||||
margin-top: 6px;
|
||||
padding: 15px;
|
||||
}
|
||||
.wrapper .item {
|
||||
font-size: 28rpx;
|
||||
color: #282828;
|
||||
}
|
||||
|
||||
.wrapper .item .title{
|
||||
width: 200rpx;
|
||||
}
|
||||
|
||||
.wrapper .item~.item {
|
||||
margin-top: 20rpx;
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.wrapper .item .conter {
|
||||
color: #868686;
|
||||
width: 460rpx;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
justify-content: flex-end;
|
||||
text-align: right;
|
||||
.pictrue{
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
margin-left: 6rpx;
|
||||
image{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 6rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user