-
Notifications
You must be signed in to change notification settings - Fork 656
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
15 changed files
with
235 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import ContentWrap from './src/ContentWrap.vue' | ||
|
||
export { ContentWrap } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<script setup lang="ts"> | ||
import { ElCard, ElTooltip } from 'element-plus' | ||
import { propTypes } from '@/utils/propTypes' | ||
import { useDesign } from '@/hooks/web/useDesign' | ||
const { getPrefixCls } = useDesign() | ||
const prefixCls = getPrefixCls('content-wrap') | ||
defineProps({ | ||
title: propTypes.string.def(''), | ||
message: propTypes.string.def('') | ||
}) | ||
</script> | ||
|
||
<template> | ||
<ElCard :class="prefixCls" shadow="never"> | ||
<template v-if="title" #header> | ||
<div class="flex items-center"> | ||
{{ title }} | ||
<ElTooltip v-if="message" effect="dark" placement="right"> | ||
<template #content> | ||
<div class="max-w-200px">{{ message }}</div> | ||
</template> | ||
<Icon class="ml-5px" icon="bi:question-circle-fill" :size="14" /> | ||
</ElTooltip> | ||
</div> | ||
</template> | ||
<div> | ||
<slot></slot> | ||
</div> | ||
</ElCard> | ||
</template> | ||
|
||
<style lang="less" scoped></style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import introJs from 'intro.js' | ||
import { IntroJs, Step, Options } from 'intro.js' | ||
import 'intro.js/introjs.css' | ||
import { useI18n } from '@/hooks/web/useI18n' | ||
import { useDesign } from '@/hooks/web/useDesign' | ||
|
||
export const useIntro = (setps?: Step[], options?: Options) => { | ||
const { t } = useI18n() | ||
|
||
const { variables } = useDesign() | ||
|
||
const defaultSetps: Step[] = setps || [ | ||
{ | ||
element: `#${variables.namespace}-menu`, | ||
title: t('common.menu'), | ||
intro: t('common.menuDes'), | ||
position: 'right' | ||
}, | ||
{ | ||
element: `#${variables.namespace}-tags-view`, | ||
title: t('common.tagsView'), | ||
intro: t('common.tagsViewDes'), | ||
position: 'bottom' | ||
} | ||
] | ||
|
||
const defaultOptions: Options = options || { | ||
prevLabel: t('common.prevLabel'), | ||
nextLabel: t('common.nextLabel'), | ||
skipLabel: t('common.skipLabel'), | ||
doneLabel: t('common.doneLabel') | ||
} | ||
|
||
const introRef: IntroJs = introJs() | ||
|
||
introRef.addSteps(defaultSetps).setOptions(defaultOptions) | ||
|
||
return { | ||
introRef | ||
} | ||
} |
Oops, something went wrong.