feat: init

This commit is contained in:
yanghao05
2025-04-16 21:07:57 +08:00
parent 85301c8994
commit 85ece3e899
7 changed files with 31 additions and 70 deletions

View File

@@ -1,35 +1,3 @@
<script setup>
// 不需要导入任何组件,路由会自动处理组件的加载
</script>
<template>
<router-view />
</template>
<style>
/* Reset default styles */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
background-color: #f5f5f5;
}
/* Mobile-first responsive design */
html {
font-size: 16px;
}
@media screen and (max-width: 768px) {
html {
font-size: 14px;
}
}
</style>
</template>

View File

@@ -1,22 +1,40 @@
import Aura from '@primeuix/themes/aura'
import { createPinia } from 'pinia'
import PrimeVue from 'primevue/config'
import { createApp } from 'vue'
import App from './App.vue'
import { router } from './router'
import Aura from '@primeuix/themes/aura';
import { createPinia } from 'pinia';
import PrimeVue from 'primevue/config';
import ConfirmationService from 'primevue/confirmationservice';
import ToastService from 'primevue/toastservice';
import { createApp } from 'vue';
import App from './App.vue';
import { router } from './router.js';
// Import only the required PrimeVue styles
import 'primeicons/primeicons.css'; // Icons
import './style.css'
import './style.css';
const app = createApp(App)
app.use(createPinia())
app.use(router)
const pinia = createPinia()
app.use(pinia);
app.use(router);
app.use(PrimeVue, {
theme: {
preset: Aura
preset: Aura,
},
ripple: true,
options: {
darkModeSelector: '.my-app-dark',
}
})
app.mount('#app')
// Register the ConfirmationService to fix the error
app.use(ConfirmationService);
// Register the ToastService
app.use(ToastService);
// Remove global component registrations
app.mount('#app');

View File

@@ -1,4 +1,3 @@
@import "tailwindcss";
@import "tailwindcss-primeui";

View File

@@ -1,14 +0,0 @@
/** @type {import('tailwindcss').Config} */
export default {
content: [
"./index.html",
"./src/**/*.{vue,js,ts,jsx,tsx}",
"./node_modules/primevue/**/*.{vue,js,ts,jsx,tsx}"
],
theme: {
extend: {},
},
plugins: [
require('tailwindcss-primeui')
],
}

View File

@@ -17,7 +17,7 @@ export default defineConfig({
port: 3000,
open: true,
proxy: {
'/v1': 'http://localhost:8088',
'/api': 'http://localhost:8088',
}
}
});