mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-31 12:17:54 +01:00
docs(ComponentCard): wrap code in <template>
This commit is contained in:
@@ -217,6 +217,7 @@ const propsToSelect = computed(() => Object.keys(componentProps).map((key) => {
|
|||||||
// eslint-disable-next-line vue/no-dupe-keys
|
// eslint-disable-next-line vue/no-dupe-keys
|
||||||
const code = computed(() => {
|
const code = computed(() => {
|
||||||
let code = `\`\`\`html
|
let code = `\`\`\`html
|
||||||
|
<template>
|
||||||
<${name}`
|
<${name}`
|
||||||
for (const [key, value] of Object.entries(fullProps.value)) {
|
for (const [key, value] of Object.entries(fullProps.value)) {
|
||||||
if (value === 'undefined' || value === null) {
|
if (value === 'undefined' || value === null) {
|
||||||
@@ -246,7 +247,7 @@ const code = computed(() => {
|
|||||||
} else {
|
} else {
|
||||||
code += ' />'
|
code += ' />'
|
||||||
}
|
}
|
||||||
code += `
|
code += `\n</template>
|
||||||
\`\`\`
|
\`\`\`
|
||||||
`
|
`
|
||||||
return code
|
return code
|
||||||
|
|||||||
Reference in New Issue
Block a user