uniapp 点击排序效果

uniapp yekong 542℃

uniapp 点击排序效果

<div class="leftgroupx">
                        <view class="left-group flex-col" @click="getactive('billAmt')">
                            <text :class="{active:formdata.sort=='billAmt'}" class="text text_2">票面金额</text>
                            <image v-if="formdata.order=='desc'"
                                src="https://piaolala.oss-cn-beijing.aliyuncs.com/static/local/16383257991964615336.png"
                                class="image" />
                            <image v-else src="https://piaolala.oss-cn-beijing.aliyuncs.com/16383257991964615332.png"
                                class="image" />
                        </view>
                        <view class="left-group flex-col" @click="getactive('billExpireDate')">
                            <text :class="{active:formdata.sort=='billExpireDate'}" class="text text_2">到期日</text>
                            <image v-if="formdata.order=='desc'"
                                src="https://piaolala.oss-cn-beijing.aliyuncs.com/static/local/16383257991964615336.png"
                                class="image" />
                            <image v-else src="https://piaolala.oss-cn-beijing.aliyuncs.com/16383257991964615332.png"
                                class="image" />
                        </view>
                        <view class="left-group flex-col" @click="getactive('createTime')">
                            <text :class="{active:formdata.sort=='createTime'}" class="text text_2">发布时间</text>
                            <image v-if="formdata.order=='desc'"
                                src="https://piaolala.oss-cn-beijing.aliyuncs.com/static/local/16383257991964615336.png"
                                class="image" />
                            <image v-else src="https://piaolala.oss-cn-beijing.aliyuncs.com/16383257991964615332.png"
                                class="image" />
                        </view>
                    </div>
getactive(e) {
                if (this.formdata.sort == e) {
                    this.formdata.order = this.formdata.order == 'desc' ? 'asc' : 'desc'
                } else {
                    this.formdata.sort = e
                }
                this.getdata()
            },
喜欢 (1)