Wed May 24 04:10:00 UTC 2023 inscode

上级 a5450115
...@@ -12,6 +12,9 @@ ...@@ -12,6 +12,9 @@
}, },
"devDependencies": { "devDependencies": {
"@vitejs/plugin-vue": "^3.0.1", "@vitejs/plugin-vue": "^3.0.1",
"sass": "^1.62.1",
"sass-loader": "^13.3.0",
"typescript": "^5.0.4",
"vite": "^3.0.1" "vite": "^3.0.1"
} }
} }
<script setup> <script setup lang="ts">
import HelloWorld from './components/HelloWorld.vue' import HelloWorld from './components/HelloWorld.vue';
import TheWelcome from './components/TheWelcome.vue' import TheWelcome from './components/TheWelcome.vue';
</script> </script>
<template> <template>
...@@ -17,9 +17,10 @@ import TheWelcome from './components/TheWelcome.vue' ...@@ -17,9 +17,10 @@ import TheWelcome from './components/TheWelcome.vue'
</main> </main>
</template> </template>
<style scoped> <style scoped lang="scss">
header { header {
line-height: 1.5; line-height: 1.5;
background-color: $primary-color;
} }
.logo { .logo {
......
<script setup> <script lang="ts" setup>
defineProps({ defineProps({
msg: { msg: {
type: String, type: String,
......
<script setup> <script setup lang="ts">
import WelcomeItem from './WelcomeItem.vue' import WelcomeItem from './WelcomeItem.vue'
import DocumentationIcon from './icons/IconDocumentation.vue' import DocumentationIcon from './icons/IconDocumentation.vue'
import ToolingIcon from './icons/IconTooling.vue' import ToolingIcon from './icons/IconTooling.vue'
......
$primary-color:red;
\ No newline at end of file
{
"compilerOptions": {
"target": "es5",
"module": "es6",
"strict": true,
"esModuleInterop": true,
"moduleResolution": "node",
"sourceMap": true
},
"exclude": [
"node_modules"
]
}
...@@ -6,5 +6,13 @@ export default defineConfig({ ...@@ -6,5 +6,13 @@ export default defineConfig({
server: { server: {
host: true host: true
}, },
plugins: [vue()] plugins: [vue()],
css:{
preprocessorOptions:{
scss:{
// 在此处添加全局变量
additionalData: `@import "./src/styles/variables.scss";`
}
}
}
}) })
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册