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