Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "fl-popup", | ||
"version": "1.0.1", | ||
"description": "原生js移动端提示弹框", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "dev" | ||
}, | ||
"author": "FlownChao", | ||
"license": "ISC" | ||
"name": "fl-popup", | ||
"version": "1.0.2", | ||
"description": "原生js移动端提示弹框", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "dev" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/FlownChao/fl-popup" | ||
}, | ||
"author": "FlownChao", | ||
"license": "ISC" | ||
} |
@@ -1,8 +0,88 @@ | ||
# fl-popup | ||
移动端弹框 | ||
# fl-popup 移动端弹框 | ||
## Install | ||
* npm | ||
> npm install fl-popup -D | ||
* yarn | ||
> yarn fl-popup -D | ||
- - - - - - - - | ||
## start | ||
import $popup from 'fl-popup' | ||
$popup.toast(data) | ||
toast | ||
alert | ||
comfirm | ||
### toast (data) | ||
data: | ||
类型: `object`或者 `string` 或者 `html片段` | ||
字段: | ||
content | ||
类型:string或者HTML片段 | ||
必填: ❎ | ||
说明:如果data传入object类型则必须传入content字段 | ||
### alert(data) | ||
data: | ||
类型: `object` | ||
字段: | ||
title | ||
类型:string或者HTML片段 | ||
必填: ❎ | ||
说明:弹框标题 | ||
content | ||
类型:string或者HTML片段 | ||
必填: ✅ | ||
说明:弹框内容 | ||
button | ||
类型:string或者HTML片段 | ||
必填: ✅ | ||
说明:弹框按钮内容 | ||
callback | ||
类型:function | ||
必填: ✅ | ||
说明:按钮点击消失后回调 | ||
### comfirm(data) | ||
data: | ||
类型: `object` | ||
字段: | ||
title | ||
类型:string或者HTML片段 | ||
必填: ❎ | ||
说明:弹框标题 | ||
content | ||
类型:string或者HTML片段 | ||
必填: ✅ | ||
说明:弹框内容 | ||
button | ||
类型:length为2的Array,[String,String] | ||
必填: ✅ | ||
说明:弹框按钮内容 如['确定','取消'] | ||
callback | ||
类型:length为2的Array,[Function,Function] | ||
必填: ✅ | ||
说明:按钮点击消失后回调,如[()=>{},()=>{}] | ||
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
6146
89
0