From f8f4fe606308097a4d0f5c0db93d0dbedb802633 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A6=99=E7=A0=81=E7=94=9F=E8=8A=B1?= <18523774412@qq.com> Date: Wed, 15 Mar 2023 12:20:24 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=88=9B=E5=BB=BA=E8=A1=A8=E5=8D=95?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=9A=84=E7=BB=84=E4=BB=B6=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E8=BE=93=E5=85=A5=E6=A1=86=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/components/formItem/createData.vue | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/web/src/components/formItem/createData.vue b/web/src/components/formItem/createData.vue index b27480a8..25c27ba7 100644 --- a/web/src/components/formItem/createData.vue +++ b/web/src/components/formItem/createData.vue @@ -12,6 +12,7 @@ :placeholder="t('Please input field', { field: form.name.title })" :input-attr="{ onChange: updateValue, + ...props.options?.name?.inputAttr, }" prop="name" /> @@ -23,6 +24,7 @@ :placeholder="t('Please input field', { field: form.title.title })" :input-attr="{ onChange: updateValue, + ...props.options?.title?.inputAttr, }" prop="title" /> @@ -35,6 +37,7 @@ :placeholder="t('Please select field', { field: form.type.title })" :input-attr="{ onChange: updateValue, + ...props.options?.type?.inputAttr, }" prop="type" /> @@ -47,6 +50,7 @@ rows: 3, placeholder: t('utils.One line at a time, without quotation marks, for example: key1=value1'), onChange: updateValue, + ...props.options?.dict?.inputAttr, }" prop="dict" @keyup.enter.stop="" @@ -59,6 +63,7 @@ :placeholder="t('Please input field', { field: form.tip.title })" :input-attr="{ onChange: updateValue, + ...props.options?.tip?.inputAttr, }" prop="tip" /> @@ -71,6 +76,7 @@ :placeholder="t('Please select field', { field: form.rule.title })" :input-attr="{ onChange: updateValue, + ...props.options?.rule?.inputAttr, }" prop="rule" /> @@ -82,6 +88,7 @@ :input-attr="{ onChange: updateValue, placeholder: t('utils.One attribute per line without quotation marks(formitem)'), + ...props.options?.extend?.inputAttr, }" prop="extend" @keyup.enter.stop="" @@ -94,6 +101,7 @@ :input-attr="{ onChange: updateValue, placeholder: t('utils.Extended properties of Input, one line without quotation marks, such as: size=large'), + ...props.options?.inputExtend?.inputAttr, }" prop="inputExtend" @keyup.enter.stop="" @@ -106,6 +114,7 @@ import { reactive } from 'vue' import FormItem from '/@/components/formItem/index.vue' import { inputTypes } from '/@/components/baInput' import { validatorType } from '/@/utils/validate' +import { InputAttr } from '/@/components/baInput' import { i18n } from '/@/lang' const { t } = i18n.global @@ -115,6 +124,8 @@ type OptionItem = { show?: boolean // 被创建数据的标题(默认使用:props.dataTitle + 本 title,自定义此 title 后,单使用此 title) title?: string + // 输入框额外属性 + inputAttr?: InputAttr } type ValidatesOptionItem = Omit & {