Files
certd/packages/ui/certd-client/src/components/tutorial/index.vue
T

35 lines
908 B
Vue
Raw Normal View History

2024-09-29 00:38:17 +08:00
<script setup lang="ts">
import { ref } from "vue";
import TutorialSteps from "/@/components/tutorial/tutorial-steps.vue";
2024-10-11 03:23:03 +08:00
import { useSettingStore } from "/@/store/modules/settings";
2024-09-29 00:38:17 +08:00
const openedRef = ref(false);
function open() {
openedRef.value = true;
}
2024-10-31 10:32:05 +08:00
const slots = defineSlots();
2024-09-29 00:38:17 +08:00
</script>
<template>
2024-10-31 10:32:05 +08:00
<div class="tutorial-button pointer" @click="open">
<template v-if="!slots.default">
<fs-icon icon="ant-design:question-circle-outlined"></fs-icon>
2025-03-07 18:01:51 +08:00
<div class="hidden md:block ml-0.5">使用教程</div>
2024-10-31 10:32:05 +08:00
</template>
<slot></slot>
2024-09-29 00:38:17 +08:00
<a-modal v-model:open="openedRef" class="tutorial-modal" width="90%">
<template #title> 使用教程 </template>
<tutorial-steps v-if="openedRef" />
<template #footer></template>
</a-modal>
</div>
</template>
<style lang="less">
.tutorial-modal {
2024-09-29 14:57:20 +08:00
top: 50px;
2024-09-29 00:38:17 +08:00
.ant-modal-body {
2024-09-29 14:57:20 +08:00
height: 80vh;
2024-09-29 00:38:17 +08:00
}
}
</style>