更新保险组件,可选展示switch

This commit is contained in:
TOP糯米 2023-02-25 18:54:38 +08:00
parent bc86fcb3df
commit aed9276443
1 changed files with 8 additions and 2 deletions

View File

@ -9,7 +9,7 @@
</view>
<view class="switch-container">
<text class="price">¥ 6.00</text>
<view @click="changeState">
<view v-show="showSwitch" class="switch" @click="changeState">
<widget-switch :open="state" />
</view>
</view>
@ -29,6 +29,10 @@ export default {
WidgetSwitch,
},
props: {
showSwitch: {
type: Boolean,
default: true,
},
insurance: {
type: Boolean,
default: false,
@ -94,7 +98,9 @@ export default {
.price {
font-size: 30rpx;
color: #ec7655;
margin-right: 38rpx;
}
.switch {
margin-left: 38rpx;
}
}
}