설정변경
This commit is contained in:
parent
4f7d21fdef
commit
bd71a1528c
@ -10,6 +10,7 @@
|
||||
"@l/*": ["src/layout/*"],
|
||||
"@s/*": ["src/stores/*"],
|
||||
"@p/*": ["src/common/plugin/*"],
|
||||
"@api": ["./src/common/axios-interceptor.js"]
|
||||
}
|
||||
},
|
||||
"exclude": ["node_modules", "dist"]
|
||||
|
||||
@ -53,7 +53,7 @@
|
||||
import Quill from 'quill';
|
||||
import 'quill/dist/quill.snow.css';
|
||||
import { onMounted, ref, watch, defineEmits } from 'vue';
|
||||
import $api from '@/common/axios-interceptor';
|
||||
import $api from '@api';
|
||||
|
||||
const editor = ref(null);
|
||||
const font = ref('nanum-gothic');
|
||||
|
||||
20
src/composable/useAuthRole.js
Normal file
20
src/composable/useAuthRole.js
Normal file
@ -0,0 +1,20 @@
|
||||
import { ref } from "vue";
|
||||
import $api from "@api";
|
||||
|
||||
//메뉴 구성 시 롤 체크용
|
||||
//mounted 에서 fetchRole 해줘야댐
|
||||
export function useAuthRole() {
|
||||
const role = ref(null);
|
||||
const error = ref(null);
|
||||
|
||||
const fetchRole = async () => {
|
||||
try {
|
||||
const response = await $api.get("/user/roleCheck");
|
||||
role.value = response.data.data;
|
||||
} catch (err) {
|
||||
error.value = err;
|
||||
}
|
||||
};
|
||||
|
||||
return { role, error, fetchRole };
|
||||
}
|
||||
@ -18,6 +18,7 @@ export default defineConfig({
|
||||
'@l': fileURLToPath(new URL('./src/layout/', import.meta.url)),
|
||||
'@s': fileURLToPath(new URL('./src/stores/', import.meta.url)),
|
||||
'@p': fileURLToPath(new URL('./src/common/plugin/', import.meta.url)),
|
||||
"@api": fileURLToPath(new URL('./src/common/axios-interceptor.js', import.meta.url))
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
Loading…
Reference in New Issue
Block a user