diff --git a/components/doc/codeeditor/templates.js b/components/doc/codeeditor/templates.js index d5be51108..f3564da0f 100644 --- a/components/doc/codeeditor/templates.js +++ b/components/doc/codeeditor/templates.js @@ -15,7 +15,11 @@ const core_dependencies = { '@vitejs/plugin-vue': '^4.0.0', vite: '^4.0.0', primevue: PrimeVue.version || 'latest', - primeicons: app_dependencies['primeicons'] || 'latest' + primeicons: app_dependencies['primeicons'] || 'latest', + tailwindcss: app_dependencies['tailwindcss'] || 'latest', + autoprefixer: app_dependencies['autoprefixer'] || 'latest', + postcss: app_dependencies['postcss'] || 'latest', + 'tailwindcss-primeui': app_dependencies['tailwindcss-primeui'] || 'latest' }; // create-vue -> https://github.com/vuejs/create-vue @@ -29,6 +33,7 @@ const getVueApp = (props = {}, sourceType) => { const sourceFileName = `${path}${mainFileName}${fileExtension}`; let element = '', imports = '', + themeSwitchCode = '', routeFiles = {}; sources.routeFiles && @@ -45,6 +50,13 @@ const getVueApp = (props = {}, sourceType) => { `; } + // App.vue + themeSwitchCode = ''.concat( + `