fix: build error

This commit is contained in:
baiqi 2023-06-26 09:46:35 +08:00 committed by 刘瑞斌
parent 6a1fb79faf
commit 97b5cef187
4 changed files with 7 additions and 9 deletions

View File

@ -5,13 +5,11 @@
// Read more: https://github.com/vuejs/core/pull/3399
import '@vue/runtime-core'
export {}
export {};
declare module '@vue/runtime-core' {
export interface GlobalComponents {
AFomrItem: typeof import('@arco-design/web-vue')['FomrItem']
ASelectOption: typeof import('@arco-design/web-vue')['SelectOption']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
RouterLink: typeof import('vue-router')['RouterLink'];
RouterView: typeof import('vue-router')['RouterView'];
}
}

View File

@ -7,7 +7,7 @@ import { isLogin } from '@/utils/auth';
setupMock({
setup() {
// 用户信息
Mock.mock(new RegExp(GetUserInfoUrl), () => {
Mock.mock(new RegExp(GetUserInfoUrl.toString()), () => {
if (isLogin()) {
const role = window.localStorage.getItem('userRole') || 'admin';
return successResponseWrap({
@ -33,17 +33,17 @@ setupMock({
});
// 登出
Mock.mock(new RegExp(LoginUrl), () => {
Mock.mock(new RegExp(LoginUrl.toString()), () => {
return successResponseWrap({});
});
// 登出
Mock.mock(new RegExp(LogoutUrl), () => {
Mock.mock(new RegExp(LogoutUrl.toString()), () => {
return successResponseWrap(null);
});
// 用户的服务端菜单
Mock.mock(new RegExp(GetMenuListUrl), () => {
Mock.mock(new RegExp(GetMenuListUrl.toString()), () => {
const menuList = [
{
path: '/api-test',