diff --git a/data/navs.json b/data/navs.json index 7c3665c..e477a27 100644 --- a/data/navs.json +++ b/data/navs.json @@ -388,7 +388,13 @@ "href": "pages/help/okUtils.html", "icon": "", "spread": false - } + }, + { + "title": "okLayer", + "href": "pages/help/okLayer.html", + "icon": "", + "spread": false + } ] }, { diff --git a/pages/help/okLayer.html b/pages/help/okLayer.html new file mode 100644 index 0000000..51acbb0 --- /dev/null +++ b/pages/help/okLayer.html @@ -0,0 +1,131 @@ + + +
+ +++询问框
+
+ okLayer.confirm(content, yesFunction) ++
+okLayer.confirm("确定要删除吗?", function () {
+ // 请求后台api
+})
+
+ | 参数 | +类型 | +描述 | +
|---|---|---|
| content | +String | +内容 | +
| yesFunction | +String | +回调函数 | +
++弹窗
+
+ okLayer.open(title, content, width, height, successFunction, endFunction) ++
+okLayer.open("编辑用户", "user-edit.html", "90%", "90%", function (layero) {
+ // 打开弹窗后的操作
+}, function () {
+ // 关闭弹窗后的操作
+})
+
+ | 参数 | +类型 | +描述 | +
|---|---|---|
| title | +String | +标题 | +
| content | +String | +内容 | +
| width | +String | +弹窗宽度 | +
| height | +String | +弹窗高度 | +
| successFunction | +Function | +打开弹窗后执行函数 | +
| endFunction | +Function | +关闭弹窗后执行函数 | +
-异步请求封装
okUtils.ajax(url, type, params, load)