Closed benweidig closed 2 months ago
Thank you for mentioning this. This is because currently, we can't find a way to detect whether the layout component receives a frontmatter property. As a workaround, all frontmatters excluding the known ones and frontmatter
for the frontmatter object are passed to props. If the layout component doesn't have the corresponding props, these "extra" props will become DOM attributes.
Ref: #1303 #1312
That's how Vue works - do you have any runtime problems because of that? Otherwise I'd say just ignore it, it doesn't matter after all
It doesn't cause me any runtime problems. So far, it's smooth sailing and the best and easiest-to-use slide tool for my purposes!
Just noticed the [object Object]
, and without any Vue knowledge, it looked like an oversight/possible issue.
However, I somehow missed the referenced issue/PR, even though I searched before creating this one...
Thank you for explaining it to me, as I didn't get far looking at constants.ts
and InjectionKey
myself.
Describe the bug
Each
div.slidev-layout
has an attributefrontmatter
that's always[object Object]
Minimal reproduction
Steps to reproduce the behavior:
npm init slidev@latest
Environment