Skip to content

Commit 07c3619

Browse files
authored
【docs】:Code example 'setup' is missing (#7153)
* flx * flx【docs】:Modify the official website code example, switch TS to JS, the top of the example should be '<script setup>'
1 parent 562623c commit 07c3619

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

plugin/md/markdownToVue.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ ${vueCode?.trim()}
8686
const scriptContent = fetchCode(vueCode, 'scriptContent');
8787
let jsCode = (await tsToJs(scriptContent))?.trim();
8888
jsCode = jsCode
89-
? `<script>
89+
? `<script setup>
9090
${jsCode}
9191
</script>`
9292
: '';
@@ -139,13 +139,13 @@ import ColorChunk from '@/components/ColorChunk';
139139
import TokenTable from '@/components/TokenTable';
140140
import ComponentTokenTable from '@/components/ComponentTokenTable';
141141
142-
export default {
142+
export default {
143143
components: {
144144
ColorChunk,
145-
TokenTable,
145+
TokenTable,
146146
ComponentTokenTable
147-
},
148-
pageData: ${JSON.stringify(pageData)}
147+
},
148+
pageData: ${JSON.stringify(pageData)}
149149
}
150150
</script>
151151
${fetchCode(content, 'style')}

0 commit comments

Comments
 (0)