Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
sandros94 committed Feb 16, 2025
1 parent 84c122c commit 667b6ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/app/components/content/ComponentCode.vue
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,9 @@ ${props.slots?.default}
for (const [i, key] of props.external.entries()) {
const cast = props.cast?.[key]
const value = cast ? castMap[cast]!.template(componentProps[key]) : json5.stringify(componentProps[key], null, 2)?.replace(/,([ |\t\n]+[}|\]])/g, '$1')
const type = props.externalTypes?.[i] ? `: ${props.externalTypes[i]}` : ''
const type = props.externalTypes?.[i] ? `<${props.externalTypes[i]}>` : ''

code += `const ${key === 'modelValue' ? 'value' : key}${type} = ref(${value})
code += `const ${key === 'modelValue' ? 'value' : key} = ref${type}(${value})
`
}
code += `<\/script>
Expand Down

0 comments on commit 667b6ce

Please sign in to comment.