mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-02-06 07:03:51 +01:00
docs(ComponentCard): add code prop to key to prevent duplicates
This commit is contained in:
@@ -247,7 +247,7 @@ function renderObject (obj: any) {
|
|||||||
const shikiHighlighter = useShikiHighlighter({})
|
const shikiHighlighter = useShikiHighlighter({})
|
||||||
const codeHighlighter = async (code: string, lang: string, theme: any, highlights: number[]) => shikiHighlighter.getHighlightedAST(code, lang, theme, { highlights })
|
const codeHighlighter = async (code: string, lang: string, theme: any, highlights: number[]) => shikiHighlighter.getHighlightedAST(code, lang, theme, { highlights })
|
||||||
const { data: ast } = await useAsyncData(
|
const { data: ast } = await useAsyncData(
|
||||||
`${name}-ast-${JSON.stringify({ props: componentProps, slots: props.slots })}`,
|
`${name}-ast-${JSON.stringify({ props: componentProps, slots: props.slots, code: props.code })}`,
|
||||||
async () => {
|
async () => {
|
||||||
let formatted = ''
|
let formatted = ''
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user