Merge branch 'dev' into 'master'

uniapp【优化】: 自定义表单,样式优化

See merge request jianweie/coreshoppro!79
This commit is contained in:
花城
2024-11-12 08:55:15 +00:00

View File

@@ -3,7 +3,7 @@
<view class="layout-form-box"> <view class="layout-form-box">
<view class="form-head"> <view class="form-head">
<view class="swiper" <view class="swiper"
v-if="state.formInfo?.headType == FormHeadEnum.picture || state.formInfo?.headType == FormHeadEnum.swiper"> v-if="(state.formInfo?.headType == FormHeadEnum.picture || state.formInfo?.headType == FormHeadEnum.swiper) && state.swiperList.length > 0">
<uv-swiper :list="state.swiperList" height="400rpx" indicatorActiveColor="#D33123" <uv-swiper :list="state.swiperList" height="400rpx" indicatorActiveColor="#D33123"
:indicator="state.swiperList.length > 0"></uv-swiper> :indicator="state.swiperList.length > 0"></uv-swiper>
</view> </view>
@@ -27,7 +27,7 @@
<template v-if="item.type === FormTypeEnum.radio"> <template v-if="item.type === FormTypeEnum.radio">
<uv-radio-group v-model="item.defaultValue"> <uv-radio-group v-model="item.defaultValue">
<uv-radio v-for="cell, cellIndex in item.radioValue" :key="cellIndex" <uv-radio v-for="cell, cellIndex in item.radioValue" :key="cellIndex"
:customStyle="{ 'margin-right': '40rpx' }" activeColor="#D33123" :name="cell" :customStyle="{ 'margin-right': '40rpx','margin-bottom': '20rpx' }" activeColor="#D33123" :name="cell"
:label="cell"></uv-radio> :label="cell"></uv-radio>
</uv-radio-group> </uv-radio-group>
</template> </template>
@@ -35,7 +35,7 @@
<template v-if="item.type === FormTypeEnum.checbox"> <template v-if="item.type === FormTypeEnum.checbox">
<uv-checkbox-group @change="handleChangeChecbox($event, index)"> <uv-checkbox-group @change="handleChangeChecbox($event, index)">
<uv-checkbox v-for="cell, cellIndex in item.checkboxValue" :key="cellIndex" <uv-checkbox v-for="cell, cellIndex in item.checkboxValue" :key="cellIndex"
:checked="cell.checked" :customStyle="{ 'margin-right': '40rpx' }" :checked="cell.checked" :customStyle="{ 'margin-right': '40rpx' ,'margin-bottom': '20rpx' }"
activeColor="#D33123" :name="cell.value" :label="cell.value"></uv-checkbox> activeColor="#D33123" :name="cell.value" :label="cell.value"></uv-checkbox>
</uv-checkbox-group> </uv-checkbox-group>
</template> </template>
@@ -241,7 +241,7 @@
if (goods.length > 0) { if (goods.length > 0) {
goods.forEach((item : any) => item.defaultValue = []); goods.forEach((item : any) => item.defaultValue = []);
} }
state.swiperList = formInfo.data?.images?.split(',') || []; state.swiperList = formInfo.data?.images ? formInfo.data?.images?.split(',') : [];
/** 获取分享url */ /** 获取分享url */
state.shareUrl = await getShareUrl({ state.shareUrl = await getShareUrl({