This commit is contained in:
xvv 2024-09-25 11:17:30 +08:00
parent c7c24f8413
commit da6d79a75c

View File

@ -17,11 +17,12 @@
</view> </view>
</view> </view>
<view class="box-xia"> <view class="box-xia">
<view class="box-left">
<u-checkbox-group> <view class="box-left" @click="chooseDefault(item)">
<u-checkbox v-model="item.checked" shape="circle" label="默认信息"
@change="chooseDefault(item,$event)"></u-checkbox> <view class="acvf" v-if="item.checked == false"></view>
</u-checkbox-group> <view class="acv" v-else><u-icon name="checkbox-mark" color="#fff" size="14"></u-icon></view>
<view style="font-size: 14px; color: #999; ">默认信息</view>
</view> </view>
<view class="box-right"> <view class="box-right">
<view style="display: flex;" @click="goedit(item)"> <view style="display: flex;" @click="goedit(item)">
@ -55,7 +56,8 @@
return { return {
title: '', title: '',
dataList: '', dataList: '',
checked: false, checkboxValue1: [],
checked: true,
} }
}, },
onShow() { onShow() {
@ -65,8 +67,9 @@
}, },
methods: { methods: {
chooseDefault(data,checked) { chooseDefault(data) {
if (checked) { console.log(data);
if (data.checked == false) {
data.ifDefault = 1 data.ifDefault = 1
} else { } else {
data.ifDefault = 2 data.ifDefault = 2
@ -119,7 +122,9 @@
request({ request({
url: '/business/userManager/mtUserExpressAddress', url: '/business/userManager/mtUserExpressAddress',
method: 'delete', method: 'delete',
params:{id:data.id} params: {
id: data.id
}
}).then((res) => { }).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.getList() this.getList()
@ -198,7 +203,10 @@
box-sizing: border-box; box-sizing: border-box;
} }
.box-left {} .box-left {
display: flex;
align-items: center;
}
.box-right { .box-right {
width: 30%; width: 30%;
@ -226,4 +234,28 @@
justify-content: space-between; justify-content: space-between;
margin-top: 20px; margin-top: 20px;
} }
.acvf {
border-radius: 50%;
border: 1px solid #eee;
height: 16px;
width: 16px;
display: flex;
align-items: center;
justify-content: center;
margin-right: 10px;
}
.acv {
border-radius: 50%;
border: 1px solid #1678ff;
height: 16px;
width: 16px;
background: #1678ff;
color: #fff;
margin-right: 10px;
display: flex;
align-items: center;
justify-content: center;
}
</style> </style>