Files
ruoyi-plus-vben5/playground/src/views/examples/doc-button.vue

23 lines
537 B
Vue
Raw Normal View History

<script lang="ts" setup>
import { VBEN_DOC_URL } from '@vben/constants';
import { openWindow } from '@vben/utils';
import { Button } from 'ant-design-vue';
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>