mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-07-06 23:45:07 +02:00
Init
This commit is contained in:
commit
6930e69b55
106 changed files with 26925 additions and 0 deletions
30
client/.nuxt/components/utils.js
Normal file
30
client/.nuxt/components/utils.js
Normal file
|
@ -0,0 +1,30 @@
|
|||
// nuxt/nuxt.js#8607
|
||||
export function wrapFunctional(options) {
|
||||
if (!options || !options.functional) {
|
||||
return options
|
||||
}
|
||||
|
||||
const propKeys = Array.isArray(options.props) ? options.props : Object.keys(options.props || {})
|
||||
|
||||
return {
|
||||
render(h) {
|
||||
const attrs = {}
|
||||
const props = {}
|
||||
|
||||
for (const key in this.$attrs) {
|
||||
if (propKeys.includes(key)) {
|
||||
props[key] = this.$attrs[key]
|
||||
} else {
|
||||
attrs[key] = this.$attrs[key]
|
||||
}
|
||||
}
|
||||
|
||||
return h(options, {
|
||||
on: this.$listeners,
|
||||
attrs,
|
||||
props,
|
||||
scopedSlots: this.$scopedSlots,
|
||||
}, this.$slots.default)
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue