暂存充值审核

This commit is contained in:
2025-02-20 10:38:29 +08:00
parent 616c6a53fb
commit 5d617f2282
22 changed files with 666 additions and 559 deletions

View File

@@ -5,7 +5,8 @@ Component({
* 组件的属性列表
*/
properties: {
list: Array
list: Array,
active: Number,
},
/**
@@ -19,6 +20,13 @@ Component({
* 组件的方法列表
*/
methods: {
handleChange(e) {
console.log(e, this.data.active)
const { index } = e.currentTarget.dataset;
if (index === this.data.active) {
return;
}
this.triggerEvent("change", { index, name: this.data.list[index] })
}
}
})

View File

@@ -1,4 +1,12 @@
<!--components/Segmented/index.wxml-->
<view>
<view wx:for="{{list}}" wx:key="index"></view>
<view style="margin: 10rpx 20rpx">
<view
wx:for="{{list}}"
wx:key="index"
class="item {{index === active ? 'active' : ''}}"
bind:tap="handleChange"
data-index="{{index}}"
>
{{ item }}
</view>
</view>

View File

@@ -1 +1,19 @@
/* components/Segmented/index.wxss */
/* components/Segmented/index.wxss */
.item {
display: inline-block;
padding: 20rpx;
border: 1rpx solid #ccc;
border-right: 0rpx;
font-size: 32rpx;
min-width: 140rpx;
text-align: center;
}
.item:nth-last-child(1) {
border-right: 1rpx solid #ccc;
}
.active {
background-color: var(--middle-green);
}