Merge branch 'main' into ruoyi
This commit is contained in:
commit
6afd5cc36a
@ -5,10 +5,10 @@ import { createServiceConfig } from '../../src/utils/service';
|
||||
* Set http proxy
|
||||
*
|
||||
* @param env - The current env
|
||||
* @param isDev - Is development environment
|
||||
* @param enable - If enable http proxy
|
||||
*/
|
||||
export function createViteProxy(env: Env.ImportMeta, isDev: boolean) {
|
||||
const isEnableHttpProxy = isDev && env.VITE_HTTP_PROXY === 'Y';
|
||||
export function createViteProxy(env: Env.ImportMeta, enable: boolean) {
|
||||
const isEnableHttpProxy = enable && env.VITE_HTTP_PROXY === 'Y';
|
||||
|
||||
if (!isEnableHttpProxy) return undefined;
|
||||
|
||||
|
51
package.json
51
package.json
@ -22,7 +22,7 @@
|
||||
"build:test": "vite build --mode test",
|
||||
"cleanup": "sa cleanup",
|
||||
"commit": "sa git-commit",
|
||||
"czh": "sa git-commit -l=zh-cn",
|
||||
"commit:zh": "sa git-commit -l=zh-cn",
|
||||
"dev": "vite --mode test",
|
||||
"dev:prod": "vite --mode prod",
|
||||
"gen-route": "sa gen-route",
|
||||
@ -41,49 +41,50 @@
|
||||
"@sa/hooks": "workspace:*",
|
||||
"@sa/materials": "workspace:*",
|
||||
"@sa/utils": "workspace:*",
|
||||
"@vueuse/core": "10.11.0",
|
||||
"@vueuse/core": "11.0.1",
|
||||
"clipboard": "2.0.11",
|
||||
"dayjs": "1.11.12",
|
||||
"echarts": "5.5.1",
|
||||
"jsencrypt": "^3.3.2",
|
||||
"naive-ui": "2.39.0",
|
||||
"nprogress": "0.2.0",
|
||||
"pinia": "2.2.0",
|
||||
"tailwind-merge": "2.4.0",
|
||||
"vue": "3.4.35",
|
||||
"vue-draggable-plus": "0.5.2",
|
||||
"vue-i18n": "9.13.1",
|
||||
"vue-router": "4.4.1"
|
||||
"pinia": "2.2.2",
|
||||
"tailwind-merge": "2.5.2",
|
||||
"vue": "3.4.38",
|
||||
"vue-draggable-plus": "0.5.3",
|
||||
"vue-i18n": "9.14.0",
|
||||
"vue-router": "4.4.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@elegant-router/vue": "0.3.8",
|
||||
"@iconify/json": "2.2.232",
|
||||
"@iconify/json": "2.2.238",
|
||||
"@sa/scripts": "workspace:*",
|
||||
"@sa/uno-preset": "workspace:*",
|
||||
"@soybeanjs/eslint-config": "1.4.0",
|
||||
"@types/node": "22.0.1",
|
||||
"@types/node": "22.4.1",
|
||||
"@types/nprogress": "0.2.3",
|
||||
"@unocss/eslint-config": "0.61.9",
|
||||
"@unocss/preset-icons": "0.61.9",
|
||||
"@unocss/preset-uno": "0.61.9",
|
||||
"@unocss/transformer-directives": "0.61.9",
|
||||
"@unocss/transformer-variant-group": "0.61.9",
|
||||
"@unocss/vite": "0.61.9",
|
||||
"@vitejs/plugin-vue": "5.1.1",
|
||||
"@vitejs/plugin-vue-jsx": "4.0.0",
|
||||
"eslint": "9.8.0",
|
||||
"@unocss/eslint-config": "0.62.2",
|
||||
"@unocss/preset-icons": "0.62.2",
|
||||
"@unocss/preset-uno": "0.62.2",
|
||||
"@unocss/transformer-directives": "0.62.2",
|
||||
"@unocss/transformer-variant-group": "0.62.2",
|
||||
"@unocss/vite": "0.62.2",
|
||||
"@vitejs/plugin-vue": "5.1.2",
|
||||
"@vitejs/plugin-vue-jsx": "4.0.1",
|
||||
"eslint": "9.9.0",
|
||||
"eslint-plugin-vue": "9.27.0",
|
||||
"lint-staged": "15.2.7",
|
||||
"json5": "2.2.3",
|
||||
"lint-staged": "15.2.9",
|
||||
"sass": "1.77.8",
|
||||
"simple-git-hooks": "2.11.1",
|
||||
"tsx": "4.16.3",
|
||||
"tsx": "4.17.0",
|
||||
"typescript": "5.5.4",
|
||||
"unplugin-icons": "0.19.1",
|
||||
"unplugin-vue-components": "0.27.3",
|
||||
"vite": "5.3.5",
|
||||
"unplugin-icons": "0.19.2",
|
||||
"unplugin-vue-components": "0.27.4",
|
||||
"vite": "5.4.1",
|
||||
"vite-plugin-progress": "0.0.7",
|
||||
"vite-plugin-svg-icons": "2.0.1",
|
||||
"vite-plugin-vue-devtools": "7.3.7",
|
||||
"vite-plugin-vue-devtools": "7.3.8",
|
||||
"vue-eslint-parser": "9.4.3",
|
||||
"vue-tsc": "2.0.29"
|
||||
},
|
||||
|
@ -11,9 +11,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@sa/utils": "workspace:*",
|
||||
"axios": "1.7.2",
|
||||
"axios-retry": "4.4.2",
|
||||
"qs": "6.12.3"
|
||||
"axios": "1.7.4",
|
||||
"axios-retry": "4.5.0",
|
||||
"qs": "6.13.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/qs": "6.9.15"
|
||||
|
@ -14,14 +14,14 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@soybeanjs/changelog": "0.3.24",
|
||||
"bumpp": "9.4.1",
|
||||
"bumpp": "9.5.1",
|
||||
"c12": "1.11.1",
|
||||
"cac": "6.7.14",
|
||||
"consola": "3.2.3",
|
||||
"enquirer": "2.4.1",
|
||||
"execa": "9.3.0",
|
||||
"execa": "9.3.1",
|
||||
"kolorist": "1.8.0",
|
||||
"npm-check-updates": "17.0.0",
|
||||
"npm-check-updates": "17.0.6",
|
||||
"rimraf": "6.0.1"
|
||||
}
|
||||
}
|
||||
|
@ -12,12 +12,12 @@ export const locales = {
|
||||
gitCommitTypes: [
|
||||
['feat', '新功能'],
|
||||
['fix', '修复Bug'],
|
||||
['docs', '只更新文档'],
|
||||
['docs', '只涉及文档更新'],
|
||||
['style', '修改代码风格,不影响代码含义的变更'],
|
||||
['refactor', '代码重构,既不修复 bug 也不添加功能的代码变更'],
|
||||
['perf', '可提高性能的代码更改'],
|
||||
['optimize', '优化代码质量的代码更改'],
|
||||
['test', '添加缺失的测试或更正现有测'],
|
||||
['test', '添加缺失的测试或更正现有测试'],
|
||||
['build', '影响构建系统或外部依赖项的更改'],
|
||||
['ci', '对 CI 配置文件和脚本的更改'],
|
||||
['chore', '没有修改src或测试文件的其他变更'],
|
||||
|
1535
pnpm-lock.yaml
1535
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
3
src/typings/api/api.d.ts
vendored
3
src/typings/api/api.d.ts
vendored
@ -20,6 +20,9 @@ declare namespace Api {
|
||||
rows: T[];
|
||||
}
|
||||
|
||||
/** common search params of table */
|
||||
type CommonSearchParams = Pick<Common.PaginatingCommonParams, 'current' | 'size'>;
|
||||
|
||||
/**
|
||||
* enable status
|
||||
*
|
||||
|
2
src/typings/naive-ui.d.ts
vendored
2
src/typings/naive-ui.d.ts
vendored
@ -26,7 +26,7 @@ declare namespace NaiveUI {
|
||||
|
||||
type TableColumn<T> = TableColumnWithKey<T> | DataTableSelectionColumn<T> | DataTableExpandColumn<T>;
|
||||
|
||||
type TableApiFn<T = any, R = Api.SystemManage.CommonSearchParams> = (
|
||||
type TableApiFn<T = any, R = Api.Common.CommonSearchParams> = (
|
||||
params: R
|
||||
) => Promise<FlatResponseData<Api.Common.PaginatingQueryRecord<T>>>;
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
import json5 from 'json5';
|
||||
|
||||
/**
|
||||
* Create service config by current env
|
||||
*
|
||||
@ -8,10 +10,12 @@ export function createServiceConfig(env: Env.ImportMeta) {
|
||||
|
||||
let other = {} as Record<App.Service.OtherBaseURLKey, string>;
|
||||
try {
|
||||
other = JSON.parse(VITE_OTHER_SERVICE_BASE_URL || '{}');
|
||||
if (VITE_OTHER_SERVICE_BASE_URL) {
|
||||
other = json5.parse(VITE_OTHER_SERVICE_BASE_URL);
|
||||
}
|
||||
} catch (error) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.error('VITE_OTHER_SERVICE_BASE_URL is not a valid JSON string');
|
||||
console.error('VITE_OTHER_SERVICE_BASE_URL is not a valid json5 string');
|
||||
}
|
||||
|
||||
const httpConfig: App.Service.SimpleServiceConfig = {
|
||||
|
@ -9,6 +9,8 @@ export default defineConfig(configEnv => {
|
||||
|
||||
const buildTime = getBuildTime();
|
||||
|
||||
const enableProxy = configEnv.command === 'serve' && !configEnv.isPreview;
|
||||
|
||||
return {
|
||||
base: viteEnv.VITE_BASE_URL,
|
||||
resolve: {
|
||||
@ -32,7 +34,7 @@ export default defineConfig(configEnv => {
|
||||
host: '0.0.0.0',
|
||||
port: 9527,
|
||||
open: true,
|
||||
proxy: createViteProxy(viteEnv, configEnv.command === 'serve'),
|
||||
proxy: createViteProxy(viteEnv, enableProxy),
|
||||
fs: {
|
||||
cachedChecks: false
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user