operateList.vue
1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<template>
<view class="operate">
<view class="operate_list">
<view class="operate_item">
<text class="operate_btn" :class="{active: current === 0 }" @click="handleReturn">退回</text>
</view>
<view class="operate_item">
<text class="operate_btn" :class="{active: current === 1 }" @click="handleInvalid">作废</text>
</view>
<view class="operate_item">
<text class="operate_btn" :class="{active: current === 2 }" @click="handleUpdate">修改</text>
</view>
<view class="operate_item">
<text class="operate_btn" :class="{active: current === 3 }" @click="handleCirculation">流转</text>
</view>
</view>
</view>
</template>
<script setup>
import { ref } from 'vue'
const current = ref(9)
const handleReturn = () => {
current.value = 0
}
const handleInvalid = () => {
current.value = 1
}
const handleUpdate = () => {
current.value = 2
}
const handleCirculation = () => {
current.value = 3
}
</script>
<style lang="scss" scoped>
.operate{
.operate_list{
display: flex;
align-items: center;
.operate_item{
display: flex;
align-items: center;
justify-content: center;
flex: 1;
height: 40rpx;
border-right: 2rpx solid #3680FE;
&:last-child{
border-right: 0;
}
.operate_btn{
width: 100rpx;
height: 40rpx;
line-height: 40rpx;
font-size: 24rpx;
text-align: center;
border-radius: 8rpx;
&.active{
background: #3680FE;
color: #fff;
}
}
}
}
}
</style>