Skip to content

Commit

Permalink
feat:优化代码
Browse files Browse the repository at this point in the history
  • Loading branch information
gzydong committed Dec 12, 2023
1 parent 4179e67 commit eef29b8
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 30 deletions.
2 changes: 1 addition & 1 deletion src/directive/loading.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</div>
</template>

<style scoped lang="less">
<style lang="less" scoped>
.loading-content {
width: 100%;
height: 100%;
Expand Down
7 changes: 7 additions & 0 deletions src/plugins/highlight.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import hljsVuePlugin from '@highlightjs/vue-plugin'
import 'highlight.js/styles/github.css'
import 'highlight.js/lib/common'
import hljs from 'highlight.js/lib/core'
import php from 'highlight.js/lib/languages/php'
import c from 'highlight.js/lib/languages/c'
Expand Down Expand Up @@ -34,3 +37,7 @@ hljs.registerLanguage('protobuf', protobuf)
hljs.registerLanguage('shell', shell)
hljs.registerLanguage('ini', ini)
hljs.registerLanguage('makefile', makefile)

export function setHljsVuePlugin(app) {
app.use(hljsVuePlugin)
}
8 changes: 0 additions & 8 deletions src/plugins/hljs.js

This file was deleted.

1 change: 0 additions & 1 deletion src/plugins/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export * from './highlight'
export * from './hljs'
export * from './component'
export * from './md-editor'
export * from './naive-ui'
Expand Down
27 changes: 8 additions & 19 deletions src/store/index.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,8 @@
import { useUserStore } from '@/store/modules/user'
import { useSettingsStore } from '@/store/modules/settings'
import { useTalkStore } from '@/store/modules/talk'
import { useEditorStore } from '@/store/modules/editor'
import { useDialogueStore } from '@/store/modules/dialogue'
import { useEditorDraftStore } from '@/store/modules/editor-draft'
import { useUploadsStore } from '@/store/modules/uploads'
import { useNoteStore } from '@/store/modules/note'

export {
useUserStore,
useSettingsStore,
useEditorStore,
useDialogueStore,
useEditorDraftStore,
useUploadsStore,
useTalkStore,
useNoteStore
}
export { useUserStore } from '@/store/modules/user'
export { useSettingsStore } from '@/store/modules/settings'
export { useTalkStore } from '@/store/modules/talk'
export { useEditorStore } from '@/store/modules/editor'
export { useDialogueStore } from '@/store/modules/dialogue'
export { useEditorDraftStore } from '@/store/modules/editor-draft'
export { useUploadsStore } from '@/store/modules/uploads'
export { useNoteStore } from '@/store/modules/note'
2 changes: 1 addition & 1 deletion src/views/note/index.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script setup>
<script lang="ts" setup>
import { computed } from 'vue'
import NoteMenu from './inner/NoteMenu.vue'
import NoteList from './inner/NoteList.vue'
Expand Down

0 comments on commit eef29b8

Please sign in to comment.