he wei
9 小时以前 7102b09561443f8c66bdcbecafac1706afc113fd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<script setup name="Dashboard">
import { ref } from "vue";
import PwButton from "@/components/pwButton.vue";
 
const acIdx = ref(0);
function changeIdx(idx) {
  acIdx.value = idx;
}
</script>
 
<template>
  <div class="page-contain bg-footer">
    <pw-button :active="acIdx === 0" text="品牌" @click="changeIdx(0)"></pw-button>
    <pw-button :active="acIdx === 1" @click="changeIdx(1)" style="margin-left: 4px;" text="电压等级"></pw-button>
  </div>
</template>
 
<style scoped lang="less">
.page-contain {
  padding: 10px 28px;
}
</style>