EasyGuide 人员文档

一个简单,便捷,可维护的用户指导。

 

Why?

我想很多时候你可能都不需要 EasyGuide.js。 因为市场上已经有很好用用户指导的组件了,比如:intro.js,而且它足够优秀!

但是为什么我还要写这个组件库? 这是当你尝试了市场上的其他用户指导的组件以后,你会发现有一种试用场景:在不能更改需要指导的对象代码的前提下,它们没有办法实现。我写这个框架的目的也是基于这个初衷! 没错,EasyGuide.js 不会入侵需要指导对象的目标代码。 基于这个特性,对于我们嵌入不属于我们自己的页面,或者需要有大量的代码需要更改,还需要做引导的时候有着非常重要的意义!

How?

EasyGuide 设计理念:指导页面逻辑无关,根据用户的屏幕,页面定位,完成指导功能。 因为跟页面没有逻辑关系,因此,EasyGuide 有两种模式:管理员模式 用户模式

 

Live DEMO

线上 demo: http://www.abners.cn/easy-guide

 

Getting started

首先 npm 安装:

然后 import 引入和初始化指导:

 

Config

EasyGuide 配置:

参数说明类型默认值
guideList指导数据列表array<guideItem>[]
mode指导当前所处的模式'READ' | 'MAINTAIN''READ'
currentIndex查看模式下,当前指导对应的数组下标number0
beforeCreate指导创建前(必须自己实现function(guideInstance, guideItem)null
beforeNext下一步function(oldIndex, newIndex, guideList)null
afterNext下一步function(oldIndex, newIndex, guideList)null
beforePrev上一步function(oldIndex, newIndex, guideList)null
afterPrev上一步function(oldIndex, newIndex, guideList)null
guildClose指导关闭function(currentIndex, guideItem, guideList)null
onGuideListChange指导数据变化function(action, guideItem, guideList)null

 

Api

 

Example

 

Changelog

License

EasyGuide is available under the MIT license.