Refactor #4953 - For Password
parent
dcf57813fe
commit
2b1b235f5e
|
@ -67,6 +67,7 @@ export default {
|
|||
emits: ['update:modelValue', 'change', 'focus', 'blur', 'invalid'],
|
||||
data() {
|
||||
return {
|
||||
id: this.$attrs.id,
|
||||
overlayVisible: false,
|
||||
meter: null,
|
||||
infoText: null,
|
||||
|
@ -74,12 +75,18 @@ export default {
|
|||
unmasked: false
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
'$attrs.id': function (newValue) {
|
||||
this.id = newValue || UniqueComponentId();
|
||||
}
|
||||
},
|
||||
mediumCheckRegExp: null,
|
||||
strongCheckRegExp: null,
|
||||
resizeListener: null,
|
||||
scrollHandler: null,
|
||||
overlay: null,
|
||||
mounted() {
|
||||
this.id = this.id || UniqueComponentId();
|
||||
this.infoText = this.promptText;
|
||||
this.mediumCheckRegExp = new RegExp(this.mediumRegex);
|
||||
this.strongCheckRegExp = new RegExp(this.strongRegex);
|
||||
|
@ -291,7 +298,7 @@ export default {
|
|||
return this.promptLabel || this.$primevue.config.locale.passwordPrompt;
|
||||
},
|
||||
panelUniqueId() {
|
||||
return UniqueComponentId() + '_panel';
|
||||
return this.id + '_panel';
|
||||
}
|
||||
},
|
||||
components: {
|
||||
|
|
Loading…
Reference in New Issue