mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-12-01 19:48:38 +08:00
【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>'
This commit is contained in:
parent
562623c091
commit
07c36192b8
@ -86,7 +86,7 @@ ${vueCode?.trim()}
|
||||
const scriptContent = fetchCode(vueCode, 'scriptContent');
|
||||
let jsCode = (await tsToJs(scriptContent))?.trim();
|
||||
jsCode = jsCode
|
||||
? `<script>
|
||||
? `<script setup>
|
||||
${jsCode}
|
||||
</script>`
|
||||
: '';
|
||||
@ -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')}
|
||||
|
Loading…
Reference in New Issue
Block a user