feat(前端): 实现用户登录、注册和搜索功能
- 新增登录和注册页面组件 - 实现用户登录、注册和登出逻辑 - 添加笔记搜索功能 - 更新主页组件,支持用户状态显示和搜索 - 引入 Pinia 状态管理库
This commit is contained in:
@@ -3,6 +3,8 @@ import App from './App.vue'
|
||||
import router from './router/'
|
||||
import ElementPlus from 'element-plus'
|
||||
import 'element-plus/dist/index.css'
|
||||
import { createPinia } from 'pinia'
|
||||
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
|
||||
|
||||
// 1. 导入编辑器和预览组件
|
||||
import VMdEditor from '@kangc/v-md-editor'
|
||||
@@ -24,6 +26,8 @@ import '@kangc/v-md-editor/lib/plugins/copy-code/copy-code.css'
|
||||
import hljs from 'highlight.js'
|
||||
|
||||
const app = createApp(App)
|
||||
const pinia = createPinia()
|
||||
pinia.use(piniaPluginPersistedstate)
|
||||
|
||||
// 6. 配置编辑器
|
||||
VMdEditor.use(githubTheme, {
|
||||
@@ -46,5 +50,6 @@ app.use(VMdPreview)
|
||||
// 10. 使用Element Plus和路由
|
||||
app.use(ElementPlus)
|
||||
app.use(router)
|
||||
app.use(pinia)
|
||||
|
||||
app.mount('#app')
|
||||
Reference in New Issue
Block a user