4.0.1 • Published 4 years ago

plug-in-cll v4.0.1

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

plug-in-cll

This NPM package is a collection of plug-ins

functions

debounce

// debounce is debounce防抖方法

visibilitychangeEventAdd

// visibilitychangeEventAdd是添加监听窗口变化的事件

visibilitychangeEventRemove

// visibilitychangeEventRemove是删除监听窗口变化的事件

deepTraverse

// deepTraverse是对象深度遍历方法

// 传参(target:目标对象, key: 对象中值匹配的键, child: 对象中孩子匹配的键, value: 对象中值匹配的键比较的值, fn: 对相同值的项执行方法)

getLocalTime

// getLocalTime是获取当前本地时间的方法

onresize

// onresize是获取窗口大小变化时,关闭的方法

// 接收参数fn,当窗口变化的时候执行的方法

plugins

debounce-plug-in

// Introducing variable 'timer' and method 'debounce'

// fn is function, delay i delay

// debounce(fn, delay);

visibilitychangeEvent-plug-in

// onMounted, onUnmounted

// onMounted(() => {visibilitychangeEventAdd();});

// onUnmounted(() => {visibilitychangeEventRemove();});

deepTraverse-plug-in

// deepTraverse(target, key, child, value, fn)

// deepTraverseNew(target, fn, child )

components

buttonC

// 自定义按钮组件,有primary,warn,danger类型的按钮,还有disable控制点击样式