chore: prettier & lint

Former-commit-id: 486f65e137348f400d7b95067bd3cd5a2f23ff44
This commit is contained in:
Jachin
2023-08-04 17:50:25 +08:00
parent a240ff04d2
commit f797606c44
72 changed files with 1234 additions and 484 deletions

View File

@@ -0,0 +1,27 @@
<template>
<div>
<div style="margin-bottom: 15px">Your roles: {{ roles }}</div>
Switch roles:
<el-radio-group v-model="switchRoles">
<el-radio-button label="EDITOR" />
<el-radio-button label="ADMIN" />
</el-radio-group>
</div>
</template>
<script setup lang="ts">
import { useUserStoreHook } from "@/store/modules/user";
import { storeToRefs } from "pinia";
const emit = defineEmits(["change"]);
const store = storeToRefs(useUserStoreHook());
const { roles } = store;
const switchRoles = computed({
get: () => roles.value[0],
set: (val) => {
roles.value = [val];
emit("change");
},
});
</script>