fix(web-antdv-next): 统一 Select 和 Radio 子组件引用方式

pull/359/head
XuZhiqiang 2026-06-06 12:05:23 +08:00
parent 4f66adb999
commit 693f0b48c2
31 changed files with 122 additions and 119 deletions

View File

@ -15,7 +15,7 @@ import { DICT_TYPE, IotDeviceMessageMethodEnum } from '@vben/constants';
import { IconifyIcon } from '@vben/icons';
import { formatDateTime } from '@vben/utils';
import { Button, Select, Space, Switch, Tag } from 'antdv-next';
import { Button, Select, SelectOption, Space, Switch, Tag } from 'antdv-next';
import { useVbenVxeGrid } from '#/adapter/vxe-table';
import { getDeviceMessagePage } from '#/api/iot/device/device';
@ -196,14 +196,14 @@ defineExpose({
placeholder="所有方法"
style="width: 160px"
>
<Select.Option
<SelectOption
v-for="item in methodOptions"
:key="item.value"
:label="item.label"
:value="item.value"
>
{{ item.label }}
</Select.Option>
</SelectOption>
</Select>
<Select
v-model:value="queryParams.upstream"
@ -211,8 +211,8 @@ defineExpose({
placeholder="上行/下行"
style="width: 160px"
>
<Select.Option label="上行" value="true">上行</Select.Option>
<Select.Option label="下行" value="false">下行</Select.Option>
<SelectOption label="上行" value="true">上行</SelectOption>
<SelectOption label="下行" value="false">下行</SelectOption>
</Select>
<Space>
<Button type="primary" @click="handleQuery">

View File

@ -14,7 +14,7 @@ import {
import { IconifyIcon } from '@vben/icons';
import { formatDateTime } from '@vben/utils';
import { Button, DatePicker, Select, Space, Tag } from 'antdv-next';
import { Button, DatePicker, Select, SelectOption, Space, Tag } from 'antdv-next';
import { useVbenVxeGrid } from '#/adapter/vxe-table';
import { getDeviceMessagePairPage } from '#/api/iot/device/device';
@ -213,13 +213,13 @@ defineExpose({
placeholder="请选择事件标识符"
style="width: 240px"
>
<Select.Option
<SelectOption
v-for="event in eventThingModels"
:key="event.identifier"
:value="event.identifier!"
>
{{ event.name }}({{ event.identifier }})
</Select.Option>
</SelectOption>
</Select>
</div>
<div class="flex items-center gap-2">

View File

@ -14,7 +14,7 @@ import {
import { IconifyIcon } from '@vben/icons';
import { formatDateTime } from '@vben/utils';
import { Button, DatePicker, Select, Space, Tag } from 'antdv-next';
import { Button, DatePicker, Select, SelectOption, Space, Tag } from 'antdv-next';
import { useVbenVxeGrid } from '#/adapter/vxe-table';
import { getDeviceMessagePairPage } from '#/api/iot/device/device';
@ -227,13 +227,13 @@ defineExpose({
placeholder="请选择服务标识符"
style="width: 240px"
>
<Select.Option
<SelectOption
v-for="service in serviceThingModels"
:key="service.identifier"
:value="service.identifier!"
>
{{ service.name }}({{ service.identifier }})
</Select.Option>
</SelectOption>
</Select>
</div>
<div class="flex items-center gap-2">

View File

@ -21,6 +21,7 @@ import {
Input,
message,
Select,
SelectOption,
Space,
Tag,
} from 'antdv-next';
@ -292,13 +293,13 @@ onMounted(async () => {
allow-clear
style="width: 200px"
>
<Select.Option
<SelectOption
v-for="product in products"
:key="product.id"
:value="product.id"
>
{{ product.name }}
</Select.Option>
</SelectOption>
</Select>
<Input
v-model:value="queryParams.deviceName"
@ -320,7 +321,7 @@ onMounted(async () => {
allow-clear
style="width: 200px"
>
<Select.Option
<SelectOption
v-for="dict in getDictOptions(
DICT_TYPE.IOT_PRODUCT_DEVICE_TYPE,
'number',
@ -329,7 +330,7 @@ onMounted(async () => {
:value="dict.value"
>
{{ dict.label }}
</Select.Option>
</SelectOption>
</Select>
<Select
v-model:value="queryParams.status"
@ -337,13 +338,13 @@ onMounted(async () => {
allow-clear
style="width: 200px"
>
<Select.Option
<SelectOption
v-for="dict in getDictOptions(DICT_TYPE.IOT_DEVICE_STATE, 'number')"
:key="dict.value"
:value="dict.value"
>
{{ dict.label }}
</Select.Option>
</SelectOption>
</Select>
<Select
v-model:value="queryParams.groupId"
@ -351,13 +352,13 @@ onMounted(async () => {
allow-clear
style="width: 200px"
>
<Select.Option
<SelectOption
v-for="group in deviceGroups"
:key="group.id"
:value="group.id"
>
{{ group.name }}
</Select.Option>
</SelectOption>
</Select>
<Button type="primary" @click="handleSearch">
<IconifyIcon icon="ant-design:search-outlined" class="mr-1" />

View File

@ -5,7 +5,7 @@ import { computed, onMounted, ref, watch } from 'vue';
import { isEmpty } from '@vben/utils';
import { useVModel } from '@vueuse/core';
import { FormItem, Input, Select } from 'antdv-next';
import { FormItem, Input, Select, SelectOption } from 'antdv-next';
import { IotDataSinkTypeEnum } from '#/api/iot/rule/data/sink';
@ -68,8 +68,8 @@ onMounted(() => {
<Input v-model:value="urlPath" placeholder="请输入请求地址">
<template #addonBefore>
<Select v-model:value="urlPrefix" class="w-[100px]">
<Select.Option value="http://">http://</Select.Option>
<Select.Option value="https://">https://</Select.Option>
<SelectOption value="http://">http://</SelectOption>
<SelectOption value="https://">https://</SelectOption>
</Select>
</template>
</Input>
@ -82,10 +82,10 @@ onMounted(() => {
label="请求方法"
>
<Select v-model:value="config.method" placeholder="请选择请求方法">
<Select.Option value="GET">GET</Select.Option>
<Select.Option value="POST">POST</Select.Option>
<Select.Option value="PUT">PUT</Select.Option>
<Select.Option value="DELETE">DELETE</Select.Option>
<SelectOption value="GET">GET</SelectOption>
<SelectOption value="POST">POST</SelectOption>
<SelectOption value="PUT">PUT</SelectOption>
<SelectOption value="DELETE">DELETE</SelectOption>
</Select>
</FormItem>
<FormItem label="请求头">

View File

@ -4,7 +4,7 @@ import { onMounted } from 'vue';
import { isEmpty } from '@vben/utils';
import { useVModel } from '@vueuse/core';
import { FormItem, Input, InputNumber, Select, Switch } from 'antdv-next';
import { FormItem, Input, InputNumber, Select, SelectOption, Switch } from 'antdv-next';
import { IotDataSinkTypeEnum } from '#/api/iot/rule/data/sink';
@ -114,8 +114,8 @@ onMounted(() => {
label="数据格式"
>
<Select v-model:value="config.dataFormat" placeholder="请选择数据格式">
<Select.Option value="JSON">JSON</Select.Option>
<Select.Option value="BINARY">BINARY</Select.Option>
<SelectOption value="JSON">JSON</SelectOption>
<SelectOption value="BINARY">BINARY</SelectOption>
</Select>
</FormItem>
<FormItem :name="['config', 'heartbeatIntervalMs']" label="心跳间隔(ms)">

View File

@ -4,7 +4,7 @@ import { onMounted } from 'vue';
import { isEmpty } from '@vben/utils';
import { useVModel } from '@vueuse/core';
import { FormItem, Input, InputNumber, Select, Switch } from 'antdv-next';
import { FormItem, Input, InputNumber, Select, SelectOption, Switch } from 'antdv-next';
import { IotDataSinkTypeEnum } from '#/api/iot/rule/data/sink';
@ -120,8 +120,8 @@ onMounted(() => {
label="数据格式"
>
<Select v-model:value="config.dataFormat" placeholder="请选择数据格式">
<Select.Option value="JSON">JSON</Select.Option>
<Select.Option value="TEXT">TEXT</Select.Option>
<SelectOption value="JSON">JSON</SelectOption>
<SelectOption value="TEXT">TEXT</SelectOption>
</Select>
</FormItem>
<FormItem :name="['config', 'reconnectIntervalMs']" label="重连间隔(ms)">

View File

@ -7,7 +7,7 @@ import { useVbenModal } from '@vben/common-ui';
import { CommonStatusEnum, DICT_TYPE } from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { Form, FormItem, Input, message, Radio, Select } from 'antdv-next';
import { Form, FormItem, Input, message, Radio, RadioGroup, Select } from 'antdv-next';
import {
createDataSink,
@ -178,7 +178,7 @@ function handleTypeChange(type: number) {
label="目的状态"
name="status"
>
<Radio.Group v-model:value="formData.status">
<RadioGroup v-model:value="formData.status">
<Radio
v-for="dict in getDictOptions(DICT_TYPE.COMMON_STATUS, 'number')"
:key="String(dict.value)"
@ -186,7 +186,7 @@ function handleTypeChange(type: number) {
>
{{ dict.label }}
</Radio>
</Radio.Group>
</RadioGroup>
</FormItem>
</Form>
</Modal>

View File

@ -3,7 +3,7 @@
import { onMounted, ref } from 'vue';
import { useVModel } from '@vueuse/core';
import { FormItem, Select } from 'antdv-next';
import { FormItem, Select, SelectOption } from 'antdv-next';
import { getSimpleAlertConfigList } from '#/api/iot/alert/config';
@ -56,7 +56,7 @@ onMounted(() => {
class="w-full"
:loading="loading"
>
<Select.Option
<SelectOption
v-for="config in alertConfigs"
:key="config.id"
:label="config.name"

View File

@ -12,7 +12,7 @@ import {
} from '@vben/constants';
import { useVModel } from '@vueuse/core';
import { Col, FormItem, Row, Select } from 'antdv-next';
import { Col, FormItem, Row, Select, SelectOption } from 'antdv-next';
import ValueInput from '../inputs/value-input.vue';
import DeviceSelector from '../selectors/device-selector.vue';
@ -172,13 +172,13 @@ function handleOperatorChange() {
placeholder="请选择条件类型"
class="w-full"
>
<Select.Option
<SelectOption
v-for="option in getConditionTypeOptions()"
:key="option.value"
:value="option.value"
>
{{ option.label }}
</Select.Option>
</SelectOption>
</Select>
</FormItem>
</Col>
@ -229,13 +229,13 @@ function handleOperatorChange() {
placeholder="请选择操作符"
class="w-full"
>
<Select.Option
<SelectOption
v-for="option in statusOperatorOptions"
:key="option.value"
:value="option.value"
>
{{ option.label }}
</Select.Option>
</SelectOption>
</Select>
</FormItem>
</Col>
@ -249,13 +249,13 @@ function handleOperatorChange() {
placeholder="请选择设备状态"
class="w-full"
>
<Select.Option
<SelectOption
v-for="option in deviceStatusOptions"
:key="option.value"
:value="option.value"
>
{{ option.label }}
</Select.Option>
</SelectOption>
</Select>
</FormItem>
</Col>

View File

@ -17,6 +17,7 @@ import {
FormItem,
Row,
Select,
SelectOption,
Tag,
TimePicker,
} from 'antdv-next';
@ -187,7 +188,7 @@ watch(
placeholder="请选择时间条件"
class="w-full"
>
<Select.Option
<SelectOption
v-for="option in timeOperatorOptions"
:key="option.value"
:label="option.label"
@ -202,7 +203,7 @@ watch(
{{ option.category }}
</Tag>
</div>
</Select.Option>
</SelectOption>
</Select>
</FormItem>
</Col>

View File

@ -13,7 +13,7 @@ import {
import { isObject } from '@vben/utils';
import { useVModel } from '@vueuse/core';
import { Col, FormItem, Row, Select, Tag } from 'antdv-next';
import { Col, FormItem, Row, Select, SelectOption, Tag } from 'antdv-next';
import { getThingModelTSLByProductId } from '#/api/iot/thingmodel';
@ -348,7 +348,7 @@ watch(
:loading="loadingServices"
@change="handleServiceChange"
>
<Select.Option
<SelectOption
v-for="service in serviceList"
:key="service.identifier"
:label="service.name"
@ -362,7 +362,7 @@ watch(
{{ service.callType === 'sync' ? '同步' : '异步' }}
</Tag>
</div>
</Select.Option>
</SelectOption>
</Select>
</FormItem>

View File

@ -12,7 +12,7 @@ import {
} from '@vben/constants';
import { useVModel } from '@vueuse/core';
import { Col, FormItem, Input, Row, Select } from 'antdv-next';
import { Col, FormItem, Input, Row, Select, SelectOption } from 'antdv-next';
import JsonParamsInput from '../inputs/json-params-input.vue';
import ValueInput from '../inputs/value-input.vue';
@ -175,13 +175,13 @@ function handlePropertyChange(propertyInfo: any) {
placeholder="请选择触发事件类型"
class="w-full"
>
<Select.Option
<SelectOption
v-for="option in triggerTypeOptions"
:key="option.value"
:value="option.value"
>
{{ option.label }}
</Select.Option>
</SelectOption>
</Select>
</FormItem>
@ -321,7 +321,7 @@ function handlePropertyChange(propertyInfo: any) {
placeholder="请选择操作符"
class="w-full"
>
<Select.Option
<SelectOption
:value="
IotRuleSceneTriggerConditionParameterOperatorEnum.EQUALS.value
"
@ -329,7 +329,7 @@ function handlePropertyChange(propertyInfo: any) {
{{
IotRuleSceneTriggerConditionParameterOperatorEnum.EQUALS.name
}}
</Select.Option>
</SelectOption>
</Select>
</FormItem>
</Col>
@ -341,13 +341,13 @@ function handlePropertyChange(propertyInfo: any) {
placeholder="请选择操作符"
class="w-full"
>
<Select.Option
<SelectOption
v-for="option in deviceStatusChangeOptions"
:key="option.value"
:value="option.value"
>
{{ option.label }}
</Select.Option>
</SelectOption>
</Select>
</FormItem>
</Col>

View File

@ -14,6 +14,7 @@ import {
Input,
InputNumber,
Select,
SelectOption,
Tag,
Tooltip,
} from 'antdv-next';
@ -209,8 +210,8 @@ watch(
placeholder="请选择布尔值"
class="w-full!"
>
<Select.Option value="true"> (true)</Select.Option>
<Select.Option value="false"> (false)</Select.Option>
<SelectOption value="true"> (true)</SelectOption>
<SelectOption value="false"> (false)</SelectOption>
</Select>
<!-- 枚举值选择 -->
@ -222,13 +223,13 @@ watch(
placeholder="请选择枚举值"
class="w-full!"
>
<Select.Option
<SelectOption
v-for="option in enumOptions"
:key="option.value"
:value="option.value"
>
{{ option.label }}
</Select.Option>
</SelectOption>
</Select>
<!-- 范围输入 (between 操作符) -->

View File

@ -11,7 +11,7 @@ import { IconifyIcon } from '@vben/icons';
import { getStableObjectKey } from '@vben/utils';
import { useVModel } from '@vueuse/core';
import { Button, Card, Empty, FormItem, Select, Tag } from 'antdv-next';
import { Button, Card, Empty, FormItem, Select, SelectOption, Tag } from 'antdv-next';
import AlertConfig from '../configs/alert-config.vue';
import DeviceControlConfig from '../configs/device-control-config.vue';
@ -235,13 +235,13 @@ function onActionTypeChange(action: RuleSceneApi.Action, type: number) {
placeholder="请选择执行类型"
class="w-full"
>
<Select.Option
<SelectOption
v-for="option in getActionTypeOptions()"
:key="option.value"
:value="option.value"
>
{{ option.label }}
</Select.Option>
</SelectOption>
</Select>
</FormItem>
</div>

View File

@ -7,7 +7,7 @@ import { getDictOptions } from '@vben/hooks';
import { IconifyIcon } from '@vben/icons';
import { useVModel } from '@vueuse/core';
import { Card, Col, FormItem, Input, Radio, Row } from 'antdv-next';
import { Card, Col, FormItem, Input, Radio, RadioGroup, Row } from 'antdv-next';
import { DictTag } from '#/components/dict-tag';
@ -56,7 +56,7 @@ const formData = useVModel(props, 'modelValue', emit); // 表单数据
</Col>
<Col :span="12">
<FormItem label="场景状态" name="status" required>
<Radio.Group v-model:value="formData.status">
<RadioGroup v-model:value="formData.status">
<Radio
v-for="(dict, index) in getDictOptions(
DICT_TYPE.COMMON_STATUS,
@ -67,7 +67,7 @@ const formData = useVModel(props, 'modelValue', emit); // 表单数据
>
{{ dict.label }}
</Radio>
</Radio.Group>
</RadioGroup>
</FormItem>
</Col>
</Row>

View File

@ -4,7 +4,7 @@ import { ref, watch } from 'vue';
import { DEVICE_SELECTOR_OPTIONS, DICT_TYPE } from '@vben/constants';
import { Select } from 'antdv-next';
import { Select, SelectOption } from 'antdv-next';
import { getDeviceListByProductId } from '#/api/iot/device/device';
import { DictTag } from '#/components/dict-tag';
@ -93,7 +93,7 @@ watch(
:loading="deviceLoading"
:disabled="!productId"
>
<Select.Option
<SelectOption
v-for="device in deviceList"
:key="device.id"
:label="device.deviceName"
@ -112,6 +112,6 @@ watch(
<DictTag :type="DICT_TYPE.IOT_DEVICE_STATE" :value="device.state" />
</div>
</div>
</Select.Option>
</SelectOption>
</Select>
</template>

View File

@ -8,7 +8,7 @@ import {
} from '@vben/constants';
import { useVModel } from '@vueuse/core';
import { Select } from 'antdv-next';
import { Select, SelectOption } from 'antdv-next';
/** 操作符选择器组件 */
defineOptions({ name: 'OperatorSelector' });
@ -245,7 +245,7 @@ watch(
class="w-full"
option-label-prop="label"
>
<Select.Option
<SelectOption
v-for="operator in availableOperators"
:key="operator.value"
:label="operator.label"
@ -266,7 +266,7 @@ watch(
{{ operator.description }}
</div>
</div>
</Select.Option>
</SelectOption>
</Select>
</div>
</template>

View File

@ -4,7 +4,7 @@ import { onMounted, ref } from 'vue';
import { DICT_TYPE } from '@vben/constants';
import { Select } from 'antdv-next';
import { Select, SelectOption } from 'antdv-next';
import { getSimpleProductList } from '#/api/iot/product/product';
import { DictTag } from '#/components/dict-tag';
@ -64,7 +64,7 @@ onMounted(() => {
option-label-prop="label"
:loading="productLoading"
>
<Select.Option
<SelectOption
v-for="product in productList"
:key="product.id"
:label="product.name"
@ -81,6 +81,6 @@ onMounted(() => {
</div>
<DictTag :type="DICT_TYPE.IOT_PRODUCT_STATUS" :value="product.status" />
</div>
</Select.Option>
</SelectOption>
</Select>
</template>

View File

@ -16,7 +16,7 @@ import {
import { IconifyIcon } from '@vben/icons';
import { useVModel } from '@vueuse/core';
import { Button, Popover, Select, Tag } from 'antdv-next';
import { Button, Popover, Select, SelectOptGroup, SelectOption, Tag } from 'antdv-next';
import { getThingModelTSLByProductId } from '#/api/iot/thingmodel';
@ -219,12 +219,12 @@ watch(
option-label-prop="label"
:loading="loading"
>
<Select.OptGroup
<SelectOptGroup
v-for="group in propertyGroups"
:key="group.label"
:label="group.label"
>
<Select.Option
<SelectOption
v-for="property in group.options"
:key="property.identifier"
:label="property.name"
@ -240,8 +240,8 @@ watch(
{{ property.identifier }}
</Tag>
</div>
</Select.Option>
</Select.OptGroup>
</SelectOption>
</SelectOptGroup>
</Select>
<!-- 属性详情弹出层 -->

View File

@ -5,7 +5,7 @@ import type { Ref } from 'vue';
import { getDataTypeOptions, IoTDataSpecsDataTypeEnum } from '@vben/constants';
import { useVModel } from '@vueuse/core';
import { FormItem, Input, Radio } from 'antdv-next';
import { FormItem, Input, Radio, RadioGroup } from 'antdv-next';
import { ThingModelFormRules } from '#/api/iot/thingmodel';
@ -39,7 +39,7 @@ function handleChange(e: any) {
:rules="ThingModelFormRules.childDataType"
label="元素类型"
>
<Radio.Group v-model:value="dataSpecs.childDataType" @change="handleChange">
<RadioGroup v-model:value="dataSpecs.childDataType" @change="handleChange">
<Radio
v-for="item in childDataTypeOptions"
:key="item.value"
@ -48,7 +48,7 @@ function handleChange(e: any) {
>
{{ `${item.value}(${item.label})` }}
</Radio>
</Radio.Group>
</RadioGroup>
</FormItem>
<FormItem
:name="['property', 'dataSpecs', 'size']"

View File

@ -10,7 +10,7 @@ import { DICT_TYPE } from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { useVModel } from '@vueuse/core';
import { FormItem, Input, Select } from 'antdv-next';
import { FormItem, Input, Select, SelectOption } from 'antdv-next';
const props = defineProps<{ modelValue: any }>();
const emits = defineEmits(['update:modelValue']);
@ -134,13 +134,13 @@ function validateStep(_rule: any, _value: any, callback: any) {
class="w-full"
@change="unitChange"
>
<Select.Option
<SelectOption
v-for="(item, index) in unitOptions"
:key="index"
:value="`${item.label}-${item.value}`"
>
{{ `${item.label}-${item.value}` }}
</Select.Option>
</SelectOption>
</Select>
</FormItem>
</template>

View File

@ -11,7 +11,7 @@ import {
import { isEmpty } from '@vben/utils';
import { useVModel } from '@vueuse/core';
import { FormItem, Radio } from 'antdv-next';
import { FormItem, Radio, RadioGroup } from 'antdv-next';
import { ThingModelFormRules } from '#/api/iot/thingmodel';
@ -37,7 +37,7 @@ watch(
:rules="ThingModelFormRules.eventType"
label="事件类型"
>
<Radio.Group v-model:value="thingModelEvent.type">
<RadioGroup v-model:value="thingModelEvent.type">
<Radio
v-for="eventType in Object.values(IoTThingModelEventTypeEnum)"
:key="eventType.value"
@ -45,7 +45,7 @@ watch(
>
{{ eventType.label }}
</Radio>
</Radio.Group>
</RadioGroup>
</FormItem>
<FormItem label="输出参数">
<ThingModelInputOutputParam

View File

@ -17,7 +17,7 @@ import { getDictOptions } from '@vben/hooks';
import { $t } from '@vben/locales';
import { cloneDeep, isEmpty } from '@vben/utils';
import { Form, FormItem, Input, message, Radio } from 'antdv-next';
import { Form, FormItem, Input, message, Radio, RadioButton, RadioGroup } from 'antdv-next';
import {
createThingModel,
@ -198,15 +198,15 @@ function removeDataSpecs(val: any) {
class="mx-4"
>
<FormItem :rules="ThingModelFormRules.type" label="功能类型" name="type">
<Radio.Group v-model:value="formData.type">
<Radio.Button
<RadioGroup v-model:value="formData.type">
<RadioButton
v-for="dict in getDictOptions(DICT_TYPE.IOT_THING_MODEL_TYPE)"
:key="String(dict.value)"
:value="Number(dict.value)"
>
{{ dict.label }}
</Radio.Button>
</Radio.Group>
</RadioButton>
</RadioGroup>
</FormItem>
<FormItem :rules="ThingModelFormRules.name" label="功能名称" name="name">
<Input v-model:value="formData.name" placeholder="请输入功能名称" />

View File

@ -14,7 +14,7 @@ import {
import { isEmpty } from '@vben/utils';
import { useVModel } from '@vueuse/core';
import { FormItem, Input, Radio, Select } from 'antdv-next';
import { FormItem, Input, Radio, RadioGroup, Select, SelectOption } from 'antdv-next';
import { ThingModelFormRules, validateBoolName } from '#/api/iot/thingmodel';
@ -113,13 +113,13 @@ if (!props.isStructDataSpecs && !props.isParams) {
@change="handleChange"
>
<!-- ARRAY STRUCT 类型数据相互嵌套时最多支持递归嵌套 2 父和子 -->
<Select.Option
<SelectOption
v-for="option in dataTypeOptions"
:key="option.value"
:value="option.value"
>
{{ `${option.value}(${option.label})` }}
</Select.Option>
</SelectOption>
</Select>
</FormItem>
<!-- 数值型配置 -->
@ -201,7 +201,7 @@ if (!props.isStructDataSpecs && !props.isParams) {
:rules="ThingModelFormRules.accessMode"
label="读写类型"
>
<Radio.Group v-model:value="property.accessMode">
<RadioGroup v-model:value="property.accessMode">
<Radio
v-for="accessMode in Object.values(IoTThingModelAccessModeEnum)"
:key="accessMode.value"
@ -209,7 +209,7 @@ if (!props.isStructDataSpecs && !props.isParams) {
>
{{ accessMode.label }}
</Radio>
</Radio.Group>
</RadioGroup>
</FormItem>
</template>

View File

@ -11,7 +11,7 @@ import {
import { isEmpty } from '@vben/utils';
import { useVModel } from '@vueuse/core';
import { FormItem, Radio } from 'antdv-next';
import { FormItem, Radio, RadioGroup } from 'antdv-next';
import { ThingModelFormRules } from '#/api/iot/thingmodel';
@ -48,7 +48,7 @@ function getParamIdentifiers(params?: any[]) {
:rules="ThingModelFormRules.callType"
label="调用方式"
>
<Radio.Group v-model:value="service.callType">
<RadioGroup v-model:value="service.callType">
<Radio
v-for="callType in Object.values(IoTThingModelServiceCallTypeEnum)"
:key="callType.value"
@ -56,7 +56,7 @@ function getParamIdentifiers(params?: any[]) {
>
{{ callType.label }}
</Radio>
</Radio.Group>
</RadioGroup>
</FormItem>
<FormItem label="输入参数">
<ThingModelInputOutputParam

View File

@ -8,7 +8,7 @@ import { computed, inject, ref, watch } from 'vue';
import { useVbenModal } from '@vben/common-ui';
import { IOT_PROVIDE_KEY } from '@vben/constants';
import { Radio, TextArea } from 'antdv-next';
import { Radio, RadioButton, RadioGroup, TextArea } from 'antdv-next';
import { getThingModelTSLByProductId } from '#/api/iot/thingmodel';
@ -56,10 +56,10 @@ watch(tslString, (newValue) => {
<Modal :footer="false" class="w-3/5" title="物模型 TSL">
<div class="mx-4">
<div class="mb-4">
<Radio.Group v-model:value="viewMode" size="small">
<Radio.Button value="view">代码视图</Radio.Button>
<Radio.Button value="editor">编辑器视图</Radio.Button>
</Radio.Group>
<RadioGroup v-model:value="viewMode" size="small">
<RadioButton value="view">代码视图</RadioButton>
<RadioButton value="editor">编辑器视图</RadioButton>
</RadioGroup>
</div>
<!-- 代码视图只读展示pre / code 必须紧贴避免显示出空白 -->
<div

View File

@ -3,7 +3,7 @@ import type { MesMdUnitMeasureApi } from '#/api/mes/md/unitmeasure';
import { computed, onMounted, ref, watch } from 'vue';
import { Select, Tag, Tooltip } from 'antdv-next';
import { Select, SelectOption, Tag, Tooltip } from 'antdv-next';
import { getUnitMeasureSimpleList } from '#/api/mes/md/unitmeasure';
@ -106,7 +106,7 @@ onMounted(async () => {
show-search
@change="handleChange"
>
<Select.Option
<SelectOption
v-for="item in filteredList"
:key="item.id"
:item="item"
@ -116,7 +116,7 @@ onMounted(async () => {
<span>{{ item.name }}</span>
<Tag v-if="item.code" color="default">: {{ item.code }}</Tag>
</div>
</Select.Option>
</SelectOption>
</Select>
</Tooltip>
</template>

View File

@ -3,7 +3,7 @@ import type { MesMdWorkshopApi } from '#/api/mes/md/workstation/workshop';
import { computed, onMounted, ref, watch } from 'vue';
import { Select, Tag, Tooltip } from 'antdv-next';
import { Select, SelectOption, Tag, Tooltip } from 'antdv-next';
import { getWorkshopSimpleList } from '#/api/mes/md/workstation/workshop';
@ -101,7 +101,7 @@ onMounted(async () => {
show-search
@change="handleChange"
>
<Select.Option
<SelectOption
v-for="item in allList"
:key="item.id"
:item="item"
@ -111,7 +111,7 @@ onMounted(async () => {
<span>{{ item.name }}</span>
<Tag v-if="item.code" color="default">{{ item.code }}</Tag>
</div>
</Select.Option>
</SelectOption>
</Select>
</Tooltip>
</template>

View File

@ -5,7 +5,7 @@ import { computed, onMounted, ref } from 'vue';
import { DICT_TYPE } from '@vben/constants';
import { Select } from 'antdv-next';
import { Select, SelectOption } from 'antdv-next';
import { getAndonConfigList } from '#/api/mes/pro/andon/config';
import DictTag from '#/components/dict-tag/dict-tag.vue';
@ -73,7 +73,7 @@ onMounted(async () => {
show-search
@change="handleChange"
>
<Select.Option
<SelectOption
v-for="item in allList"
:key="item.id"
:item="item"
@ -83,6 +83,6 @@ onMounted(async () => {
<span>{{ item.reason }}</span>
<DictTag :type="DICT_TYPE.MES_PRO_ANDON_LEVEL" :value="item.level" />
</div>
</Select.Option>
</SelectOption>
</Select>
</template>

View File

@ -3,7 +3,7 @@ import type { MesProProcessApi } from '#/api/mes/pro/process';
import { computed, onMounted, ref, watch } from 'vue';
import { Select, Tag, Tooltip } from 'antdv-next';
import { Select, SelectOption, Tag, Tooltip } from 'antdv-next';
import { getProcessSimpleList } from '#/api/mes/pro/process';
@ -98,7 +98,7 @@ onMounted(async () => {
show-search
@change="handleChange"
>
<Select.Option
<SelectOption
v-for="item in allList"
:key="item.id"
:item="item"
@ -108,7 +108,7 @@ onMounted(async () => {
<span>{{ item.name }}</span>
<Tag v-if="item.code" color="default">{{ item.code }}</Tag>
</div>
</Select.Option>
</SelectOption>
</Select>
</Tooltip>
</template>