2.0.12 • Published 4 years ago

mask-guide v2.0.12

Weekly downloads
9
License
ISC
Repository
github
Last release
4 years ago

#介绍 功能遮罩引导

#使用

import {guide, close} from "mask-guide";

guide({
    el: "2",
    type: "step",
    position: "bottomRight",
    onClickNext: () => {
        console.log("点击了下一步");
        close();
    }
    explain: {
        title: "这是title",
        content: "这是内容这是内容这是内容这是内容这是内容这是内容"
    }
});
<script src="mode_moudules/mask-guide/dist/index.js"></script>
maskGuide.guide({
    el: "2",
    type: "step",
    position: "bottomRight",
    onClickNext: () => {
        console.log("点击了下一步");
        maskGuide.close();
    }
    explain: {
        title: "这是title",
        content: "这是内容这是内容这是内容这是内容这是内容这是内容"
    }
});

#效果

#API

参数说明类型默认值是否必填备注
el需要引导的元素id/Element
type引导类型Stringstep
classWarpString
position方向Stringbottomtop/left/right/bottom/topLeft/topRight/bottomLeft/bottomRight/leftTop/leftBottom/rightTop/rightBottom
targetPosition引导位置Object{top: 100, left: 100}
targetSize引导空白未知的大小Object{width: 100, height: 100}
onClickTarget点击target元素触发Function
onClickNext点击下一步触发Function
onClickPrev点击上一步触发Function
onClickClose关闭触发Function
nextBtnText下一步按钮文字String下一步
prevBtnText上一步按钮文字String上一步
showNext是否显示下一步按钮Booleantrue
showPrev是否显示上一步按钮Booleantrue
showClose是否显示关闭按钮Booleantrue
showArrow是否显示箭头Booleantrue
showStar是否显示星星Booleantrue只在active有效,step没有星星
maskClosable点击蒙层是否允许关闭Booleantrue
explain说明modalObject/Boolean{ width: 340 }false的时候不显示

explain

参数说明类型默认值是否必填备注
widthNumber{ width: 340 }
titleString/Element
contentString/Element

#升级日志

  • 增加点击点击蒙层是否允许关闭控制
2.0.13

4 years ago

2.0.11

4 years ago

2.0.12

4 years ago

2.0.10

4 years ago

2.0.9

4 years ago

2.0.8-test-2

4 years ago

2.0.8-test-1

4 years ago

2.0.8-beta-2

4 years ago

2.0.8-beta-1

4 years ago

2.0.7

4 years ago

2.0.8

4 years ago

2.0.6

4 years ago

2.0.5

4 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago