Commit a3e4ef51 authored by Damon's avatar Damon

fix: 备件选择样式修改

parent a5f0799c
<template>
<view class="u-flex bottom" :style="customStyle">
<view class="select-view">
<view class="u-flex bottom-left" v-if="showChecked">
<view class="left-list"><u-checkbox icon-size="28" size="40" v-model="checked" @change="selectAll" shape="circle"/></view>
<view class="left-list">全选</view>
</view>
<view class="u-flex bottom-center">
<view class="center-list">已选择 {{ partNum }}</view>
<view class="center-list">合计:<text class="num"> {{ num }} </text></view>
</view>
</view>
<view class="u-flex bottom" :style="customStyle">
<view class="select-view" v-if="showChecked">
<view class="u-flex bottom-left">
<view class="left-list"><u-checkbox icon-size="28" size="40" v-model="checked" @change="selectAll" shape="circle"/></view>
<view class="left-list">全选</view>
</view>
<view class="u-flex bottom-center">
<view class="center-list">已选择 {{ partNum }}</view>
<view class="center-list">共:<text class="num"> {{ num }} </text></view>
</view>
</view>
<view class="u-flex select-num" v-if="!showChecked">
<view class="num-left">
<u-badge type="error" :show-zero="true" :count="partNum" :offset="[0, 0]"></u-badge>
<u-image width="72rpx" height="72rpx" :lazy-load="false" :src="partsImage"></u-image>
</view>
<view class="num-right">共:<text class="num"> {{ num }} </text></view>
</view>
<view class="u-flex bottom-right">
<button :class="['btn', btnActive]" @click="submit">{{ submitTxt }}</button>
</view>
......@@ -55,10 +62,10 @@
return '确定'
}
}
},
customStyle: {
type: String,
default: 'background-color: #FFFFFF;padding: 0 30rpx;'
},
customStyle: {
type: String,
default: 'background-color: #FFFFFF;padding: 0 30rpx;'
},
data() {
return {
......@@ -66,6 +73,9 @@
}
},
computed: {
partsImage() {
return process.uniEnv.qn_base_url + 'part_num.png'
},
btnActive() {
return this.btnStatus ? 'btn-active' : ''
}
......@@ -92,53 +102,70 @@
.bottom {
width: 100%;
height: 180rpx;
// background: #fff;
background: #fff;
justify-content: space-between;
.u-flex {
flex-direction: column;
.select-view {
display: flex;
align-items: center;
}
.select-view {
display: flex;
align-items: center;
}
.bottom-left {
// margin-left: 30rpx;
.left-list {
width: 100%;
&:nth-of-type(1) {
padding-left: 3rpx;
.u-flex {
flex-direction: column;
align-items: center;
}
.bottom-left {
margin-left: 30rpx;
.left-list {
width: 100%;
&:nth-of-type(1) {
padding-left: 3rpx;
}
&:nth-of-type(2) {
margin-top: 8rpx;
font-size: 20rpx;
}
}
&:nth-of-type(2) {
margin-top: 8rpx;
font-size: 20rpx;
}
.bottom-center {
flex: 1;
align-items: flex-start;
margin: 0 20rpx;
.center-list {
&:nth-of-type(1) {
color: #666;
font-size: 26rpx;
}
&:nth-of-type(2) {
color: #333;
font-size: 32rpx;
margin-top: 8rpx;
font-weight: bold;
.num {
color: #2272FF;
padding-right: 10rpx;
}
}
}
}
}
.bottom-center {
.select-num {
flex: 1;
align-items: flex-start;
// margin: 0 20rpx;
.center-list {
&:nth-of-type(1) {
color: #666;
font-size: 26rpx;
}
&:nth-of-type(2) {
color: #333;
font-size: 32rpx;
margin-top: 8rpx;
font-weight: bold;
.num {
color: #2272FF;
padding-right: 10rpx;
}
.num-left {
position: relative;
min-width: 92rpx;
}
.num-right {
color: #333;
font-size: 32rpx;
margin-left: 10rpx;
font-weight: bold;
.num {
color: #2272FF;
padding-right: 10rpx;
}
}
}
.bottom-right {
width: 360rpx;
// margin-right: 20rpx;
margin-right: 20rpx;
.btn {
width: 100%;
padding: 30rpx;
......
......@@ -133,6 +133,8 @@
.bar {
width: 100%;
border-top: 1px solid #F4F5F7;
padding: 0 20rpx;
background: #fff;
}
.empty {
flex: 1;
......
......@@ -312,6 +312,8 @@ export default {
.bar {
width: 100%;
border-top: 2rpx solid #F4F5F7;
padding: 0 20rpx;
background: #fff;
}
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment