Commit 84cb1bd4dbcdd13f72d37389481b1c433ed95fe7
1 parent
dc84ebde
chore: update 184
Showing
7 changed files
with
35 additions
and
15 deletions
yudao-ui-admin-vue3/package.json
| 1 | { | 1 | { |
| 2 | "name": "ruoyi-vue-pro-vue3", | 2 | "name": "ruoyi-vue-pro-vue3", |
| 3 | - "version": "1.6.4.1831", | 3 | + "version": "1.6.4.1841", |
| 4 | "description": "基于vue3、vite3、element-plus、typesScript", | 4 | "description": "基于vue3、vite3、element-plus、typesScript", |
| 5 | "author": "xingyu", | 5 | "author": "xingyu", |
| 6 | "private": false, | 6 | "private": false, |
| @@ -31,7 +31,7 @@ | @@ -31,7 +31,7 @@ | ||
| 31 | "@wangeditor/editor-for-vue": "^5.1.10", | 31 | "@wangeditor/editor-for-vue": "^5.1.10", |
| 32 | "@zxcvbn-ts/core": "^2.1.0", | 32 | "@zxcvbn-ts/core": "^2.1.0", |
| 33 | "animate.css": "^4.1.1", | 33 | "animate.css": "^4.1.1", |
| 34 | - "axios": "^0.27.2", | 34 | + "axios": "^1.1.3", |
| 35 | "crypto-js": "^4.1.1", | 35 | "crypto-js": "^4.1.1", |
| 36 | "dayjs": "^1.11.6", | 36 | "dayjs": "^1.11.6", |
| 37 | "echarts": "^5.4.0", | 37 | "echarts": "^5.4.0", |
yudao-ui-admin-vue3/pnpm-lock.yaml
| @@ -23,7 +23,7 @@ specifiers: | @@ -23,7 +23,7 @@ specifiers: | ||
| 23 | '@zxcvbn-ts/core': ^2.1.0 | 23 | '@zxcvbn-ts/core': ^2.1.0 |
| 24 | animate.css: ^4.1.1 | 24 | animate.css: ^4.1.1 |
| 25 | autoprefixer: ^10.4.13 | 25 | autoprefixer: ^10.4.13 |
| 26 | - axios: ^0.27.2 | 26 | + axios: ^1.1.3 |
| 27 | crypto-js: ^4.1.1 | 27 | crypto-js: ^4.1.1 |
| 28 | dayjs: ^1.11.6 | 28 | dayjs: ^1.11.6 |
| 29 | echarts: ^5.4.0 | 29 | echarts: ^5.4.0 |
| @@ -87,7 +87,7 @@ dependencies: | @@ -87,7 +87,7 @@ dependencies: | ||
| 87 | '@wangeditor/editor-for-vue': 5.1.12_wrllzy32b3ic46yjdgf3mkhqlq | 87 | '@wangeditor/editor-for-vue': 5.1.12_wrllzy32b3ic46yjdgf3mkhqlq |
| 88 | '@zxcvbn-ts/core': 2.1.0 | 88 | '@zxcvbn-ts/core': 2.1.0 |
| 89 | animate.css: 4.1.1 | 89 | animate.css: 4.1.1 |
| 90 | - axios: 0.27.2 | 90 | + axios: 1.1.3 |
| 91 | crypto-js: 4.1.1 | 91 | crypto-js: 4.1.1 |
| 92 | dayjs: 1.11.6 | 92 | dayjs: 1.11.6 |
| 93 | echarts: 5.4.0 | 93 | echarts: 5.4.0 |
| @@ -2072,11 +2072,12 @@ packages: | @@ -2072,11 +2072,12 @@ packages: | ||
| 2072 | - debug | 2072 | - debug |
| 2073 | dev: true | 2073 | dev: true |
| 2074 | 2074 | ||
| 2075 | - /axios/0.27.2: | ||
| 2076 | - resolution: {integrity: sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==} | 2075 | + /axios/1.1.3: |
| 2076 | + resolution: {integrity: sha512-00tXVRwKx/FZr/IDVFt4C+f9FYairX517WoGCL6dpOntqLkZofjhu43F/Xl44UOpqa+9sLFDrG/XAnFsUYgkDA==} | ||
| 2077 | dependencies: | 2077 | dependencies: |
| 2078 | follow-redirects: 1.15.2 | 2078 | follow-redirects: 1.15.2 |
| 2079 | form-data: 4.0.0 | 2079 | form-data: 4.0.0 |
| 2080 | + proxy-from-env: 1.1.0 | ||
| 2080 | transitivePeerDependencies: | 2081 | transitivePeerDependencies: |
| 2081 | - debug | 2082 | - debug |
| 2082 | dev: false | 2083 | dev: false |
| @@ -5709,6 +5710,10 @@ packages: | @@ -5709,6 +5710,10 @@ packages: | ||
| 5709 | engines: {node: '>=6'} | 5710 | engines: {node: '>=6'} |
| 5710 | dev: false | 5711 | dev: false |
| 5711 | 5712 | ||
| 5713 | + /proxy-from-env/1.1.0: | ||
| 5714 | + resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} | ||
| 5715 | + dev: false | ||
| 5716 | + | ||
| 5712 | /prr/1.0.1: | 5717 | /prr/1.0.1: |
| 5713 | resolution: {integrity: sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==} | 5718 | resolution: {integrity: sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==} |
| 5714 | dev: true | 5719 | dev: true |
yudao-ui-admin-vue3/src/components/Form/src/Form.vue
| @@ -226,6 +226,11 @@ export default defineComponent({ | @@ -226,6 +226,11 @@ export default defineComponent({ | ||
| 226 | vModel={formModel.value[item.field]} | 226 | vModel={formModel.value[item.field]} |
| 227 | {...(autoSetPlaceholder && setTextPlaceholder(item))} | 227 | {...(autoSetPlaceholder && setTextPlaceholder(item))} |
| 228 | {...setComponentProps(item)} | 228 | {...setComponentProps(item)} |
| 229 | + style={ | ||
| 230 | + item?.component === 'Input' | ||
| 231 | + ? { width: '189.5px', ...item.componentProps?.style } | ||
| 232 | + : { ...item.componentProps?.style } | ||
| 233 | + } | ||
| 229 | {...(notRenderOptions.includes(item?.component as string) && | 234 | {...(notRenderOptions.includes(item?.component as string) && |
| 230 | item?.componentProps?.options | 235 | item?.componentProps?.options |
| 231 | ? { options: item?.componentProps?.options || [] } | 236 | ? { options: item?.componentProps?.options || [] } |
yudao-ui-admin-vue3/src/components/Form/src/components/useRenderCheckbox.tsx
| @@ -11,7 +11,12 @@ export const useRenderCheckbox = () => { | @@ -11,7 +11,12 @@ export const useRenderCheckbox = () => { | ||
| 11 | typeof defineComponent | 11 | typeof defineComponent |
| 12 | > | 12 | > |
| 13 | return item?.componentProps?.options?.map((option) => { | 13 | return item?.componentProps?.options?.map((option) => { |
| 14 | - return <Com label={option[labelAlias || 'value']}>{option[valueAlias || 'label']}</Com> | 14 | + const { value, ...other } = option |
| 15 | + return ( | ||
| 16 | + <Com label={option[labelAlias || 'value']} {...other}> | ||
| 17 | + {option[valueAlias || 'label']} | ||
| 18 | + </Com> | ||
| 19 | + ) | ||
| 15 | }) | 20 | }) |
| 16 | } | 21 | } |
| 17 | 22 |
yudao-ui-admin-vue3/src/components/Form/src/components/useRenderRadio.tsx
| @@ -11,7 +11,12 @@ export const useRenderRadio = () => { | @@ -11,7 +11,12 @@ export const useRenderRadio = () => { | ||
| 11 | typeof defineComponent | 11 | typeof defineComponent |
| 12 | > | 12 | > |
| 13 | return item?.componentProps?.options?.map((option) => { | 13 | return item?.componentProps?.options?.map((option) => { |
| 14 | - return <Com label={option[labelAlias || 'value']}>{option[valueAlias || 'label']}</Com> | 14 | + const { value, ...other } = option |
| 15 | + return ( | ||
| 16 | + <Com label={option[labelAlias || 'value']} {...other}> | ||
| 17 | + {option[valueAlias || 'label']} | ||
| 18 | + </Com> | ||
| 19 | + ) | ||
| 15 | }) | 20 | }) |
| 16 | } | 21 | } |
| 17 | 22 |
yudao-ui-admin-vue3/src/components/Menu/src/Menu.vue
| @@ -220,10 +220,10 @@ export default defineComponent({ | @@ -220,10 +220,10 @@ export default defineComponent({ | ||
| 220 | 220 | ||
| 221 | // 水平菜单 | 221 | // 水平菜单 |
| 222 | &__horizontal { | 222 | &__horizontal { |
| 223 | - height: calc(~'var( - -top-tool-height)') !important; | 223 | + height: calc(~'var(--top-tool-height)') !important; |
| 224 | 224 | ||
| 225 | :deep(.@{elNamespace}-menu--horizontal) { | 225 | :deep(.@{elNamespace}-menu--horizontal) { |
| 226 | - height: calc(~'var( - -top-tool-height)'); | 226 | + height: calc(~'var(--top-tool-height)'); |
| 227 | border-bottom: none; | 227 | border-bottom: none; |
| 228 | // 重新设置底部高亮颜色 | 228 | // 重新设置底部高亮颜色 |
| 229 | & > .@{elNamespace}-sub-menu.is-active { | 229 | & > .@{elNamespace}-sub-menu.is-active { |
yudao-ui-admin-vue3/src/config/axios/service.ts
| @@ -48,7 +48,7 @@ service.interceptors.request.use( | @@ -48,7 +48,7 @@ service.interceptors.request.use( | ||
| 48 | // 设置租户 | 48 | // 设置租户 |
| 49 | if (tenantEnable) { | 49 | if (tenantEnable) { |
| 50 | const tenantId = getTenantId() | 50 | const tenantId = getTenantId() |
| 51 | - if (tenantId) (config as Recordable).headers.common['tenant-id'] = tenantId | 51 | + if (tenantId) service.defaults.headers.common['tenant-id'] = tenantId |
| 52 | } | 52 | } |
| 53 | const params = config.params || {} | 53 | const params = config.params || {} |
| 54 | const data = config.data || false | 54 | const data = config.data || false |
| @@ -94,7 +94,7 @@ service.interceptors.request.use( | @@ -94,7 +94,7 @@ service.interceptors.request.use( | ||
| 94 | 94 | ||
| 95 | // response 拦截器 | 95 | // response 拦截器 |
| 96 | service.interceptors.response.use( | 96 | service.interceptors.response.use( |
| 97 | - async (response: AxiosResponse<Recordable>) => { | 97 | + async (response: AxiosResponse<any>) => { |
| 98 | const { data } = response | 98 | const { data } = response |
| 99 | const config = response.config | 99 | const config = response.config |
| 100 | if (!data) { | 100 | if (!data) { |
| @@ -104,7 +104,6 @@ service.interceptors.response.use( | @@ -104,7 +104,6 @@ service.interceptors.response.use( | ||
| 104 | const { t } = useI18n() | 104 | const { t } = useI18n() |
| 105 | // 未设置状态码则默认成功状态 | 105 | // 未设置状态码则默认成功状态 |
| 106 | const code = data.code || result_code | 106 | const code = data.code || result_code |
| 107 | - // 二进制数据则直接返回 | ||
| 108 | if ( | 107 | if ( |
| 109 | response.request.responseType === 'blob' || | 108 | response.request.responseType === 'blob' || |
| 110 | response.request.responseType === 'arraybuffer' | 109 | response.request.responseType === 'arraybuffer' |
| @@ -126,10 +125,11 @@ service.interceptors.response.use( | @@ -126,10 +125,11 @@ service.interceptors.response.use( | ||
| 126 | } | 125 | } |
| 127 | // 2. 进行刷新访问令牌 | 126 | // 2. 进行刷新访问令牌 |
| 128 | try { | 127 | try { |
| 129 | - const refreshTokenRes = await refreshToken() | 128 | + const refreshTokenRes = refreshToken() |
| 130 | // 2.1 刷新成功,则回放队列的请求 + 当前请求 | 129 | // 2.1 刷新成功,则回放队列的请求 + 当前请求 |
| 131 | - setToken(refreshTokenRes.data.data) | 130 | + setToken((await refreshTokenRes).data.data) |
| 132 | config.headers!.Authorization = 'Bearer ' + getAccessToken() | 131 | config.headers!.Authorization = 'Bearer ' + getAccessToken() |
| 132 | + service.defaults.headers.Authorization = 'Bearer ' + getAccessToken() | ||
| 133 | requestList.forEach((cb: any) => { | 133 | requestList.forEach((cb: any) => { |
| 134 | cb() | 134 | cb() |
| 135 | }) | 135 | }) |