feat: 添加sass样式

This commit is contained in:
2026-06-01 11:11:54 +08:00
parent 9b5879c658
commit 0ba412b194
10 changed files with 252 additions and 18 deletions

View File

@@ -1,7 +1,10 @@
<script setup lang="ts">
import HelloWorld from './components/HelloWorld.vue'
</script>
<template>
<HelloWorld />
<n-config-provider :locale="zhCN" :date-locale="dateZhCN">
<div class="bg" />
</n-config-provider>
</template>
<script setup lang="ts">
import { zhCN, dateZhCN } from "naive-ui";
</script>
<style scoped lang="scss"></style>

View File

@@ -0,0 +1,7 @@
import { create, NButton, NConfigProvider } from "naive-ui";
const useNaiveUi = create({
components: [NButton, NConfigProvider]
});
export default useNaiveUi;

View File

@@ -0,0 +1,5 @@
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

View File

@@ -0,0 +1,2 @@
/** 全局样式 */
@use "@/common/style/global.scss";

View File

@@ -0,0 +1 @@
$bgColor: #ff0000;

View File

@@ -1,5 +1,7 @@
import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
import { createApp } from "vue";
import "@/common/style/index.scss";
import App from "./App.vue";
import useNaiveUi from "./common/naiveUI/useNaiveUi.ts";
createApp(App).mount('#app')
const app = createApp(App);
app.use(useNaiveUi).mount("#app");