From 07c741f124d06cdf51f8255cd7dfa07a4e7c828d Mon Sep 17 00:00:00 2001 From: chenminjie <943130926@qq.com> Date: Fri, 29 Nov 2024 18:34:00 +0800 Subject: [PATCH] feat: add number-to-string conversion in mValue watcher for api components --- .../src/components/form/components/api-radio-group.vue | 9 +++++++++ .../src/components/form/components/api-select.vue | 9 +++++++++ .../src/components/form/components/api-tree-select.vue | 9 +++++++++ 3 files changed, 27 insertions(+) diff --git a/apps/web-antd/src/components/form/components/api-radio-group.vue b/apps/web-antd/src/components/form/components/api-radio-group.vue index d87e7445..08f54347 100644 --- a/apps/web-antd/src/components/form/components/api-radio-group.vue +++ b/apps/web-antd/src/components/form/components/api-radio-group.vue @@ -123,6 +123,15 @@ watch( }, { deep: true }, ); + +watch( + () => mValue.value, + (newValue) => { + if (typeof newValue === 'number') { + mValue.value = `${newValue}`; + } + }, +);