feat(hooks): Add useIntro hook

feat: Add guide demo
This commit is contained in:
陈凯龙
2022-01-25 17:43:53 +08:00
parent cb558f8af9
commit 0832194e61
15 changed files with 235 additions and 50 deletions

20
src/views/Guide/Guide.vue Normal file
View File

@@ -0,0 +1,20 @@
<script setup lang="ts">
import { ContentWrap } from '@/components/ContentWrap'
import { useI18n } from '@/hooks/web/useI18n'
import { useIntro } from '@/hooks/web/useIntro'
import { ElButton } from 'element-plus'
const { t } = useI18n()
const { introRef } = useIntro()
const guideStart = () => {
introRef.start()
}
</script>
<template>
<ContentWrap :title="t('guideDemo.guide')" :message="t('guideDemo.message')">
<ElButton type="primary" @click="guideStart">{{ t('guideDemo.start') }}</ElButton>
</ContentWrap>
</template>