feat(docs): vite-press new component (#10346)

* Add a new component for prompting typing.
This commit is contained in:
Jeremy 2022-11-01 18:09:19 +08:00 committed by GitHub
parent 44b04fcf49
commit 3c9eac12dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 29 additions and 0 deletions

View File

@ -0,0 +1,26 @@
<script setup lang="ts">
import { Warning } from '@element-plus/icons-vue'
defineProps({
type: String,
details: String,
})
</script>
<template>
<span class="flex items-center">
<span class="api-typing">
{{ type }}
</span>
<el-tooltip effect="light" trigger="click">
<el-button text :icon="Warning" class="p-2 text-5" />
<template #content>
<div class="m-1">
<code>
{{ details }}
</code>
</div>
</template>
</el-tooltip>
</span>
</template>

View File

@ -15,6 +15,7 @@ import 'uno.css'
import VPApp from './components/vp-app.vue' import VPApp from './components/vp-app.vue'
import VPDemo from './components/vp-demo.vue' import VPDemo from './components/vp-demo.vue'
import ApiTyping from './components/globals/vp-api-typing.vue'
import IconList from './components/globals/icons.vue' import IconList from './components/globals/icons.vue'
import type { Component } from 'vue' import type { Component } from 'vue'
@ -25,4 +26,5 @@ export default VPApp
export const globals: [string, Component][] = [ export const globals: [string, Component][] = [
['Demo', VPDemo], ['Demo', VPDemo],
['IconList', IconList], ['IconList', IconList],
['ApiTyping', ApiTyping],
] ]

View File

@ -59,6 +59,7 @@ declare module '@vue/runtime-core' {
ToggleSidebarBtn: typeof import('./.vitepress/vitepress/components/subnav/toggle-sidebar-btn.vue')['default'] ToggleSidebarBtn: typeof import('./.vitepress/vitepress/components/subnav/toggle-sidebar-btn.vue')['default']
TopNavigationExample: typeof import('./.vitepress/vitepress/components/nav/top-navigation-example.vue')['default'] TopNavigationExample: typeof import('./.vitepress/vitepress/components/nav/top-navigation-example.vue')['default']
VersionTag: typeof import('./.vitepress/vitepress/components/dev/VersionTag.vue')['default'] VersionTag: typeof import('./.vitepress/vitepress/components/dev/VersionTag.vue')['default']
VpApiTyping: typeof import('./.vitepress/vitepress/components/globals/vp-api-typing.vue')['default']
VpApp: typeof import('./.vitepress/vitepress/components/vp-app.vue')['default'] VpApp: typeof import('./.vitepress/vitepress/components/vp-app.vue')['default']
VpChangelog: typeof import('./.vitepress/vitepress/components/globals/vp-changelog.vue')['default'] VpChangelog: typeof import('./.vitepress/vitepress/components/globals/vp-changelog.vue')['default']
VpContent: typeof import('./.vitepress/vitepress/components/vp-content.vue')['default'] VpContent: typeof import('./.vitepress/vitepress/components/vp-content.vue')['default']