Skip to content

Commit

Permalink
fix: use global naiveUI
Browse files Browse the repository at this point in the history
  • Loading branch information
ChronicStone committed Apr 24, 2024
1 parent 496d27b commit 991da03
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/.vitepress/theme/components/ExampleRenderer.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup lang="ts">
import { useData } from 'vitepress'
import { NCard, NConfigProvider, NScrollbar, NSplit, NTabPane, NTabs, darkTheme } from 'naive-ui'
import { darkTheme } from 'naive-ui'
import { nextTick, onMounted, ref, watch } from 'vue'
import { codeToHtml } from 'shiki'
import { transformerTwoslash } from '@shikijs/twoslash'
Expand All @@ -11,7 +11,7 @@ const { isDark } = useData()
const GITHUB_URL = 'https://github.com/ChronicStone/typed-xlsx/raw/main/examples/'
const iframeUrl = `https://view.officeapps.live.com/op/embed.aspx?src=${GITHUB_URL}${props.fileKey}.xlsx`
const splitRef = ref<InstanceType<typeof NSplit> | null>(null)
const splitRef = ref<any>(null)
const loading = ref(true)
const file = ref<string | null>(null)
Expand Down
2 changes: 2 additions & 0 deletions docs/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import TwoslashFloatingVue from '@shikijs/vitepress-twoslash/client'
import '@shikijs/vitepress-twoslash/style.css'
import type { EnhanceAppContext } from 'vitepress'
import './style.css'
import NaiveUi from 'naive-ui'

import vitepressNprogress from 'vitepress-plugin-nprogress'
import ExampleRenderer from './components/ExampleRenderer.vue'
Expand All @@ -17,6 +18,7 @@ export default {
DefaultTheme.enhanceApp?.(ctx)
vitepressNprogress(ctx)
ctx.app.component('ExampleRenderer', ExampleRenderer)
ctx.app.use(NaiveUi)
// ctx.app.component('Sandbox', Sandbox)
// ctx.app.component('CodeSandbox', CodeSandbox)
},
Expand Down

0 comments on commit 991da03

Please sign in to comment.