uu
This commit is contained in:
parent
8ad91d60d4
commit
f21ef5a3c5
@ -3,25 +3,27 @@
|
|||||||
<view style="position: relative;height: calc(75vh);">
|
<view style="position: relative;height: calc(75vh);">
|
||||||
<tpx-layout>
|
<tpx-layout>
|
||||||
<template v-slot:header>
|
<template v-slot:header>
|
||||||
<u-steps v-if="!regnameLoading" direction="column" activeColor="#B12D29" inactiveColor="#B12D29" dot="true">
|
|
||||||
<u-steps-item v-for="(item, index) in submitVals.regNames">
|
<view class="stp-list">
|
||||||
<template v-slot:desc>
|
<view v-for="(item, index) in submitVals.regNames"
|
||||||
<view :class="`pl-20 pb-20 ${curTabIndex == index?'clr-prm':''}`" @click="changeCurTab(index)">
|
:class="`stp-item ${curTabIndex == index?'active':''}`" @click="changeCurTab(index)">
|
||||||
<u-row>
|
<view class="dot"></view>
|
||||||
<view style="flex: 1;">{{item}}</view>
|
<view class="cont">
|
||||||
|
<view>{{item}}</view>
|
||||||
<u-icon name="arrow-right" size="32" color="rgb(214, 215, 217)"></u-icon>
|
<u-icon name="arrow-right" size="32" color="rgb(214, 215, 217)"></u-icon>
|
||||||
</u-row>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</view>
|
||||||
</u-steps-item>
|
</view>
|
||||||
</u-steps>
|
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:body>
|
<template v-slot:body>
|
||||||
<view class="showselect-list">
|
<view class="showselect-list">
|
||||||
<view v-for="(item, index) in curShowData" class="showselect-group">
|
<view v-for="(item, index) in curShowData" class="showselect-group">
|
||||||
<view v-if="item.letters" class="pr-20">{{item.letters}}</view>
|
<view v-if="item.letters" class="pr-20">{{item.letters}}</view>
|
||||||
<view style="flex: 1;">
|
<view style="flex: 1;">
|
||||||
<view v-for="(sItem, sIndex) in item.data" :class="`showselect-item ${submitVals.regIds.indexOf(sItem.id) > -1?'active':''}`" @click="selectItemRegion(sItem)">
|
<view v-for="(sItem, sIndex) in item.data"
|
||||||
|
:class="`showselect-item ${submitVals.regIds.indexOf(sItem.id) > -1?'active':''}`"
|
||||||
|
@click="selectItemRegion(sItem)">
|
||||||
{{sItem.name}}
|
{{sItem.name}}
|
||||||
<view class="chk">
|
<view class="chk">
|
||||||
<u-icon name="checkbox-mark" size="32" :bold="true" color="inherit"></u-icon>
|
<u-icon name="checkbox-mark" size="32" :bold="true" color="inherit"></u-icon>
|
||||||
@ -96,7 +98,6 @@
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
regnameLoading: false,
|
|
||||||
curTabIndex: 0,
|
curTabIndex: 0,
|
||||||
curCountryList: [], // { id , name, nameEn }
|
curCountryList: [], // { id , name, nameEn }
|
||||||
curList: [], // { id , name, nameEn }
|
curList: [], // { id , name, nameEn }
|
||||||
@ -161,7 +162,6 @@
|
|||||||
this.curTabIndex = this.curTabIndex + 1
|
this.curTabIndex = this.curTabIndex + 1
|
||||||
this.submitVals.regIds.push()
|
this.submitVals.regIds.push()
|
||||||
this.submitVals.regNames.push('请选择')
|
this.submitVals.regNames.push('请选择')
|
||||||
this.hackUpdateRgnames()
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async selectItemRegion(item = {}) {
|
async selectItemRegion(item = {}) {
|
||||||
@ -171,17 +171,10 @@
|
|||||||
this.submitVals.regNames.length = this.curTabIndex
|
this.submitVals.regNames.length = this.curTabIndex
|
||||||
this.submitVals.regIds.push(item.id)
|
this.submitVals.regIds.push(item.id)
|
||||||
this.submitVals.regNames.push(item.name)
|
this.submitVals.regNames.push(item.name)
|
||||||
this.hackUpdateRgnames()
|
|
||||||
}
|
}
|
||||||
// 选中后切换下一层级视图
|
// 选中后切换下一层级视图
|
||||||
this.addEmptyItem(item)
|
this.addEmptyItem(item)
|
||||||
},
|
},
|
||||||
hackUpdateRgnames() {
|
|
||||||
this.regnameLoading = true
|
|
||||||
setTimeout(()=> {
|
|
||||||
this.regnameLoading = false
|
|
||||||
});
|
|
||||||
},
|
|
||||||
handleCloseModal() {
|
handleCloseModal() {
|
||||||
this.$emit('update:show', false)
|
this.$emit('update:show', false)
|
||||||
},
|
},
|
||||||
@ -196,23 +189,75 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.showselect-list{
|
.stp-list {
|
||||||
|
.stp-item {
|
||||||
|
padding-bottom: 20rpx;
|
||||||
|
position: relative;
|
||||||
|
.dot {
|
||||||
|
position: absolute;
|
||||||
|
top: 8rpx;
|
||||||
|
bottom: 2rpx;
|
||||||
|
left: 0;
|
||||||
|
&:before{
|
||||||
|
content: ' ';
|
||||||
|
display: block;
|
||||||
|
width: 16rpx;
|
||||||
|
height: 16rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
background-color: $uni-color-primary;
|
||||||
}
|
}
|
||||||
|
&::after{
|
||||||
|
position: absolute;
|
||||||
|
content: ' ';
|
||||||
|
display: block;
|
||||||
|
width: 3rpx;
|
||||||
|
border-radius: 3rpx;
|
||||||
|
background-color: $uni-color-primary;
|
||||||
|
margin-left: 6rpx;
|
||||||
|
bottom: 0;
|
||||||
|
top: 24rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.cont {
|
||||||
|
padding-left: 40rpx;
|
||||||
|
display: flex;
|
||||||
|
flex: 1;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
&:last-child{
|
||||||
|
.dot {
|
||||||
|
&::after{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&.active{
|
||||||
|
color: $uni-color-primary;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.showselect-list {}
|
||||||
|
|
||||||
.showselect-group {
|
.showselect-group {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
.showselect-item {
|
.showselect-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
|
|
||||||
.chk {
|
.chk {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.active {
|
&.active {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #B12D29;
|
color: #B12D29;
|
||||||
|
|
||||||
.chk {
|
.chk {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user