zup-plaform-base
v0.0.7
Published
ZUP系统管理平台
Downloads
5
Maintainers
Readme
zup系统管理平台
内置依赖:pinia、piniaPluginPersistedstate、antd、router、less、
快速开始
1. 安装
npm install zup-plaform-base
2. 引用组件库
// 全局引用
import { createApp } from 'vue'
import App from './App.vue'
import { createPinia } from 'pinia'
import Antd from 'ant-design-vue';
import router from 'zup-plaform-base/src/router/index';
import 'zup-plaform-base/src/css/base/main.less'
import 'ant-design-vue/dist/antd.variable.less'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
const app = createApp(App);
const pinia = createPinia();
pinia.use(piniaPluginPersistedstate);
app.use(pinia)
app.use(router)
app.use(Antd)
app.mount('#app')
3. 配置
配置css预处理器 vite.config.ts
import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
export default defineConfig({
plugins: [vue()],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
},
css: {
// css预处理器
preprocessorOptions: {
less: {
javascriptEnabled: true,
charset: false,
modifyVars: {
"border-radius-base": "8px",
},
},
},
},
})