ETour 漫游引导
示例与代码
定位、遮罩和目标点击
漫游引导
属性
closeOnPressEscapebool是否允许按 Escape 关闭。
trueclosePolicyenum弹层自动关闭的触发条件,可组合多个条件。
Popup.*(可用 | 组合)
NoAutoClose
CloseOnPressOutside
CloseOnPressOutsideParent
CloseOnReleaseOutside
CloseOnReleaseOutsideParent
CloseOnEscape
closeOnPressEscape ? Popup.CloseOnEscape : Popup.NoAutoClosecurrentStepint当前引导步骤的索引,从 0 开始。
0descriptionDelegateComponent自定义说明文字的 Component 插槽;null 使用默认内容。 委托上下文见本页示例。
nullenabledbool是否允许交互;false 时控件禁用。
truefocusbool是否请求弹层焦点。
truegapvar水印间距数组或引导高亮边距配置。
字段:
offset, radius
({ offset: 6, radius: 4 })headerDelegateComponent自定义头部内容或表头的 Component 插槽;null 使用默认内容。 委托上下文见本页示例。
nullheightreal组件尺寸,单位为像素;可绑定父布局尺寸。
动态绑定indicatorsDelegateComponent自定义引导步骤指示器的 Component 插槽;null 使用默认内容。 委托上下文见本页示例。
nullmaskbool是否显示遮罩;滚动条还支持边缘渐隐遮罩配置。
truemaskColorcolor遮罩颜色。
动态绑定modalbool使用模态弹层,阻止对下层内容的交互。
!targetAreaClickableplacementstring引导卡片相对于目标的位置。
"top" / "top-start""top-end" / "bottom""bottom-start" / "bottom-end""left" / "left-start""left-end" / "right""right-start" / "right-end"
"bottom"scrollIntoViewbool开始步骤时滚动目标使其可见。
truescrollIntoViewOptionsvar滚动定位配置,可设置 behavior、block、inline。
字段:
block, inline
({block: "center", inline: "nearest"})showArrowbool是否显示弹层或引导箭头。
trueshowClosebool是否显示关闭或删除按钮。
truestepsvar引导步骤的数据数组。
字段:
target, title, description
placement, type, mask
headerDelegate, descriptionDelegate, nextButtonProps
prevButtonProps, scrollIntoViewOptions
[]targetAreaClickablebool允许点击引导高亮区域中的目标。
falsetypestring引导卡片的视觉样式。
"default" / "primary"
"default"visiblebool是否显示组件。
truewidthreal组件尺寸,单位为像素;可绑定父布局尺寸。
动态绑定cardPositionpoint只读引导说明卡片计算后的坐标。
字段:x, y
由运行时计算effectiveMaskbool只读引导当前步骤实际采用的遮罩开关。
由运行时计算effectivePlacementstring只读引导卡片相对于目标的位置。
"top" / "top-start""top-end" / "bottom""bottom-start" / "bottom-end""left" / "left-start""left-end" / "right""right-start" / "right-end"
由运行时计算effectiveScrollOptionsvar只读当前引导步骤使用的滚动配置。
字段:
block, inline
由运行时计算effectiveTypestring只读当前引导步骤使用的视觉样式。
"default" / "primary"
由运行时计算finalStepbool只读当前是否为引导最后一步。
由运行时计算gapOffsetreal只读引导高亮与目标之间的实际边距。
由运行时计算gapRadiusreal只读引导高亮区域的圆角半径。
由运行时计算highlightrect只读引导目标的高亮区域几何。
字段:x, y, width, height
由运行时计算nextButtonPropsvar只读当前引导步骤的下一步或上一步按钮配置。
字段:
text, visible, disabled
size, styleType
由运行时计算previousButtonPropsvar只读当前引导步骤的下一步或上一步按钮配置。
字段:
text, visible, disabled
size, styleType
由运行时计算stepvar只读增量步长;滑块可覆盖 stepSize,时间下拉使用分钟数或 HH:mm。
由运行时计算stepCountint只读引导总步骤数。
由运行时计算targetItem只读滚动、定位或加载遮罩所作用的目标对象。
由运行时计算targetPositionpoint只读固钉或引导目标计算后的坐标和尺寸。
字段:x, y
由运行时计算信号
finished()引导结束时触发。
changed(int index)引导步骤变化时触发,index 为当前步骤索引。
方法
previous()切换到上一项或上一步。
start()从第一步开始引导。
next()切换到下一项或下一步。
goTo(index)跳转到 index 指定的引导步骤。