timepack-plugin

1.1.0 • Public • Published

Introduction

The package is using for timepack front-end buisness.

Install

npm install business-plugin -S
or cnpm i business-plugin -S

组件API

AlbumCanvas

相簿图片自动合成,拖拽,旋转,删除核心模块

render(photo,layout,temp)

init()

初始化相簿数据

compatable()

跨设备分享,数据兼容处理

getter()

  • template(index):模板图片
  • photo(pageIndex,imageIndex):
  • radio(index):获取容器的长宽比
  • rest():获取整页剩余的未填充数量
  • pageRest(index):获取指定页数空区域的数量(即未填充的数量)

setter()

  • editPageStyle(pageIndex,imageIndex,editWidth,editable):单页容器模板样式
  • photoStyle(pageIndex,imageIndex):单页图片样式
  • groupImage($list): 用jquery对象列表批量填充图片
  • listImage(list):用图片数据列表填充图片
  • fillImageByPage($list,page):根据页数填充图片
  • indexImage($list, page, index):单页内根据下标填充图片

operate()

  • exchange(pageIndex,lastIndex,currentIndex):更换图片间顺序
  • rotate(pageIndex,imageIndex):顺时针旋转图片90度
  • zoomImage(pageIndex,index,type):放大或缩小图片,type-1放大,type-2缩小
  • convert($list):图片jquery对象转换为可用的数据结构
  • changeLayout(index):修改容器模板

delete()

  • deleteImageByIndex(pageIndex,imageIndex):删除指定页内指定图片

event

  • touchstart(e,target):
  • touchmove(e, startPosition, position, target):
  • touchend(e, page, index, position, target):

Readme

Keywords

Package Sidebar

Install

npm i timepack-plugin

Weekly Downloads

9

Version

1.1.0

License

MIT

Last publish

Collaborators

  • millzhang