docs: update

This commit is contained in:
Benjamin Canac
2021-12-14 17:54:07 +01:00
parent 175b8c9dba
commit a1faf2b24f
2 changed files with 4 additions and 3 deletions

View File

@@ -184,7 +184,7 @@ const defaultProps = {
Notification: { Notification: {
id: '1', id: '1',
title: 'Notification title', title: 'Notification title',
callback: 'alert(\'Timer expired\')' callback: 'console.log(\'Timer expired\')'
}, },
Modal: { Modal: {
modelValue: modal, modelValue: modal,
@@ -228,7 +228,7 @@ const { props: componentProps } = await component.__asyncLoader()
const refProps = Object.entries(componentProps).map(([key, prop]) => { const refProps = Object.entries(componentProps).map(([key, prop]) => {
const defaultValue = componentDefaultProps[key] const defaultValue = componentDefaultProps[key]
const propDefault = (typeof prop.default === 'function' ? prop.default() : prop.default) const propDefault = (typeof prop.default === 'function' ? prop.default() : prop.default)
let value = defaultValue || propDefault let value = defaultValue !== undefined ? defaultValue : propDefault
let type = prop.type let type = prop.type
if (Array.isArray(type)) { if (Array.isArray(type)) {
type = type[0].name type = type[0].name

View File

@@ -186,7 +186,8 @@ const components = [
{ {
label: 'Notification', label: 'Notification',
to: '/components/Notification', to: '/components/Notification',
nuxt3: true nuxt3: true,
capi: true
}, },
{ {
label: 'Notifications', label: 'Notifications',