);
@@ -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 @@
@@ -119,24 +143,18 @@ defineExpose({ toggleOpenState, open, close });
content-class="p-0 pt-3"
>
-
-
-
-
-
-
+
+
+
+
+
-
+
diff --git a/playground/src/adapter/component/index.ts b/playground/src/adapter/component/index.ts
index 32efa02a..c1d128ae 100644
--- a/playground/src/adapter/component/index.ts
+++ b/playground/src/adapter/component/index.ts
@@ -103,7 +103,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/playground/src/views/demos/features/icons/index.vue b/playground/src/views/demos/features/icons/index.vue
index d1a6f7e8..cc5ed066 100644
--- a/playground/src/views/demos/features/icons/index.vue
+++ b/playground/src/views/demos/features/icons/index.vue
@@ -1,9 +1,8 @@
@@ -84,23 +85,8 @@ const iconValue = ref('ant-design:trademark-outlined');
- 完整替换触发组件:
-
-
-
-
-
-
-
-
-
+ 使用Input:
+
可手动输入,只能点击图标打开弹窗:
@@ -111,14 +97,7 @@ const iconValue = ref('ant-design:trademark-outlined');
style="width: 300px"
>
-
-
-
-
-
+
From d42daf9ce014b6ca8474957abaa566f0d5ef400c Mon Sep 17 00:00:00 2001
From: Netfan
Date: Sat, 7 Dec 2024 11:00:53 +0800
Subject: [PATCH 12/22] fix: modal radius not follow preferences (#5063)
---
packages/@core/ui-kit/popup-ui/src/modal/modal.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/@core/ui-kit/popup-ui/src/modal/modal.vue b/packages/@core/ui-kit/popup-ui/src/modal/modal.vue
index e701f565..80a657fa 100644
--- a/packages/@core/ui-kit/popup-ui/src/modal/modal.vue
+++ b/packages/@core/ui-kit/popup-ui/src/modal/modal.vue
@@ -172,7 +172,7 @@ function handleFocusOutside(e: Event) {
ref="contentRef"
:class="
cn(
- 'left-0 right-0 top-[10vh] mx-auto flex max-h-[80%] w-[520px] flex-col p-0 sm:rounded-2xl',
+ 'left-0 right-0 top-[10vh] mx-auto flex max-h-[80%] w-[520px] flex-col p-0 sm:rounded-[var(--radius)]',
modalClass,
{
'border-border border': bordered,
From 03f166f8a4c38ff9cce7d8cdf89fa43e01db8b7e Mon Sep 17 00:00:00 2001
From: Netfan
Date: Sat, 7 Dec 2024 11:02:14 +0800
Subject: [PATCH 13/22] fix: `form` prop `handleValuesChange` no effect (#5060)
---
packages/@core/ui-kit/form-ui/src/vben-use-form.vue | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/packages/@core/ui-kit/form-ui/src/vben-use-form.vue b/packages/@core/ui-kit/form-ui/src/vben-use-form.vue
index 107bb4bf..a1395328 100644
--- a/packages/@core/ui-kit/form-ui/src/vben-use-form.vue
+++ b/packages/@core/ui-kit/form-ui/src/vben-use-form.vue
@@ -6,7 +6,7 @@ import type { ExtendedFormApi, VbenFormProps } from './types';
import { useForwardPriorityValues } from '@vben-core/composables';
// import { isFunction } from '@vben-core/shared/utils';
-import { useTemplateRef, watch } from 'vue';
+import { toRaw, useTemplateRef, watch } from 'vue';
import { useDebounceFn } from '@vueuse/core';
@@ -62,6 +62,9 @@ function handleKeyDownEnter(event: KeyboardEvent) {
watch(
() => form.values,
useDebounceFn(() => {
+ (props.handleValuesChange ?? state.value.handleValuesChange)?.(
+ toRaw(form.values),
+ );
state.value.submitOnChange && props.formApi?.submitForm();
}, 300),
{ deep: true },
From 4c1fc4a11eee5d6c6f7c6f85286203c9eae6a260 Mon Sep 17 00:00:00 2001
From: Netfan
Date: Sat, 7 Dec 2024 11:02:59 +0800
Subject: [PATCH 14/22] fix: validate message not display, fix #5034 (#5038)
---
.../@core/ui-kit/form-ui/src/form-render/form-field.vue | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/packages/@core/ui-kit/form-ui/src/form-render/form-field.vue b/packages/@core/ui-kit/form-ui/src/form-render/form-field.vue
index ba14d894..e9ee8f87 100644
--- a/packages/@core/ui-kit/form-ui/src/form-render/form-field.vue
+++ b/packages/@core/ui-kit/form-ui/src/form-render/form-field.vue
@@ -298,11 +298,7 @@ function autofocus() {
>
{{ label }}
-
+
-import {
- computed,
- nextTick,
- onMounted,
- ref,
- type StyleValue,
- useTemplateRef,
-} from 'vue';
+import { computed, nextTick, onMounted, ref, useTemplateRef } from 'vue';
-import { preferences } from '@vben-core/preferences';
+import { CSS_VARIABLE_LAYOUT_CONTENT_HEIGHT } from '@vben-core/shared/constants';
import { cn } from '@vben-core/shared/utils';
interface Props {
@@ -19,8 +12,6 @@ interface Props {
* 根据content可见高度自适应
*/
autoContentHeight?: boolean;
- /** 头部固定(暂未实现) */
- fixedHeader?: boolean;
headerClass?: string;
footerClass?: string;
}
@@ -29,13 +20,7 @@ defineOptions({
name: 'Page',
});
-const {
- contentClass = '',
- description = '',
- autoContentHeight = false,
- title = '',
- fixedHeader = false,
-} = defineProps
();
+const { autoContentHeight = false } = defineProps();
const headerHeight = ref(0);
const footerHeight = ref(0);
@@ -44,22 +29,11 @@ const shouldAutoHeight = ref(false);
const headerRef = useTemplateRef('headerRef');
const footerRef = useTemplateRef('footerRef');
-const headerStyle = computed(() => {
- return fixedHeader
- ? {
- position: 'sticky',
- zIndex: 200,
- top:
- preferences.header.mode === 'fixed' ? 'var(--vben-header-height)' : 0,
- }
- : undefined;
-});
-
const contentStyle = computed(() => {
if (autoContentHeight) {
return {
height: shouldAutoHeight.value
- ? `calc(var(--vben-content-height) - ${headerHeight.value}px - ${footerHeight.value}px)`
+ ? `calc(var(${CSS_VARIABLE_LAYOUT_CONTENT_HEIGHT}) - ${headerHeight.value}px)`
: '0',
// 'overflow-y': shouldAutoHeight.value?'auto':'unset',
};
@@ -97,28 +71,26 @@ onMounted(() => {
ref="headerRef"
:class="
cn(
- 'bg-card relative px-6 py-4',
+ 'bg-card border-border relative flex items-end border-b px-6 py-4',
headerClass,
- fixedHeader
- ? 'border-border border-b transition-all duration-200'
- : '',
)
"
- :style="headerStyle"
>
-
-
- {{ title }}
-
-
+
+
+
+ {{ title }}
+
+
-
-
- {{ description }}
-
-
+
+
+ {{ description }}
+
+
+
-
@@ -132,8 +104,8 @@ onMounted(() => {
ref="footerRef"
:class="
cn(
- footerClass,
'bg-card align-center absolute bottom-0 left-0 right-0 flex px-6 py-4',
+ footerClass,
)
"
>
diff --git a/playground/src/views/examples/form/basic.vue b/playground/src/views/examples/form/basic.vue
index 09a8c74d..c995fe26 100644
--- a/playground/src/views/examples/form/basic.vue
+++ b/playground/src/views/examples/form/basic.vue
@@ -362,7 +362,6 @@ function handleSetFormValue() {
diff --git a/playground/src/views/examples/modal/index.vue b/playground/src/views/examples/modal/index.vue
index 22e9ed8c..d6db2fba 100644
--- a/playground/src/views/examples/modal/index.vue
+++ b/playground/src/views/examples/modal/index.vue
@@ -77,7 +77,6 @@ function openFormModal() {
From 1178f7a0bfae4cc2df49e74c315a655208670338 Mon Sep 17 00:00:00 2001
From: dap <15891557205@163.com>
Date: Sun, 8 Dec 2024 19:05:03 +0800
Subject: [PATCH 20/22] =?UTF-8?q?chore:=20=E5=A4=9A=E4=BD=99=E7=9A=84?=
=?UTF-8?q?=E6=96=87=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
apps/web-antd/.vscode/settings.json | 9 ---------
1 file changed, 9 deletions(-)
delete mode 100644 apps/web-antd/.vscode/settings.json
diff --git a/apps/web-antd/.vscode/settings.json b/apps/web-antd/.vscode/settings.json
deleted file mode 100644
index 382d4256..00000000
--- a/apps/web-antd/.vscode/settings.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "editor.tabSize": 2,
- "editor.defaultFormatter": "esbenp.prettier-vscode",
- "editor.formatOnSave": true,
- "editor.codeActionsOnSave": {
- "source.fixAll.eslint": "explicit",
- "source.fixAll.stylelint": "explicit"
- }
-}
From 41b415362cc8515b28632e55948891b43494d369 Mon Sep 17 00:00:00 2001
From: dap <15891557205@163.com>
Date: Sun, 8 Dec 2024 19:18:09 +0800
Subject: [PATCH 21/22] =?UTF-8?q?chore:=20markdown=E7=9B=B4=E6=8E=A5v-mode?=
=?UTF-8?q?l=E6=94=B9=E5=8F=98=E5=80=BC=20=E4=BF=9D=E6=8C=81=E4=B8=8E?=
=?UTF-8?q?=E7=BC=96=E8=BE=91=E5=99=A8=E7=9A=84=E5=90=8C=E6=AD=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../effects/common-ui/src/components/markdown/editor.vue | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/packages/effects/common-ui/src/components/markdown/editor.vue b/packages/effects/common-ui/src/components/markdown/editor.vue
index 8a64c67c..47ffbe04 100644
--- a/packages/effects/common-ui/src/components/markdown/editor.vue
+++ b/packages/effects/common-ui/src/components/markdown/editor.vue
@@ -82,6 +82,13 @@ const content = defineModel('value', {
type: String,
default: '',
});
+/**
+ * 为了保持外部直接(v-model)与编辑器内部的同步
+ * 注意: 下面的input事件也会触发watch
+ */
+watch(content, (value) => {
+ vditorInstance.value?.setValue(value);
+});
// 监听禁用
function changeDisabled(disabled: boolean) {
From a13f808aa2c9f9e70004c13b860de4dfdcb3f7fc Mon Sep 17 00:00:00 2001
From: dap <15891557205@163.com>
Date: Mon, 9 Dec 2024 08:09:04 +0800
Subject: [PATCH 22/22] =?UTF-8?q?chore:=20=E9=97=B4=E8=B7=9D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
apps/web-antd/src/views/system/client/client-drawer.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/apps/web-antd/src/views/system/client/client-drawer.vue b/apps/web-antd/src/views/system/client/client-drawer.vue
index cce41494..6ba88e67 100644
--- a/apps/web-antd/src/views/system/client/client-drawer.vue
+++ b/apps/web-antd/src/views/system/client/client-drawer.vue
@@ -28,7 +28,7 @@ const [BasicForm, formApi] = useVbenForm({
layout: 'vertical',
schema: drawerSchema(),
showDefaultActions: false,
- wrapperClass: 'grid-cols-2',
+ wrapperClass: 'grid-cols-2 gap-x-4',
});
function setupForm(update: boolean) {