fix(web-antdv-next): 统一 TextArea 和 InputPassword 引用方式

pull/359/head
XuZhiqiang 2026-06-06 12:46:01 +08:00
parent 2aa2c8676f
commit 5c9a163c46
17 changed files with 42 additions and 31 deletions

View File

@ -4,7 +4,7 @@ import { ref } from 'vue';
import { DICT_TYPE } from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { Form, Input, Select } from 'antdv-next';
import { Form, Input, Select, TextArea } from 'antdv-next';
type Rule = any;
const modelData = defineModel<any>(); //
@ -64,7 +64,7 @@ defineExpose({ validate });
</Select>
</FormItem>
<FormItem label="流程描述" name="description" class="mb-5">
<Input.TextArea v-model:value="modelData.description" allow-clear />
<TextArea v-model:value="modelData.description" allow-clear />
</FormItem>
</Form>
</template>

View File

@ -21,6 +21,7 @@ import {
Input,
Radio,
Select,
TextArea,
Tooltip,
} from 'antdv-next';
@ -295,7 +296,7 @@ defineExpose({ validate });
<ImageUpload v-model:value="modelData.icon" />
</FormItem>
<FormItem label="流程描述" name="description">
<Input.TextArea v-model:value="modelData.description" allow-clear />
<TextArea v-model:value="modelData.description" allow-clear />
</FormItem>
<FormItem label="流程类型" name="type">
<RadioGroup v-model:value="modelData.type">

View File

@ -20,6 +20,7 @@ import {
message,
Select,
Tag,
TextArea,
} from 'antdv-next';
import { getSimpleUserList } from '#/api/system/user';
@ -249,7 +250,7 @@ onMounted(async () => {
</SelectOption>
</Select>
<Input.TextArea
<TextArea
v-model:value="sendText"
:auto-size="{ minRows: 3, maxRows: 6 }"
:disabled="!getIsOpen"

View File

@ -7,7 +7,7 @@ import { h, ref } from 'vue';
import { Page } from '@vben/common-ui';
import { IconifyIcon } from '@vben/icons';
import { Button, Input, message, Modal, Popover } from 'antdv-next';
import { Button, message, Modal, Popover, TextArea } from 'antdv-next';
import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
import { getAlertRecordPage, processAlertRecord } from '#/api/iot/alert/record';
@ -37,7 +37,7 @@ function handleProcess(row: AlertRecordApi.AlertRecord) {
content: () =>
h('div', { class: 'space-y-2' }, [
h('p', '请输入处理原因:'),
h(Input.TextArea, {
h(TextArea, {
value: processRemark.value,
'onUpdate:value': (val: string) => (processRemark.value = val),
rows: 3,

View File

@ -5,7 +5,7 @@ import { IconifyIcon } from '@vben/icons';
import { isEmpty } from '@vben/utils';
import { useClipboard, useVModel } from '@vueuse/core';
import { Button, Form, FormItem, Input, message } from 'antdv-next';
import { Button, FormItem, Input, InputPassword, message } from 'antdv-next';
import { IotDataSinkTypeEnum } from '#/api/iot/rule/data/sink';
@ -91,7 +91,7 @@ onMounted(() => {
:rules="[{ required: true, message: '密码不能为空', trigger: 'blur' }]"
label="密码"
>
<Input.Password
<InputPassword
v-model:value="config.password"
placeholder="请输入数据库密码"
/>

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, SelectOption } from 'antdv-next';
import { FormItem, Input, Select, SelectOption, TextArea } from 'antdv-next';
import { IotDataSinkTypeEnum } from '#/api/iot/rule/data/sink';
@ -95,7 +95,7 @@ onMounted(() => {
<KeyValueEditor v-model="config.query" add-button-text="" />
</FormItem>
<FormItem label="请求体">
<Input.TextArea
<TextArea
v-model:value="config.body"
placeholder="请输入内容"
:rows="4"

View File

@ -4,7 +4,7 @@ import { onMounted } from 'vue';
import { isEmpty } from '@vben/utils';
import { useVModel } from '@vueuse/core';
import { FormItem, Input, Switch } from 'antdv-next';
import { FormItem, Input, InputPassword, Switch } from 'antdv-next';
import { IotDataSinkTypeEnum } from '#/api/iot/rule/data/sink';
@ -50,7 +50,7 @@ onMounted(() => {
:rules="[{ required: true, message: '密码不能为空', trigger: 'blur' }]"
label="密码"
>
<Input.Password v-model:value="config.password" placeholder="请输入密码" />
<InputPassword v-model:value="config.password" placeholder="请输入密码" />
</FormItem>
<FormItem :name="['config', 'ssl']" label="启用 SSL">
<Switch v-model:checked="config.ssl" />

View File

@ -4,7 +4,7 @@ import { onMounted } from 'vue';
import { isEmpty } from '@vben/utils';
import { useVModel } from '@vueuse/core';
import { FormItem, Input } from 'antdv-next';
import { FormItem, Input, InputPassword } from 'antdv-next';
import { IotDataSinkTypeEnum } from '#/api/iot/rule/data/sink';
@ -50,7 +50,7 @@ onMounted(() => {
:rules="[{ required: true, message: '密码不能为空', trigger: 'blur' }]"
label="密码"
>
<Input.Password v-model:value="config.password" placeholder="请输入密码" />
<InputPassword v-model:value="config.password" placeholder="请输入密码" />
</FormItem>
<FormItem
:name="['config', 'clientId']"

View File

@ -4,7 +4,7 @@ import { onMounted } from 'vue';
import { isEmpty } from '@vben/utils';
import { useVModel } from '@vueuse/core';
import { FormItem, Input, InputNumber } from 'antdv-next';
import { FormItem, Input, InputNumber, InputPassword } from 'antdv-next';
import { IotDataSinkTypeEnum } from '#/api/iot/rule/data/sink';
@ -82,7 +82,7 @@ onMounted(() => {
:rules="[{ required: true, message: '密码不能为空', trigger: 'blur' }]"
label="密码"
>
<Input.Password v-model:value="config.password" placeholder="请输入密码" />
<InputPassword v-model:value="config.password" placeholder="请输入密码" />
</FormItem>
<FormItem
:name="['config', 'exchange']"

View File

@ -4,7 +4,7 @@ import { onMounted } from 'vue';
import { isEmpty } from '@vben/utils';
import { useVModel } from '@vueuse/core';
import { FormItem, Input, InputNumber } from 'antdv-next';
import { FormItem, Input, InputNumber, InputPassword } from 'antdv-next';
import { IotDataSinkTypeEnum } from '#/api/iot/rule/data/sink';
@ -73,7 +73,7 @@ onMounted(() => {
:rules="[{ required: true, message: '密码不能为空', trigger: 'blur' }]"
label="密码"
>
<Input.Password v-model:value="config.password" placeholder="请输入密码" />
<InputPassword v-model:value="config.password" placeholder="请输入密码" />
</FormItem>
<FormItem
:name="['config', 'database']"

View File

@ -4,7 +4,7 @@ import { onMounted } from 'vue';
import { isEmpty } from '@vben/utils';
import { useVModel } from '@vueuse/core';
import { FormItem, Input } from 'antdv-next';
import { FormItem, Input, InputPassword } from 'antdv-next';
import { IotDataSinkTypeEnum } from '#/api/iot/rule/data/sink';
@ -57,7 +57,7 @@ onMounted(() => {
]"
label="SecretKey"
>
<Input.Password
<InputPassword
v-model:value="config.secretKey"
placeholder="请输入 SecretKey"
/>

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, SelectOption, Switch } from 'antdv-next';
import { FormItem, Input, InputNumber, Select, SelectOption, Switch, TextArea } from 'antdv-next';
import { IotDataSinkTypeEnum } from '#/api/iot/rule/data/sink';
@ -103,7 +103,7 @@ onMounted(() => {
/>
</FormItem>
<FormItem :name="['config', 'customHeaders']" label="自定义请求头">
<Input.TextArea
<TextArea
v-model:value="config.customHeaders"
placeholder="请输入自定义请求头JSON 格式)"
:rows="3"

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, RadioGroup, Select } from 'antdv-next';
import { Form, FormItem, Input, message, Radio, RadioGroup, Select, TextArea } from 'antdv-next';
import {
createDataSink,
@ -112,7 +112,7 @@ function handleTypeChange(type: number) {
<Input v-model:value="formData.name" placeholder="请输入目的名称" />
</FormItem>
<FormItem label="目的描述" name="description">
<Input.TextArea
<TextArea
v-model:value="formData.description"
placeholder="请输入目的描述"
:rows="3"

View File

@ -15,7 +15,7 @@ import { IconifyIcon } from '@vben/icons';
import { isEmptyVal } from '@vben/utils';
import { useVModel } from '@vueuse/core';
import { Button, Input, Popover, Tag } from 'antdv-next';
import { Button, Popover, Tag, TextArea } from 'antdv-next';
/** JSON参数输入组件 - 通用版本 */
defineOptions({ name: 'JsonParamsInput' });
@ -422,7 +422,7 @@ watch(
<div class="w-full space-y-3">
<!-- JSON 输入框 -->
<div class="relative">
<Input.TextArea
<TextArea
v-model:value="paramsJson"
:rows="4"
:placeholder="placeholder"

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, RadioGroup, Row } from 'antdv-next';
import { Card, Col, FormItem, Input, Radio, RadioGroup, Row, TextArea } from 'antdv-next';
import { DictTag } from '#/components/dict-tag';
@ -72,7 +72,7 @@ const formData = useVModel(props, 'modelValue', emit); // 表单数据
</Col>
</Row>
<FormItem label="场景描述" name="description">
<Input.TextArea
<TextArea
v-model:value="formData.description"
placeholder="请输入场景描述(可选)"
:rows="3"

View File

@ -17,7 +17,15 @@ import { getDictOptions } from '@vben/hooks';
import { $t } from '@vben/locales';
import { cloneDeep, isEmpty } from '@vben/utils';
import { Form, FormItem, Input, message, Radio, RadioButton, RadioGroup } from 'antdv-next';
import {
Form,
FormItem,
Input,
message,
RadioButton,
RadioGroup,
TextArea,
} from 'antdv-next';
import {
createThingModel,
@ -234,7 +242,7 @@ function removeDataSpecs(val: any) {
v-model="formData.event"
/>
<FormItem label="描述" name="description">
<Input.TextArea
<TextArea
v-model:value="formData.description"
:maxlength="200"
:rows="3"

View File

@ -14,6 +14,7 @@ import {
Input,
message,
Modal,
TextArea,
Upload,
} from 'antdv-next';
@ -149,7 +150,7 @@ const customRequest: UploadProps['customRequest'] = async function (options) {
/>
</FormItem>
<FormItem label="描述" name="introduction">
<Input.TextArea
<TextArea
v-model:value="uploadData.introduction"
:rows="3"
placeholder="介绍语将展示在相关播放页面,建议填写简洁明确、有信息量的内容"