diff --git a/.env.production b/.env.production index 5509f1bc..bd717ec8 100644 --- a/.env.production +++ b/.env.production @@ -7,7 +7,7 @@ VITE_PUBLIC_PATH = ./ # Delete console VITE_DROP_CONSOLE = true -# Delete console +# Whether to output gz file for packaging VITE_BUILD_GZIP = false # Basic interface address SPA diff --git a/README.en-US.md b/README.en-US.md index 539a0885..7e2a8e00 100644 --- a/README.en-US.md +++ b/README.en-US.md @@ -225,17 +225,17 @@ yarn clean:lib # Delete node_modules, supported window - [x] First screen loading waiting animation - [x] Extract the production environment profile - [x] Build Gzip +- [x] System performance optimization +- [x] Data import and export +- [x] Global error handling ## Developing features - [ ] Upload component - [ ] Rich text component -- [ ] Data import and export -- [ ] Global error handling - [ ] Theme configuration - [ ] Dark theme - [ ] Build CDN -- [ ] System performance optimization If you have more components/functions/suggestions/bugs/, welcome to submit pr or issue. diff --git a/README.md b/README.md index 22807eb2..01ddb754 100644 --- a/README.md +++ b/README.md @@ -223,17 +223,17 @@ yarn clean:lib # 删除node_modules,兼容window系统 - [x] 首屏加载等待动画 - [x] 抽取生产环境配置文件 - [x] 打包 Gzip +- [x] 数据导入导出 +- [x] 系统性能优化 +- [x] 全局错误处理 ## 正在开发的功能 - [ ] 上传组件 - [ ] 富文本组件 -- [ ] 数据导入导出 -- [ ] 全局错误处理 - [ ] 主题配置 - [ ] 黑暗主题 - [ ] 打包 CDN -- [ ] 系统性能优化 更多组件/功能/建议/bug/欢迎提交 pr 或者 issue diff --git a/build/config/vite/proxy.ts b/build/config/vite/proxy.ts index a23b75ab..fbaee2ee 100644 --- a/build/config/vite/proxy.ts +++ b/build/config/vite/proxy.ts @@ -2,13 +2,17 @@ type ProxyItem = [string, string]; type ProxyList = ProxyItem[]; +const reg = /^https:\/\//; export function createProxy(list: ProxyList = []) { const ret: any = {}; for (const [prefix, target] of list) { + const isHttps = reg.test(target); + ret[prefix] = { target: target, changeOrigin: true, rewrite: (path: string) => path.replace(new RegExp(`^${prefix}`), ''), + ...(isHttps ? { secure: false } : {}), }; } return ret; diff --git a/build/plugin/vite-plugin-context-plugin/transform.ts b/build/plugin/vite-plugin-context/transform.ts similarity index 100% rename from build/plugin/vite-plugin-context-plugin/transform.ts rename to build/plugin/vite-plugin-context/transform.ts diff --git a/package.json b/package.json index 44c284e6..f29e62ad 100644 --- a/package.json +++ b/package.json @@ -41,10 +41,10 @@ "devDependencies": { "@commitlint/cli": "^11.0.0", "@commitlint/config-conventional": "^11.0.0", - "@iconify/json": "^1.1.242", + "@iconify/json": "^1.1.243", "@ls-lint/ls-lint": "^1.9.2", "@purge-icons/generated": "^0.4.1", - "@types/echarts": "^4.8.1", + "@types/echarts": "^4.8.3", "@types/fs-extra": "^9.0.2", "@types/html-minifier": "^4.0.0", "@types/inquirer": "^7.3.1", @@ -55,7 +55,7 @@ "@types/qrcode": "^1.3.5", "@types/rollup-plugin-visualizer": "^2.6.0", "@types/shelljs": "^0.8.8", - "@types/yargs": "^15.0.8", + "@types/yargs": "^15.0.9", "@types/zxcvbn": "^4.4.0", "@typescript-eslint/eslint-plugin": "^4.4.1", "@typescript-eslint/parser": "^4.4.1", @@ -67,7 +67,7 @@ "cross-env": "^7.0.2", "dotenv": "^8.2.0", "eslint": "^7.10.0", - "eslint-config-prettier": "^6.12.0", + "eslint-config-prettier": "^6.13.0", "eslint-plugin-prettier": "^3.1.4", "eslint-plugin-vue": "^7.0.1", "fs-extra": "^9.0.1", @@ -76,7 +76,7 @@ "inquirer": "^7.3.3", "koa-static": "^5.0.0", "less": "^3.12.2", - "lint-staged": "^10.4.0", + "lint-staged": "^10.4.2", "portfinder": "^1.0.28", "postcss-import": "^12.0.1", "prettier": "^2.1.2", @@ -95,7 +95,7 @@ "vite-plugin-mock": "^1.0.2", "vite-plugin-purge-icons": "^0.4.4", "vue-eslint-parser": "^7.1.1", - "yargs": "^16.0.3" + "yargs": "^16.1.0" }, "repository": { "type": "git", diff --git a/src/App.vue b/src/App.vue index b09626c2..ebba7fa1 100644 --- a/src/App.vue +++ b/src/App.vue @@ -33,6 +33,7 @@ const { on } = useLockPage(); lockOn = on; } + return { transformCellText, zhCN, diff --git a/src/api/demo/error.ts b/src/api/demo/error.ts new file mode 100644 index 00000000..fca03295 --- /dev/null +++ b/src/api/demo/error.ts @@ -0,0 +1,16 @@ +import { defHttp } from '/@/utils/http/axios'; + +enum Api { + // 该地址不存在 + Error = '/error', +} + +/** + * @description: 触发ajax错误 + */ +export function fireErrorApi() { + return defHttp.request({ + url: Api.Error, + method: 'GET', + }); +} diff --git a/src/components/Table/src/BasicTable.vue b/src/components/Table/src/BasicTable.vue index dd5e7652..63250cc8 100644 --- a/src/components/Table/src/BasicTable.vue +++ b/src/components/Table/src/BasicTable.vue @@ -146,7 +146,7 @@ } if (showSummary) { propsData.footer = renderFooter.bind(null, { - scroll, + scroll: scroll as any, columnsRef: getColumnsRef, summaryFunc: unref(getMergeProps).summaryFunc, dataSourceRef: getDataSourceRef, diff --git a/src/components/Table/src/components/TableAction.tsx b/src/components/Table/src/components/TableAction.tsx index f7996582..7cd9fac1 100644 --- a/src/components/Table/src/components/TableAction.tsx +++ b/src/components/Table/src/components/TableAction.tsx @@ -29,7 +29,6 @@ export default defineComponent({ const { disabled = false, label, - props, icon, color = '', type = 'link', @@ -41,7 +40,7 @@ export default defineComponent({ size="small" disabled={disabled} color={color} - {...props} + {...action} key={index} > {() => ( @@ -101,7 +100,6 @@ export default defineComponent({ const { disabled = false, label, - props, icon, color = '', type = 'link', @@ -112,7 +110,7 @@ export default defineComponent({