refactor: #7090 for Password
parent
2f27d08642
commit
78e1d46340
|
@ -70,7 +70,7 @@
|
||||||
<script>
|
<script>
|
||||||
import { absolutePosition, addStyle, getOuterWidth, isTouchDevice, relativePosition } from '@primeuix/utils/dom';
|
import { absolutePosition, addStyle, getOuterWidth, isTouchDevice, relativePosition } from '@primeuix/utils/dom';
|
||||||
import { ZIndex } from '@primeuix/utils/zindex';
|
import { ZIndex } from '@primeuix/utils/zindex';
|
||||||
import { ConnectedOverlayScrollHandler, UniqueComponentId } from '@primevue/core/utils';
|
import { ConnectedOverlayScrollHandler } from '@primevue/core/utils';
|
||||||
import EyeIcon from '@primevue/icons/eye';
|
import EyeIcon from '@primevue/icons/eye';
|
||||||
import EyeSlashIcon from '@primevue/icons/eyeslash';
|
import EyeSlashIcon from '@primevue/icons/eyeslash';
|
||||||
import InputText from 'primevue/inputtext';
|
import InputText from 'primevue/inputtext';
|
||||||
|
@ -88,7 +88,6 @@ export default {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
id: this.$attrs.id,
|
|
||||||
overlayVisible: false,
|
overlayVisible: false,
|
||||||
meter: null,
|
meter: null,
|
||||||
infoText: null,
|
infoText: null,
|
||||||
|
@ -96,18 +95,12 @@ 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);
|
||||||
|
@ -321,7 +314,7 @@ export default {
|
||||||
return this.promptLabel || this.$primevue.config.locale.passwordPrompt;
|
return this.promptLabel || this.$primevue.config.locale.passwordPrompt;
|
||||||
},
|
},
|
||||||
overlayUniqueId() {
|
overlayUniqueId() {
|
||||||
return this.id + '_overlay';
|
return this.$id + '_overlay';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
|
|
Loading…
Reference in New Issue