Files
lgp-admin-plus/playground/src/views/examples/doc-button.vue
2026-05-18 16:18:46 +08:00

23 lines
533 B
Vue
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<script lang="ts" setup>
import { VBEN_DOC_URL } from '@vben/constants';
import { openWindow } from '@vben/utils';
import { Button } from 'antdv-next';
const props = defineProps<{ path: string }>();
function handleClick() {
// 如果没有.html,打开页面时可能会出现404
const path =
VBEN_DOC_URL +
(props.path.toLowerCase().endsWith('.html')
? props.path
: `${props.path}.html`);
openWindow(path);
}
</script>
<template>
<Button @click="handleClick">查看组件文档</Button>
</template>