File tree 2 files changed +16
-10
lines changed
2 files changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -329,8 +329,6 @@ export default create({
329
329
value = value .slice (0 , Number (props .maxLength ));
330
330
}
331
331
updateValue (value );
332
- emit (' update:modelValue' , value , event );
333
- emit (' change' , value , event );
334
332
};
335
333
336
334
const updateValue = (value : string , trigger : import (' ./type' ).InputFormatTrigger = ' onChange' ) => {
@@ -428,16 +426,20 @@ export default create({
428
426
watch (
429
427
() => props .modelValue ,
430
428
() => {
431
- updateValue (getModelValue ());
432
- resetValidation ();
429
+ if (! slots .input ) {
430
+ updateValue (getModelValue ());
431
+ resetValidation ();
432
+ }
433
433
}
434
434
);
435
435
436
436
onMounted (() => {
437
- if (props .autofocus ) {
438
- inputRef .value .focus ();
437
+ if (! slots .input ) {
438
+ if (props .autofocus ) {
439
+ inputRef .value .focus ();
440
+ }
441
+ updateValue (getModelValue (), props .formatTrigger );
439
442
}
440
- updateValue (getModelValue (), props .formatTrigger );
441
443
});
442
444
443
445
return {
Original file line number Diff line number Diff line change @@ -425,13 +425,17 @@ export default create({
425
425
watch (
426
426
() => props .modelValue ,
427
427
() => {
428
- updateValue (getModelValue ());
429
- resetValidation ();
428
+ if (! slots .input ) {
429
+ updateValue (getModelValue ());
430
+ resetValidation ();
431
+ }
430
432
}
431
433
);
432
434
433
435
onMounted (() => {
434
- updateValue (getModelValue (), props .formatTrigger );
436
+ if (! slots .input ) {
437
+ updateValue (getModelValue (), props .formatTrigger );
438
+ }
435
439
});
436
440
437
441
return {
You can’t perform that action at this time.
0 commit comments