Commit 249a2cb0 authored by qinhaitao's avatar qinhaitao

fix: 🐛 bug

parent 69751d67
.item-dialog-content {
background: #FFFFFF;
background: #ffffff;
max-height: 507px;
display: flex;
flex-direction: column;
......@@ -11,102 +10,100 @@
}
.modal-content-btn.choose-modal-footer {
justify-content:space-between;
align-items:center;
justify-content: space-between;
align-items: center;
}
.choose-content-tab {
padding:10px 20px;
flex-grow:1;
overflow:hidden;
height:450px;
padding: 10px 10px;
flex-grow: 1;
overflow: hidden;
height: 450px;
}
.choose-content-tab .choose-content-tab-view{
padding:20px 0 5px;
.choose-content-tab .choose-content-tab-view {
padding: 20px 0 5px;
}
.choose-content-tab-baby{
border:1px solid #ccc;
position:relative;
margin:0 5px 10px 0;
.choose-content-tab-baby {
border: 1px solid #ccc;
position: relative;
margin: 0 5px 10px 0;
}
.choose-content-tab-baby_nomargin {
margin-right: 0;
}
.choose-content-tab-baby:hover {
border:1px solid #3386F1;
border: 1px solid #3386f1;
}
.choose-content-tab-image-wrap {
padding:10px;
font-size:0;
padding: 10px;
font-size: 0;
}
.choose-content-tab-image-wrap image{
width:134px;
height:134px;
.choose-content-tab-image-wrap image {
width: 134px;
height: 134px;
}
.choose-content-tab-baby-wrap{
display:flex;
max-height:300px;
overflow:hidden;
.choose-content-tab-baby-wrap {
display: flex;
max-height: 300px;
overflow: hidden;
overflow-y: auto;
padding-bottom: 70px;
flex-wrap:wrap;
flex-wrap: wrap;
/* justify-content: space-between; */
}
.choose-content-tab-baby-info{
background:#EBF3FF;
padding:10px;
.choose-content-tab-baby-info {
background: #ebf3ff;
padding: 10px;
}
.choose-content-tab-baby Checkbox{
position:absolute;
right:10px;
top:9px;
.choose-content-tab-baby Checkbox {
position: absolute;
right: 10px;
top: 9px;
}
.choose-content-tab-baby-info-title{
width:134px;
white-space: nowrap;
font-size:12px;
color:#333333;
.choose-content-tab-baby-info-title {
width: 134px;
white-space: nowrap;
font-size: 12px;
color: #333333;
overflow: hidden;
text-overflow:ellipsis;
margin-bottom:10px;
text-overflow: ellipsis;
margin-bottom: 10px;
}
.choose-content-tab-baby-info-prize {
display:flex;
font-size:12px;
justify-content:space-between;
display: flex;
font-size: 12px;
justify-content: space-between;
}
.choose-content-tab-baby-info-prize .prize-now{
.choose-content-tab-baby-info-prize .prize-now {
color: #333;
}
.choose-content-tab-baby-info-prize .prize-now text{
color:#FFA033;
.choose-content-tab-baby-info-prize .prize-now text {
color: #ffa033;
}
.choose-content-tab-baby-info-prize .prize-old{
color:#999999;
text-decoration:line-through;
.choose-content-tab-baby-info-prize .prize-old {
color: #999999;
text-decoration: line-through;
}
.choose-content-pagination{
display:flex;
justify-content:flex-end;
margin:10px 20px 10px 0;
.choose-content-pagination {
display: flex;
justify-content: flex-end;
margin: 10px 20px 10px 0;
}
.choose-modal-footer-number{
margin:0 5px;
color:#3386F1;
.choose-modal-footer-number {
margin: 0 5px;
color: #3386f1;
}
.choose-no-baby{
font-size:14px;
.choose-no-baby {
font-size: 14px;
color: #333;
}
......@@ -116,4 +113,4 @@
}
.items-dialog-btns_confirm {
margin-right: 10px;
}
\ No newline at end of file
}
......@@ -62,7 +62,7 @@
<view class="modal-content-btn choose-modal-footer">
<view>已选择<text class="choose-modal-footer-number">{{chooseId.length}}</text>个宝贝</view>
<view class="items-dialog-btns">
<button type="primary" classs="items-dialog-btns_confirm" onTap="sureBabyDialog">确定</button>
<button type="primary" class="items-dialog-btns_confirm" onTap="sureBabyDialog">确定</button>
<button onTap="closeBaby">取消</button>
</view>
</view>
......
......@@ -23,6 +23,7 @@ Component({
props: {
onClose: () => { },
showBaby: false,
limit: 20,
browseItemIds: "",
onUpdateBabyChoose: () => { },
},
......@@ -124,16 +125,17 @@ Component({
},
changeCheckStatus(e) {
const { chooseId } = this.data;
const { limit } = this.props;
const { item } = e.target.dataset;
if (chooseId.includes(item.itemId)) {
this.setData({
chooseId: chooseId.filter(v => v !== item.itemId),
});
} else {
if (chooseId.length >= 20) {
if (chooseId.length >= +limit) {
my.showToast({
type: "fail",
content: "最多选择20个宝贝",
content: `最多选择${limit}个宝贝`,
});
return;
}
......
......@@ -192,11 +192,10 @@
class="probability-prize-content-formItem probability-prize-content-formItem-choosePrize"
label="商品查看链接">
<view class="probability-prize-content-formitem-choosePrize-wrap">
<view
class="probability-prize-content-formitem-goequity"
<button
onTap="onOpenDialog"
type="primary">{{prizeInitData.itemId ? '更换商品' : '可选择商品'}}
</view>
type="primary">{{prizeInitData.itemId ? '更换商品' : '添加商品'}}
</button>
</view>
</form-item>
</form>
......@@ -209,7 +208,8 @@
a:if="{{goodsVisible}}"
onUpdateBabyChoose="onUpdateBabyChoose"
browseItemIds="{{itemIds}}"
showBaby="{{goodsVisible}}"
showBaby="{{goodsVisible}}"
limit="{{1}}"
onClose="onCloseGoodsDialog" />
</view>
</dialog-wrap>
\ No newline at end of file
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