fix(vue): preserve custom classes on IonPage (#24776)

resolves #24772

Co-authored-by: bnachtweh <bnachtweh@users.noreply.github.com>
This commit is contained in:
Liam DeBeasi
2022-02-11 10:11:04 -05:00
committed by GitHub
parent abc36ae80b
commit b401de1ab3
2 changed files with 65 additions and 1 deletions

View File

@ -12,11 +12,12 @@ export const IonPage = /*@__PURE__*/ defineComponent({
setup(props, { attrs, slots }) {
const hidePageClass = (props.isInOutlet) ? 'ion-page-invisible' : '';
return () => {
const existingClasses = attrs.class ?? '';
return h(
'div',
{
['class']: `ion-page ${hidePageClass}`,
...attrs,
['class']: `ion-page ${hidePageClass} ${existingClasses}`,
ref: 'ionPage'
},
slots.default && slots.default()