Skip to content

快速开始

安装Vue3piniaElement Plus

具体参考各自官网。

安装Grove UI

bash
git clone https://git.himeeter.com/glass/grove-ui.git
cd grove-ui
npm install
sh bin/build.sh

安装Reed UI

bash
git clone https://git.himeeter.com/glass/reed-ui.git
cd reed-ui
npm install
sh bin/build.sh

引入Reed UI

bash
npm install ../reed-ui

初始化Reed UI

typescript
import { createApp } from 'vue'
import { createPinia } from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import 'element-plus/theme-chalk/dark/css-vars.css'
import { init } from 'reed-ui'
import 'reed-ui/dist/index.css'
import './assets/main.css'

import App from './App.vue'
import router from './router'

const app = createApp(App)

const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)
app.use(pinia)
app.use(ElementPlus)

init(app, pinia, 'reed api地址,如:http://localhost:8080', 'reed api token')

app.use(router)

app.mount('#app')

reed api参数详见Reed API

使用examples

bash
sh bin/examples.sh

运行成功后可以访问http://localhost:5173查看示例。