mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-04 12:17:37 +08:00
33 lines
848 B
Vue
33 lines
848 B
Vue
<script lang="ts" setup>
|
|
import { ref } from 'vue'
|
|
import { useData } from 'vitepress'
|
|
import { insertLinkIcon, insertTableWrapper } from '../utils'
|
|
import VPPageFooter from './doc-content/vp-page-footer.vue'
|
|
import VPPageNav from './doc-content/vp-page-nav.vue'
|
|
import VPTableOfContent from './doc-content/vp-table-of-content.vue'
|
|
|
|
const { page } = useData()
|
|
const content = ref<{ $el: HTMLElement }>()
|
|
|
|
function updateDom() {
|
|
insertLinkIcon(content)
|
|
insertTableWrapper(content)
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<div class="doc-content-wrapper">
|
|
<div class="doc-content-container">
|
|
<Content
|
|
ref="content"
|
|
class="doc-content"
|
|
@vnode-mounted="updateDom"
|
|
@vnode-updated="updateDom"
|
|
/>
|
|
<VPPageFooter />
|
|
<VPPageNav />
|
|
</div>
|
|
<VPTableOfContent v-if="page.headers" />
|
|
</div>
|
|
</template>
|