diff --git a/packages/opendesign/src/_components/in-input/InInput.vue b/packages/opendesign/src/_components/in-input/InInput.vue index 3362b6c2c1e7808d5047cd829207619c7e774f82..43a2b146f83443bc71c1be90ab9a349da2d56065 100644 --- a/packages/opendesign/src/_components/in-input/InInput.vue +++ b/packages/opendesign/src/_components/in-input/InInput.vue @@ -1,35 +1,29 @@ @@ -27,13 +49,35 @@ const validate = (value: string): boolean => {

Basic

value: {{ inputVal }}
- +
+ defaultValue: {{ inputVal }}; format +
+
+ max: {{ maxLength }}; min: {{ minLength }} input-on-outlimit: false + { @focus="() => printEvent('focus')" @press-enter="() => printEvent('press-enter')" clearable - :max-length="8" - :min-length="4" + :max-length="maxLength" + :min-length="minLength" :input-on-outlimit="false" />
- auto width: + auto width; max: 8;
diff --git a/packages/opendesign/src/_components/in-input/types.ts b/packages/opendesign/src/_components/in-input/types.ts index f04cd651a1ae832e8aaf0389fcf7982249c681a9..f4068687b5a9afcb8bfdd155988909dbf103d6d9 100644 --- a/packages/opendesign/src/_components/in-input/types.ts +++ b/packages/opendesign/src/_components/in-input/types.ts @@ -3,7 +3,7 @@ import { ExtractPropTypes, PropType } from 'vue'; export const inInputProps = { /** * 下拉框的值 - * v-model + * v-model 受控 */ modelValue: { type: String, @@ -90,10 +90,10 @@ export const inInputProps = { type: Function as PropType<(value: string) => boolean>, }, /** - * 输入为无效值时,在blur时的回调,返回值为纠正后的值 + * 输入为无效值时,在blur/pressEnter时的回调,返回值为纠正后的值 */ onInvalidChange: { - type: Function as PropType<(inputValue: string, lastValidInputValue: string, lastValue: string) => string>, + type: Function as PropType<(inputValue: string, lastValidInputValue: string) => string>, }, /** * 显示密码的方式 @@ -109,10 +109,11 @@ export const inInputProps = { type: Boolean, }, /** - * 针对输入内容进行处理,返回值作为输入最终值 + * 密码单个字符占位符 */ - beforeInput: { - type: Function as PropType<(value: string) => string>, + passwordPlaceholder: { + type: String, + default: '\u2022', }, }; diff --git a/packages/opendesign/src/_components/in-textarea/InTextarea.vue b/packages/opendesign/src/_components/in-textarea/InTextarea.vue index a0ccfedd009d60bbdec062058d1f97e241f9fa0d..c41afd71b69adc54969038ac0c5d97154527138e 100644 --- a/packages/opendesign/src/_components/in-textarea/InTextarea.vue +++ b/packages/opendesign/src/_components/in-textarea/InTextarea.vue @@ -1,10 +1,8 @@