1.0.0 • Published 4 years ago

cy-mathjs v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

cy-element

一些常用的组件,使用react hooks编写

install

npm install cy-element 或者 cnpm install cy-element

css3 flex 布局组件

import { view } from 'cy-element'

example

组件View布局示例

property api

propertydefaulttypevaluesdescription
rowtruebooleantrue or false水平居中
columnfalsebooleantrue or false垂直居中
wrapfalsebooleantrue or false换行
flexfalsebooleantrue or false填满剩余空间
aroundfalsebooleantrue or false平均分布
justContentstartstringstart, center, end水平位置
alignItemstopstringtop, middle, bottom垂直位置
linenullstringtop, left, right, bottom0.5像素细线主要用于移动端
import { EventEmitter } from 'cy-element'
propertydefaulttypedescription
emitvoidFunction发布事件
listenerEmitvoidFunction订阅事件
removeListenersvoidFunction移除订阅的事件
EventEmitter.listenerEmit(type, func) 订阅事件
EventEmitter.emit(type, args) 发布事件
EventEmitter.removeListeners(type, func) 移除事件

pc图片预览组件,以横屏或竖屏为基准进行等比缩放,大图预览,支持数组或对象数组'.png'{url: '.png'},是对象数组的时候可以设置title,显示的标题,不设置则为图片索引加图片数目为图片标题

propertydefaulttypevaluesdescription
visiblefalsebooleantrue or false打开、关闭
dataemptyarrayarray图片数组

example

图片预览示例