Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(comp:tour): supports outline and mask container (#1868)
- Loading branch information
Showing
14 changed files
with
335 additions
and
132 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
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,18 @@ | ||
--- | ||
order: 31 | ||
title: | ||
zh: 外边框 | ||
en: Outline | ||
--- | ||
|
||
## zh | ||
|
||
通过 `gap.outline` 和 `mask.outlineColor` 设置外边框。 | ||
|
||
外边框只能在有mask的时候显示 | ||
|
||
## en | ||
|
||
Customize outline via `gap.outline` and `mask.outlineColor`. | ||
|
||
Outline only works when mask is displayed. |
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,57 @@ | ||
<template> | ||
<div> | ||
<IxButton @click="beginTour">Begin</IxButton> | ||
<IxDivider /> | ||
<IxSpace> | ||
<div ref="firstBtnRef"> | ||
<IxButton>Step1</IxButton> | ||
</div> | ||
<div ref="secondBtnRef"> | ||
<IxButton>Step2</IxButton> | ||
</div> | ||
<div ref="thirdBtnRef"> | ||
<IxButton>Step3</IxButton> | ||
</div> | ||
</IxSpace> | ||
</div> | ||
<IxTour v-model:visible="tourVisible" :steps="steps" :gap="{ outline: 2 }"></IxTour> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import type { TourStep } from '@idux/components/tour' | ||
import { ref } from 'vue' | ||
const tourVisible = ref(false) | ||
const steps = ref<TourStep[]>([ | ||
{ | ||
title: 'Step1', | ||
description: 'this is description...', | ||
target: () => firstBtnRef.value, | ||
}, | ||
{ | ||
title: 'Step2', | ||
description: 'this is description...', | ||
target: () => secondBtnRef.value, | ||
}, | ||
{ | ||
title: 'Step3', | ||
description: 'this is description...', | ||
target: () => thirdBtnRef.value, | ||
}, | ||
]) | ||
const beginTour = () => { | ||
tourVisible.value = true | ||
} | ||
const firstBtnRef = ref<HTMLElement>() | ||
const secondBtnRef = ref<HTMLElement>() | ||
const thirdBtnRef = ref<HTMLElement>() | ||
</script> | ||
|
||
<style lang="less"> | ||
.demo-tour-custom-mask-cls { | ||
opacity: 0.4; | ||
} | ||
</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
Oops, something went wrong.