Package Exports
- rotation-chart
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (rotation-chart) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
轮播图插件,可动态配置功能项:eg 左右按钮功能是否生效或显示、小圆点功能是否生效或显示
install:
npm install rotation-chart
import:
import { JJZSlider } from "rotation-chart";
or:
import {
JJZSlider,
pluginController, // 小圆点插件
pluginPrevious, // 上一张按钮插件
pluginNext, // 下一张按钮插件
} from "rotation-chart";
options:
JJZSlider(
{
container: 目标元素,
images: 图片集合,
style?: {width,height} 宽高,
cycle?: 时间,
}
)
usage:
<div class="slider"></div>;
const container = document.querySelector(".slider");
const slider = new JJZSlider({ container, images });
//registerPlugins 注册安装插件
//在不需要某个功能时无须注册
slider.registerPlugins(pluginController, pluginPrevious, pluginNext);