移除 vue-office 示例

This commit is contained in:
Hooray
2025-04-28 17:32:51 +08:00
parent 5dbedd24ae
commit 5ad061008b
7 changed files with 0 additions and 81 deletions
-10
View File
@@ -148,16 +148,6 @@ const routes: RouteRecordRaw = {
icon: 'i-mdi:table-large',
},
},
// TODO: 临时禁用 https://github.com/501351981/vue-office/issues/438
// {
// path: 'file-preview',
// name: 'pluginExampleFilePreview',
// component: () => import('@/views/plugin_example/file-preview.vue'),
// meta: {
// title: '文件预览',
// icon: 'i-mdi:file-eye-outline',
// },
// },
{
path: 'cropper',
name: 'pluginExampleCropper',
-52
View File
@@ -1,52 +0,0 @@
<route lang="yaml">
meta:
enabled: false
</route>
<script setup lang="ts">
import VueOfficeDocx from '@vue-office/docx'
import VueOfficeExcel from '@vue-office/excel'
import VueOfficePdf from '@vue-office/pdf'
import Alert from './components/alert.vue'
import Command from './components/command.vue'
import '@vue-office/docx/lib/index.css'
import '@vue-office/excel/lib/index.css'
const docx = new URL('./files/test.docx', import.meta.url).href
const excel = new URL('./files/test.xlsx', import.meta.url).href
const pdf = new URL('./files/test.pdf', import.meta.url).href
function open(url: string) {
window.open(url, '_blank')
}
</script>
<template>
<div>
<Alert />
<FaPageHeader title="文件预览">
<template #description>
<div class="space-y-2">
<p>支持docx、xlsx、pdf文件预览。</p>
<p>
安装命令:
<Command text="pnpm add @vue-office/docx @vue-office/excel @vue-office/pdf" />
</p>
</div>
</template>
<FaButton variant="outline" @click="open('https://github.com/501351981/vue-office')">
<FaIcon name="i-ep:link" />
访问 vue-office
</FaButton>
</FaPageHeader>
<FaPageMain title="docx文件预览">
<VueOfficeDocx :src="docx" style="height: 500px;" />
</FaPageMain>
<FaPageMain title="excel文件预览">
<VueOfficeExcel :src="excel" style="height: 500px;" />
</FaPageMain>
<FaPageMain title="pdf文件预览">
<VueOfficePdf :src="pdf" style="height: 500px;" />
</FaPageMain>
</div>
</template>
Binary file not shown.
Binary file not shown.
Binary file not shown.