From 456a91dfc27d42737ca4a34d8e40de3fee54a10b Mon Sep 17 00:00:00 2001 From: XuZhiqiang Date: Thu, 18 Jun 2026 23:16:30 +0800 Subject: [PATCH] refactor(@vben/web-antdv-next): migrate plain SelectOption usages to options API Replace simple label/value SelectOption children with Select options across BPM, IoT, AI, MP, Mall, codegen, and demo pages. Keep custom option markup cases unchanged. --- .../src/components/cron-tab/cron-tab.vue | 162 ++++++----------- .../ai/image/index/modules/common/index.vue | 33 +--- .../image/index/modules/midjourney/index.vue | 21 +-- .../index/modules/stable-diffusion/index.vue | 38 +--- .../src/views/ai/music/index/mode/desc.vue | 17 +- .../src/views/ai/music/index/mode/lyric.vue | 25 +-- .../ai/workflow/form/modules/basic-info.vue | 25 +-- .../workflow/form/modules/workflow-design.vue | 29 +-- .../components/BoundaryEventTimer.vue | 13 +- .../components/UserTaskCustomConfig.vue | 25 +-- .../penal/flow-condition/FlowCondition.vue | 45 ++--- .../package/penal/form/ElementForm.vue | 14 +- .../penal/listeners/ElementListeners.vue | 50 +++--- .../penal/listeners/ListenerFieldModal.vue | 20 +-- .../penal/listeners/UserTaskListeners.vue | 72 ++++---- .../multi-instance/ElementMultiInstance.vue | 16 +- .../task/task-components/CallActivity.vue | 14 +- .../task/task-components/ReceiveTask.vue | 18 +- .../penal/task/task-components/ScriptTask.vue | 20 +-- .../penal/task/task-components/UserTask.vue | 111 ++++-------- .../child-process-node-config.vue | 146 ++++++--------- .../nodes-config/copy-task-node-config.vue | 120 +++++-------- .../nodes-config/delay-timer-node-config.vue | 15 +- .../nodes-config/modules/condition.vue | 15 +- .../modules/http-request-param-setting.vue | 82 ++++----- .../modules/http-request-setting.vue | 34 ++-- .../nodes-config/router-node-config.vue | 12 +- .../nodes-config/trigger-node-config.vue | 43 ++--- .../nodes-config/user-task-node-config.vue | 167 +++++++----------- .../bpm/model/form/modules/basic-info.vue | 12 +- .../detail/modules/operation-button.vue | 83 +++------ .../infra/codegen/modules/column-info.vue | 56 ++---- .../views/infra/demo/general/demo01/index.vue | 19 +- .../infra/demo/general/demo03/erp/index.vue | 19 +- .../infra/demo/general/demo03/inner/index.vue | 19 +- .../demo/general/demo03/normal/index.vue | 19 +- .../device/device/detail/modules/message.vue | 23 +-- .../detail/modules/thing-model-event.vue | 25 +-- .../detail/modules/thing-model-service.vue | 25 +-- .../src/views/iot/device/device/index.vue | 68 ++----- .../data/sink/config/http-config-form.vue | 30 ++-- .../rule/data/sink/config/tcp-config-form.vue | 21 +-- .../sink/config/websocket-config-form.vue | 13 +- .../rule/scene/form/configs/alert-config.vue | 13 +- .../scene/form/configs/condition-config.vue | 35 +--- .../configs/main-condition-inner-config.vue | 46 ++--- .../rule/scene/form/inputs/value-input.vue | 21 +-- .../scene/form/sections/action-section.vue | 21 +-- .../thingmodel/modules/data-specs/number.vue | 18 +- .../views/iot/thingmodel/modules/property.vue | 26 +-- .../spu/form/modules/product-attributes.vue | 14 +- .../wx-account-select/wx-account-select.vue | 10 +- .../src/views/mp/menu/modules/editor.vue | 23 +-- 53 files changed, 713 insertions(+), 1348 deletions(-) diff --git a/apps/web-antdv-next/src/components/cron-tab/cron-tab.vue b/apps/web-antdv-next/src/components/cron-tab/cron-tab.vue index ad11e9d25..ab9366e30 100644 --- a/apps/web-antdv-next/src/components/cron-tab/cron-tab.vue +++ b/apps/web-antdv-next/src/components/cron-tab/cron-tab.vue @@ -16,7 +16,6 @@ import { RadioButton, RadioGroup, Select, - SelectOption, TabPane, Tabs, } from 'antdv-next'; @@ -419,22 +418,21 @@ function inputChange() { @input="inputChange" > @@ -498,14 +496,10 @@ function inputChange() { v-model:value="cronValue.second.appoint" mode="multiple" style="width: 100%" - > - - + :options=" + data.second.map((item) => ({ label: item, value: item })) + " + /> @@ -562,14 +556,10 @@ function inputChange() { v-model:value="cronValue.minute.appoint" mode="multiple" style="width: 100%" - > - - + :options=" + data.minute.map((item) => ({ label: item, value: item })) + " + /> @@ -626,14 +616,10 @@ function inputChange() { v-model:value="cronValue.hour.appoint" mode="multiple" style="width: 100%" - > - - + :options=" + data.hour.map((item) => ({ label: item, value: item })) + " + /> @@ -692,14 +678,10 @@ function inputChange() { v-model:value="cronValue.day.appoint" mode="multiple" style="width: 100%" - > - - + :options=" + data.day.map((item) => ({ label: item, value: item })) + " + /> @@ -756,14 +738,10 @@ function inputChange() { v-model:value="cronValue.month.appoint" mode="multiple" style="width: 100%" - > - - + :options=" + data.month.map((item) => ({ label: item, value: item })) + " + /> @@ -787,23 +765,15 @@ function inputChange() { - + - - + - - + + :options="data.week" + /> - + + :options=" + data.year.map((item) => ({ label: item, value: item })) + " + /> diff --git a/apps/web-antdv-next/src/views/ai/image/index/modules/common/index.vue b/apps/web-antdv-next/src/views/ai/image/index/modules/common/index.vue index 2ac784268..f614f2b9a 100644 --- a/apps/web-antdv-next/src/views/ai/image/index/modules/common/index.vue +++ b/apps/web-antdv-next/src/views/ai/image/index/modules/common/index.vue @@ -12,14 +12,7 @@ import { OtherPlatformEnum, } from '@vben/constants'; -import { - Button, - InputNumber, - Select, - SelectOption, - Space, - TextArea, -} from 'antdv-next'; +import { Button, InputNumber, Select, Space, TextArea } from 'antdv-next'; import { drawImage } from '#/api/ai/image'; @@ -154,15 +147,9 @@ defineExpose({ settingValues }); size="large" class="!w-80" @change="handlerPlatformChange" - > - - {{ item.name }} - - + :options="OtherPlatformEnum" + :field-names="{ label: 'name', value: 'key' }" + /> @@ -176,15 +163,9 @@ defineExpose({ settingValues }); placeholder="Select" size="large" class="!w-80" - > - - {{ item.name }} - - + :options="platformModels" + :field-names="{ label: 'name', value: 'id' }" + /> diff --git a/apps/web-antdv-next/src/views/ai/image/index/modules/midjourney/index.vue b/apps/web-antdv-next/src/views/ai/image/index/modules/midjourney/index.vue index 783b5f5a3..3544a991b 100644 --- a/apps/web-antdv-next/src/views/ai/image/index/modules/midjourney/index.vue +++ b/apps/web-antdv-next/src/views/ai/image/index/modules/midjourney/index.vue @@ -17,15 +17,7 @@ import { NijiVersionList, } from '@vben/constants'; -import { - Button, - Image, - message, - Select, - SelectOption, - Space, - TextArea, -} from 'antdv-next'; +import { Button, Image, message, Select, Space, TextArea } from 'antdv-next'; import { midjourneyImagine } from '#/api/ai/image'; import { ImageUpload } from '#/components/upload'; @@ -222,15 +214,8 @@ defineExpose({ settingValues }); class="!w-80" allow-clear placeholder="请选择版本" - > - - {{ item.label }} - - + :options="versionList" + /> diff --git a/apps/web-antdv-next/src/views/ai/image/index/modules/stable-diffusion/index.vue b/apps/web-antdv-next/src/views/ai/image/index/modules/stable-diffusion/index.vue index 451fc907e..32c4626a8 100644 --- a/apps/web-antdv-next/src/views/ai/image/index/modules/stable-diffusion/index.vue +++ b/apps/web-antdv-next/src/views/ai/image/index/modules/stable-diffusion/index.vue @@ -19,7 +19,6 @@ import { InputNumber, message, Select, - SelectOption, Space, TextArea, } from 'antdv-next'; @@ -169,15 +168,9 @@ defineExpose({ settingValues }); placeholder="Select" size="large" class="!w-80" - > - - {{ item.name }} - - + :options="StableDiffusionSamplers" + :field-names="{ label: 'name', value: 'key' }" + /> @@ -190,15 +183,9 @@ defineExpose({ settingValues }); placeholder="Select" size="large" class="!w-80" - > - - {{ item.name }} - - + :options="StableDiffusionClipGuidancePresets" + :field-names="{ label: 'name', value: 'key' }" + /> @@ -211,16 +198,9 @@ defineExpose({ settingValues }); placeholder="Select" size="large" class="!w-80" - > - - {{ item.name }} - - + :options="StableDiffusionStylePresets" + :field-names="{ label: 'name', value: 'key' }" + /> diff --git a/apps/web-antdv-next/src/views/ai/music/index/mode/desc.vue b/apps/web-antdv-next/src/views/ai/music/index/mode/desc.vue index a3bf14ca1..ad9f039ff 100644 --- a/apps/web-antdv-next/src/views/ai/music/index/mode/desc.vue +++ b/apps/web-antdv-next/src/views/ai/music/index/mode/desc.vue @@ -1,7 +1,7 @@