-
Notifications
You must be signed in to change notification settings - Fork 848
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: merge branch 'main' of github.com:anncwb/vue-vben-admin into main
- Loading branch information
Showing
69 changed files
with
1,746 additions
and
1,889 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
NODE_ENV=production | ||
# Whether to open mock | ||
VITE_USE_MOCK = true | ||
|
||
# public path | ||
VITE_PUBLIC_PATH = / | ||
|
||
# Delete console | ||
VITE_DROP_CONSOLE = true | ||
|
||
# Whether to enable gzip or brotli compression | ||
# Optional: gzip | brotli | none | ||
# If you need multiple forms, you can use `,` to separate | ||
VITE_BUILD_COMPRESS = 'none' | ||
|
||
# Whether to delete origin files when using compress, default false | ||
VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE = false | ||
|
||
# Basic interface address SPA | ||
VITE_GLOB_API_URL=/basic-api | ||
|
||
# File upload address, optional | ||
# It can be forwarded by nginx or write the actual address directly | ||
VITE_GLOB_UPLOAD_URL=/upload | ||
|
||
# Interface prefix | ||
VITE_GLOB_API_URL_PREFIX= | ||
|
||
# Whether to enable image compression | ||
VITE_USE_IMAGEMIN= true | ||
|
||
# use pwa | ||
VITE_USE_PWA = false | ||
|
||
# Is it compatible with older browsers | ||
VITE_LEGACY = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
import { MockMethod } from 'vite-plugin-mock'; | ||
import { resultSuccess } from '../_util'; | ||
|
||
const list: any[] = []; | ||
const demoList = (() => { | ||
const demoList = (keyword) => { | ||
const result = { | ||
list: list, | ||
list: [] as any[], | ||
}; | ||
for (let index = 0; index < 20; index++) { | ||
result.list.push({ | ||
name: `选项${index}`, | ||
name: `${keyword ?? ''}选项${index}`, | ||
id: `${index}`, | ||
}); | ||
} | ||
return result; | ||
})(); | ||
}; | ||
|
||
export default [ | ||
{ | ||
url: '/basic-api/select/getDemoOptions', | ||
timeout: 1000, | ||
method: 'post', | ||
method: 'get', | ||
response: ({ query }) => { | ||
console.log(query); | ||
return resultSuccess(demoList); | ||
const { keyword } = query; | ||
console.log(keyword); | ||
return resultSuccess(demoList(keyword)); | ||
}, | ||
}, | ||
] as MockMethod[]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { MockMethod } from 'vite-plugin-mock'; | ||
import { resultSuccess } from '../_util'; | ||
|
||
const demoTreeList = (keyword) => { | ||
const result = { | ||
list: [] as Recordable[], | ||
}; | ||
for (let index = 0; index < 5; index++) { | ||
const children: Recordable[] = []; | ||
for (let j = 0; j < 3; j++) { | ||
children.push({ | ||
title: `${keyword ?? ''}选项${index}-${j}`, | ||
value: `${index}-${j}`, | ||
key: `${index}-${j}`, | ||
}); | ||
} | ||
result.list.push({ | ||
title: `${keyword ?? ''}选项${index}`, | ||
value: `${index}`, | ||
key: `${index}`, | ||
children, | ||
}); | ||
} | ||
return result; | ||
}; | ||
|
||
export default [ | ||
{ | ||
url: '/basic-api/tree/getDemoOptions', | ||
timeout: 1000, | ||
method: 'get', | ||
response: ({ query }) => { | ||
const { keyword } = query; | ||
console.log(keyword); | ||
return resultSuccess(demoTreeList(keyword)); | ||
}, | ||
}, | ||
] as MockMethod[]; |
Oops, something went wrong.