diff --git a/docs/components/content/ComponentCard.vue b/docs/components/content/ComponentCard.vue index 753ac4d2..618be0b2 100644 --- a/docs/components/content/ComponentCard.vue +++ b/docs/components/content/ComponentCard.vue @@ -110,6 +110,10 @@ const props = defineProps({ componentClass: { type: String, default: '' + }, + ignoreVModel: { + type: Boolean, + default: false } }) @@ -218,6 +222,9 @@ const code = computed(() => { if (value === 'undefined' || value === null) { continue } + if (key === 'modelValue' && props.ignoreVModel) { + continue + } code += ` ${(typeof value === 'boolean' && (value !== true || key === 'modelValue')) || typeof value === 'object' || typeof value === 'number' ? ':' : ''}${key === 'modelValue' ? 'model-value' : kebabCase(key)}${typeof value === 'boolean' && !!value && key !== 'modelValue' ? '' : `="${typeof value === 'object' ? renderObject(value) : value}"`}` }