JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 24
  • Score
    100M100P100Q42279F

Package Exports

  • lm-mask

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 (lm-mask) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

mask

介绍

mask蒙层

安装

lm-* 组件使用 npm 进行管理,命名空间统一为 lm-,请使用以下命令进行组件安装。

npm i lm-mask --save
  • 如果你还没有安装 npm,可通过以下方式进行 安装
  • 安装cnpm npm install -g cnpm --registry=https://registry.npm.taobao.org

使用

样例文档

  • 待开发

使用

最少配置参数为:

  • 传入内容
  • 配置visible和opacity属性
<Mask 
    visible={ this.state.visible }
    opacity={3}
    onMaskClick={()=>this.setState({visible: false})}
>
    <div>This is content</div>
</Mask>

配置参数

Prop Type Default Description
visible bool undefined 是否可见
opacity number undefined 透明度 0-10
onMaskClick function undefined 点击回调
time number undefined 定时时间
timeCallback function undefined 定时回调
target DOM node undefined 目标插入参数
alwaysAppend bool undefined 是否每次更新都始终执行 append
className string undefined 外层容器 class 名

注意事项

  • mask外层包裹了lm-protal组件,默认append到body中。
  • 可传入protal的参数,见配置参数后三属性

开发调试

进入项目目录后,使用 node 命令启动服务

npm run start

打包发布可通过 node 命令执行

npm run build
npm publish

相关资料

Changelog

0.1.0

  1. init