whychdw
2025-06-06 d0f98ad8e1047e3161a458399ad3005404ed87b8
src/views/dashboard/index.vue
@@ -1,13 +1,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>