From e2b91f88ab058aa28a99b7cd8e0eb4f79d849914 Mon Sep 17 00:00:00 2001 From: dap <15891557205@163.com> Date: Thu, 5 Dec 2024 08:29:46 +0800 Subject: [PATCH 01/22] =?UTF-8?q?fix:=20=E5=AE=98=E6=96=B9Commit17c7ce8?= =?UTF-8?q?=E9=80=A0=E6=88=90=E7=9A=84=E9=A1=B5=E9=9D=A2=E6=BC=82=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/@core/ui-kit/layout-ui/src/vben-layout.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@core/ui-kit/layout-ui/src/vben-layout.vue b/packages/@core/ui-kit/layout-ui/src/vben-layout.vue index 98932e25..a598f291 100644 --- a/packages/@core/ui-kit/layout-ui/src/vben-layout.vue +++ b/packages/@core/ui-kit/layout-ui/src/vben-layout.vue @@ -503,7 +503,7 @@ function handleHeaderToggle() {
+
diff --git a/packages/@core/ui-kit/shadcn-ui/src/ui/sheet/SheetFooter.vue b/packages/@core/ui-kit/shadcn-ui/src/ui/sheet/SheetFooter.vue index a8e56d8c..09460b90 100644 --- a/packages/@core/ui-kit/shadcn-ui/src/ui/sheet/SheetFooter.vue +++ b/packages/@core/ui-kit/shadcn-ui/src/ui/sheet/SheetFooter.vue @@ -7,10 +7,7 @@ const props = defineProps<{ class?: any }>(); + + From 827ef2e40303fa420240156072e68b2c5253e688 Mon Sep 17 00:00:00 2001 From: dap <15891557205@163.com> Date: Thu, 5 Dec 2024 16:08:56 +0800 Subject: [PATCH 06/22] =?UTF-8?q?fix:=20=E9=BB=98=E8=AE=A4word-break:=20br?= =?UTF-8?q?eak-word;=E4=BC=9A=E5=AF=BC=E8=87=B4json=E9=A2=84=E8=A7=88?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-antd/src/views/monitor/operlog/data.tsx | 7 +++++-- .../src/views/monitor/operlog/operation-preview-drawer.vue | 6 ------ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/apps/web-antd/src/views/monitor/operlog/data.tsx b/apps/web-antd/src/views/monitor/operlog/data.tsx index f5e693ed..788fc1b9 100644 --- a/apps/web-antd/src/views/monitor/operlog/data.tsx +++ b/apps/web-antd/src/views/monitor/operlog/data.tsx @@ -157,12 +157,15 @@ export const descSchema: DescItem[] = [ field: 'method', label: '方法', }, + /** + * 默认word-break: break-word;会导致json预览样式异常 + */ { field: 'operParam', label: '请求参数', render(value) { return ( -
+
{renderJsonPreview(value)}
); @@ -173,7 +176,7 @@ export const descSchema: DescItem[] = [ label: '响应参数', render(value) { return ( -
+
{renderJsonPreview(value)}
); diff --git a/apps/web-antd/src/views/monitor/operlog/operation-preview-drawer.vue b/apps/web-antd/src/views/monitor/operlog/operation-preview-drawer.vue index d5b0df9f..07f98c31 100644 --- a/apps/web-antd/src/views/monitor/operlog/operation-preview-drawer.vue +++ b/apps/web-antd/src/views/monitor/operlog/operation-preview-drawer.vue @@ -30,9 +30,3 @@ function handleOpenChange(open: boolean) { - - From 48ca7aca8c30c8ad3cb3530264bf2cbcae6a980a Mon Sep 17 00:00:00 2001 From: dap <15891557205@163.com> Date: Fri, 6 Dec 2024 09:27:11 +0800 Subject: [PATCH 07/22] =?UTF-8?q?fix:=20=E5=BE=AE=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E7=89=88=E6=9C=AC=20=E5=8C=BA=E9=97=B4=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E5=92=8C=E4=B8=AD=E6=96=87=E6=90=9C=E7=B4=A2=E6=9D=A1=E4=BB=B6?= =?UTF-8?q?=E4=B8=80=E8=B5=B7=E4=BD=BF=E7=94=A8=20=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E6=AD=A3=E7=A1=AE=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + apps/web-antd/src/api/request.ts | 18 ++++++++++++++++++ packages/effects/request/package.json | 4 +++- packages/effects/request/src/index.ts | 1 + 4 files changed, 23 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a6237f5..676a5698 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ **BUG FIXES** - 操作日志详情 在description组件中json预览样式异常 +- 微服务版本 区间查询和中文搜索条件一起使用 无法正确查询 # 1.1.2 diff --git a/apps/web-antd/src/api/request.ts b/apps/web-antd/src/api/request.ts index 7d540963..b3d80804 100644 --- a/apps/web-antd/src/api/request.ts +++ b/apps/web-antd/src/api/request.ts @@ -10,6 +10,7 @@ import { authenticateResponseInterceptor, errorMessageResponseInterceptor, RequestClient, + stringify, } from '@vben/request'; import { useAccessStore } from '@vben/stores'; @@ -94,6 +95,23 @@ function createRequestClient(baseURL: string) { // 添加全局clientId config.headers.clientId = clientId; + /** + * 格式化get/delete参数 + * 如果包含自定义的paramsSerializer则不走此逻辑 + */ + if ( + ['DELETE', 'GET'].includes(config.method?.toUpperCase() || '') && + config.params && + !config.paramsSerializer + ) { + /** + * 1. 格式化参数 微服务在传递区间时间选择(后端的params Map类型参数)需要格式化key 否则接收不到 + * 2. 数组参数需要格式化 后端才能正常接收 会变成arr=1&arr=2&arr=3的格式来接收 + */ + config.paramsSerializer = (params) => + stringify(params, { arrayFormat: 'repeat' }); + } + const { encrypt } = config; // 全局开启请求加密功能 && 该请求开启 && 是post/put请求 if ( diff --git a/packages/effects/request/package.json b/packages/effects/request/package.json index 59bcd836..3cff702c 100644 --- a/packages/effects/request/package.json +++ b/packages/effects/request/package.json @@ -22,9 +22,11 @@ "dependencies": { "@vben/locales": "workspace:*", "@vben/utils": "workspace:*", - "axios": "catalog:" + "axios": "catalog:", + "qs": "^6.13.1" }, "devDependencies": { + "@types/qs": "^6.9.17", "axios-mock-adapter": "catalog:" } } diff --git a/packages/effects/request/src/index.ts b/packages/effects/request/src/index.ts index fae1b058..e1805bf5 100644 --- a/packages/effects/request/src/index.ts +++ b/packages/effects/request/src/index.ts @@ -1,2 +1,3 @@ export * from './request-client'; export * from 'axios'; +export { stringify } from 'qs'; From 1d842b1b87eae88316d192c67a2172077f924bfe Mon Sep 17 00:00:00 2001 From: dap <15891557205@163.com> Date: Fri, 6 Dec 2024 09:32:27 +0800 Subject: [PATCH 08/22] =?UTF-8?q?fix:=20break-normal=E6=9B=B4=E6=94=B9?= =?UTF-8?q?=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-antd/src/utils/render.tsx | 4 ++-- apps/web-antd/src/views/monitor/operlog/data.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/web-antd/src/utils/render.tsx b/apps/web-antd/src/utils/render.tsx index e3a136bb..fcc9102e 100644 --- a/apps/web-antd/src/utils/render.tsx +++ b/apps/web-antd/src/utils/render.tsx @@ -68,7 +68,7 @@ export function renderJsonPreview(json: any) { return {json}; } if (typeof json === 'object') { - return ; + return ; } try { const obj = JSON.parse(json); @@ -76,7 +76,7 @@ export function renderJsonPreview(json: any) { if (typeof obj !== 'object') { return {obj}; } - return ; + return ; } catch { return {json}; } diff --git a/apps/web-antd/src/views/monitor/operlog/data.tsx b/apps/web-antd/src/views/monitor/operlog/data.tsx index 788fc1b9..1faf87fd 100644 --- a/apps/web-antd/src/views/monitor/operlog/data.tsx +++ b/apps/web-antd/src/views/monitor/operlog/data.tsx @@ -165,7 +165,7 @@ export const descSchema: DescItem[] = [ label: '请求参数', render(value) { return ( -
+
{renderJsonPreview(value)}
); @@ -176,7 +176,7 @@ export const descSchema: DescItem[] = [ label: '响应参数', render(value) { return ( -
+
{renderJsonPreview(value)}
); From 0efbf57152a84eb8d60790e086e976e6f5d6bcb5 Mon Sep 17 00:00:00 2001 From: dap <15891557205@163.com> Date: Fri, 6 Dec 2024 10:45:46 +0800 Subject: [PATCH 09/22] =?UTF-8?q?chore:=20=E6=90=9C=E7=B4=A2=E5=BF=BD?= =?UTF-8?q?=E7=95=A5tinymce?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/settings.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 49b28039..b074051d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -99,7 +99,8 @@ "**/.stylelintcache": true, "**/.DS_Store": true, "**/vite.config.mts.*": true, - "**/tea.yaml": true + "**/tea.yaml": true, + "**/public/tinymce/**": true }, "files.watcherExclude": { "**/.git/objects/**": true, From f0db3d6b7987d20232021eb974b6099b45464452 Mon Sep 17 00:00:00 2001 From: Netfan Date: Fri, 6 Dec 2024 13:46:32 +0800 Subject: [PATCH 10/22] chore: codeowners update (#5048) --- .github/CODEOWNERS | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 3b7f8187..9fd86547 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,14 +1,14 @@ # default onwer -* anncwb@126.com vince292007@gmail.com +* anncwb@126.com vince292007@gmail.com netfan@foxmail.com # vben core onwer -/.github/ anncwb@126.com vince292007@gmail.com -/.vscode/ anncwb@126.com vince292007@gmail.com -/packages/ anncwb@126.com vince292007@gmail.com -/packages/@core/ anncwb@126.com vince292007@gmail.com -/internal/ anncwb@126.com vince292007@gmail.com -/scripts/ anncwb@126.com vince292007@gmail.com +/.github/ anncwb@126.com vince292007@gmail.com netfan@foxmail.com +/.vscode/ anncwb@126.com vince292007@gmail.com netfan@foxmail.com +/packages/ anncwb@126.com vince292007@gmail.com netfan@foxmail.com +/packages/@core/ anncwb@126.com vince292007@gmail.com netfan@foxmail.com +/internal/ anncwb@126.com vince292007@gmail.com netfan@foxmail.com +/scripts/ anncwb@126.com vince292007@gmail.com netfan@foxmail.com # vben team onwer -apps/ anncwb@126.com vince292007@gmail.com @vbenjs/team-v5 -docs/ anncwb@126.com vince292007@gmail.com @vbenjs/team-v5 +apps/ anncwb@126.com vince292007@gmail.com netfan@foxmail.com @vbenjs/team-v5 +docs/ anncwb@126.com vince292007@gmail.com netfan@foxmail.com @vbenjs/team-v5 From d1862fba27bab7afb2a2adbfb1f565c238ed109d Mon Sep 17 00:00:00 2001 From: Netfan Date: Fri, 6 Dec 2024 13:46:52 +0800 Subject: [PATCH 11/22] fix: replace input component in `IconPicker` (#5047) * fix: replace input component in `IconPicker` * chore: fixed IconPicker demo --- apps/web-antd/src/adapter/component/index.ts | 8 ++- apps/web-ele/src/adapter/component/index.ts | 14 ++++- apps/web-naive/src/adapter/component/index.ts | 8 ++- .../components/icon-picker/icon-picker.vue | 54 ++++++++++++------- playground/src/adapter/component/index.ts | 8 ++- .../src/views/demos/features/icons/index.vue | 33 +++--------- 6 files changed, 76 insertions(+), 49 deletions(-) diff --git a/apps/web-antd/src/adapter/component/index.ts b/apps/web-antd/src/adapter/component/index.ts index d7e72883..c34c67ac 100644 --- a/apps/web-antd/src/adapter/component/index.ts +++ b/apps/web-antd/src/adapter/component/index.ts @@ -102,7 +102,13 @@ async function initComponentAdapter() { return h(Button, { ...props, attrs, type: 'default' }, slots); }, Divider, - IconPicker, + IconPicker: (props, { attrs, slots }) => { + return h( + IconPicker, + { iconSlot: 'addonAfter', inputComponent: Input, ...props, ...attrs }, + slots, + ); + }, Input: withDefaultPlaceholder(Input, 'input'), InputNumber: withDefaultPlaceholder(InputNumber, 'input'), InputPassword: withDefaultPlaceholder(InputPassword, 'input'), diff --git a/apps/web-ele/src/adapter/component/index.ts b/apps/web-ele/src/adapter/component/index.ts index e6d677be..f53e16c0 100644 --- a/apps/web-ele/src/adapter/component/index.ts +++ b/apps/web-ele/src/adapter/component/index.ts @@ -88,7 +88,19 @@ async function initComponentAdapter() { return h(ElButton, { ...props, attrs, type: 'primary' }, slots); }, Divider: ElDivider, - IconPicker, + IconPicker: (props, { attrs, slots }) => { + return h( + IconPicker, + { + iconSlot: 'append', + modelValueProp: 'model-value', + inputComponent: ElInput, + ...props, + ...attrs, + }, + slots, + ); + }, Input: withDefaultPlaceholder(ElInput, 'input'), InputNumber: withDefaultPlaceholder(ElInputNumber, 'input'), RadioGroup: ElRadioGroup, diff --git a/apps/web-naive/src/adapter/component/index.ts b/apps/web-naive/src/adapter/component/index.ts index a007d52d..6fa96510 100644 --- a/apps/web-naive/src/adapter/component/index.ts +++ b/apps/web-naive/src/adapter/component/index.ts @@ -89,7 +89,13 @@ async function initComponentAdapter() { return h(NButton, { ...props, attrs, type: 'primary' }, slots); }, Divider: NDivider, - IconPicker, + IconPicker: (props, { attrs, slots }) => { + return h( + IconPicker, + { iconSlot: 'suffix', inputComponent: NInput, ...props, ...attrs }, + slots, + ); + }, Input: withDefaultPlaceholder(NInput, 'input'), InputNumber: withDefaultPlaceholder(NInputNumber, 'input'), RadioGroup: NRadioGroup, diff --git a/packages/effects/common-ui/src/components/icon-picker/icon-picker.vue b/packages/effects/common-ui/src/components/icon-picker/icon-picker.vue index a19855d4..323ce447 100644 --- a/packages/effects/common-ui/src/components/icon-picker/icon-picker.vue +++ b/packages/effects/common-ui/src/components/icon-picker/icon-picker.vue @@ -1,12 +1,11 @@