mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-27 18:30:35 +01:00
docs(ComponentCode): allow empty string in v-model
This commit is contained in:
@@ -101,7 +101,7 @@ const code = computed(() => {
|
|||||||
<template>
|
<template>
|
||||||
<${name}`
|
<${name}`
|
||||||
for (const [key, value] of Object.entries(componentProps)) {
|
for (const [key, value] of Object.entries(componentProps)) {
|
||||||
if (value === undefined || value === null || value === '' || props.hide?.includes(key)) {
|
if (value === undefined || value === null || props.hide?.includes(key)) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -110,6 +110,10 @@ const code = computed(() => {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (value === '') {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
const prop = meta?.meta?.props?.find((prop: any) => prop.name === key)
|
const prop = meta?.meta?.props?.find((prop: any) => prop.name === key)
|
||||||
const name = kebabCase(key)
|
const name = kebabCase(key)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user