mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-28 02:40:35 +01:00
docs: fix boolean toggle with default true
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<UCard v-if="component" class="relative flex flex-col" body-class="px-4 py-5 sm:p-6 relative" footer-class="px-4 py-4 sm:px-6 flex-1 lg:overflow-y-auto" style="max-height: calc(100vh - 10rem);">
|
<UCard v-if="component" class="relative flex flex-col" body-class="px-4 py-5 sm:p-6 relative" footer-class="px-4 py-4 sm:px-6 flex-1 lg:overflow-y-auto" style="max-height: calc(100vh - 10rem);">
|
||||||
<div class="flex justify-center sticky top-0">
|
<div class="flex justify-center">
|
||||||
<component :is="is" v-bind="boundProps" />
|
<component :is="is" v-bind="boundProps" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -79,9 +79,7 @@ const refProps = Object.entries(componentProps).map(([key, prop]) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (value) {
|
if (value) {
|
||||||
if (type === 'Boolean') {
|
if (type === 'String') {
|
||||||
value = value === 'true'
|
|
||||||
} else if (type === 'String') {
|
|
||||||
value = value.replace(/^'(.*)'$/, '$1')
|
value = value.replace(/^'(.*)'$/, '$1')
|
||||||
} else if (type === 'Array') {
|
} else if (type === 'Array') {
|
||||||
value = JSON.stringify(value)
|
value = JSON.stringify(value)
|
||||||
|
|||||||
Reference in New Issue
Block a user