Skip to content

Commit

Permalink
【docs】:Code example 'setup' is missing (#7153)
Browse files Browse the repository at this point in the history
* flx

* flx【docs】:Modify the official website code example, switch TS to JS, the top of the example should be '<script setup>'
  • Loading branch information
webvs2 authored Dec 18, 2023
1 parent 562623c commit 07c3619
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions plugin/md/markdownToVue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ ${vueCode?.trim()}
const scriptContent = fetchCode(vueCode, 'scriptContent');
let jsCode = (await tsToJs(scriptContent))?.trim();
jsCode = jsCode
? `<script>
? `<script setup>
${jsCode}
</script>`
: '';
Expand Down Expand Up @@ -139,13 +139,13 @@ import ColorChunk from '@/components/ColorChunk';
import TokenTable from '@/components/TokenTable';
import ComponentTokenTable from '@/components/ComponentTokenTable';
export default {
export default {
components: {
ColorChunk,
TokenTable,
TokenTable,
ComponentTokenTable
},
pageData: ${JSON.stringify(pageData)}
},
pageData: ${JSON.stringify(pageData)}
}
</script>
${fetchCode(content, 'style')}
Expand Down

0 comments on commit 07c3619

Please sign in to comment.