Fixed #4219 - Password: add "@change" event
parent
5782793740
commit
880c9ce6c3
|
@ -174,11 +174,26 @@ const PasswordSlots = [
|
|||
}
|
||||
];
|
||||
|
||||
const PasswordEmits = [
|
||||
{
|
||||
name: 'change',
|
||||
description: 'Callback to invoke on value change.',
|
||||
arguments: [
|
||||
{
|
||||
name: 'event',
|
||||
type: 'object',
|
||||
description: 'Browser event'
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
module.exports = {
|
||||
password: {
|
||||
name: 'Password',
|
||||
description: 'Password displays strength indicator for password fields.',
|
||||
props: PasswordProps,
|
||||
slots: PasswordSlots
|
||||
slots: PasswordSlots,
|
||||
events: PasswordEmits
|
||||
}
|
||||
};
|
||||
|
|
|
@ -290,6 +290,11 @@ export interface PasswordEmits {
|
|||
* @param {string} value - New value.
|
||||
*/
|
||||
'update:modelValue'(value: string): void;
|
||||
/**
|
||||
* Callback to invoke on value change.
|
||||
* @param {Event} event - Browser event.
|
||||
*/
|
||||
change(event: Event): void;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -129,6 +129,7 @@ export default {
|
|||
},
|
||||
onInput(event) {
|
||||
this.$emit('update:modelValue', event.target.value);
|
||||
this.$emit('change', event);
|
||||
},
|
||||
onFocus(event) {
|
||||
this.focused = true;
|
||||
|
|
Loading…
Reference in New Issue