From c20eb8e1f4c813a700993080931de6cfd854a758 Mon Sep 17 00:00:00 2001 From: XuZhiqiang Date: Thu, 18 Jun 2026 23:17:32 +0800 Subject: [PATCH] refactor(@vben/web-antdv-next): migrate SelectOption usages to options and optionRender Replace remaining SelectOption children with Select options across form-create, BPM, IoT, MES, WMS, Mall, and infra pages. Use optionRender for custom option content and update the sync skill with Select slot migration guidance. --- .../form-create/components/dict-select.vue | 31 +++++------ .../form-create/components/use-api-select.tsx | 31 ++--------- .../nodes-config/modules/condition.vue | 45 +++++++++------- .../bpm/model/form/modules/form-design.vue | 17 +++--- .../src/views/infra/webSocket/index.vue | 31 +++++------ .../configs/current-time-condition-config.vue | 28 +++++----- .../form/configs/device-control-config.vue | 28 ++++++---- .../scene/form/selectors/device-selector.vue | 33 +++++++----- .../form/selectors/operator-selector.vue | 25 +++++---- .../scene/form/selectors/product-selector.vue | 31 ++++++----- .../form/selectors/property-selector.vue | 54 ++++++++----------- .../components/mobile/tab-bar/property.vue | 28 ++++++---- .../mes/md/unitmeasure/components/select.vue | 27 ++++++---- .../components/workshop-select.vue | 27 ++++++---- .../pro/andon/config/components/select.vue | 28 ++++++---- .../mes/pro/process/components/select.vue | 27 ++++++---- .../wm/warehouse/components/area-select.vue | 22 +++++--- .../warehouse/components/location-select.vue | 24 ++++++--- .../mes/wm/warehouse/components/select.vue | 22 +++++--- 19 files changed, 304 insertions(+), 255 deletions(-) diff --git a/apps/web-antdv-next/src/components/form-create/components/dict-select.vue b/apps/web-antdv-next/src/components/form-create/components/dict-select.vue index 11b961c5f..04a62f109 100644 --- a/apps/web-antdv-next/src/components/form-create/components/dict-select.vue +++ b/apps/web-antdv-next/src/components/form-create/components/dict-select.vue @@ -6,14 +6,7 @@ import { computed, useAttrs } from 'vue'; import { getDictOptions } from '@vben/hooks'; -import { - Checkbox, - CheckboxGroup, - Radio, - RadioGroup, - Select, - SelectOption, -} from 'antdv-next'; +import { Checkbox, CheckboxGroup, Radio, RadioGroup, Select } from 'antdv-next'; defineOptions({ name: 'DictSelect' }); @@ -41,18 +34,22 @@ const getDictOption = computed(() => { } } }); + +const selectOptions = computed(() => + getDictOption.value.map((dict) => ({ + label: dict.label, + value: dict.value as any, + })), +);