0
0
Fork 0

feat: improve qFormMixin in production environment

This commit is contained in:
Javier Segarra 2024-07-25 12:36:04 +02:00
parent aef83b7e9a
commit 60708f4a6c
1 changed files with 4 additions and 2 deletions

View File

@ -4,9 +4,11 @@ const filterAvailableInput = (element) => {
return element.classList.contains('q-field__native') && !element.disabled; return element.classList.contains('q-field__native') && !element.disabled;
}; };
const filterAvailableText = (element) => { const filterAvailableText = (element) => {
const parentComponent = element.__vueParentComponent;
if (!parentComponent) return element.attributes.component.nodeValue !== 'input';
return ( return (
element.__vueParentComponent.type.name === 'QInput' && parentComponent?.type.name === 'QInput' &&
element.__vueParentComponent?.attrs?.class !== 'vn-input-date' parentComponent?.attrs?.class !== 'vn-input-date'
); );
}; };