From 3d659f7670f385e434edd066a136d749dcb06e1d Mon Sep 17 00:00:00 2001 From: bobi Date: Tue, 29 Oct 2019 15:23:49 +0800 Subject: [PATCH] add:okLayer.html --- data/navs.json | 8 ++- pages/help/okLayer.html | 131 ++++++++++++++++++++++++++++++++++++++++ pages/help/okUtils.html | 2 +- 3 files changed, 139 insertions(+), 2 deletions(-) create mode 100644 pages/help/okLayer.html 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 + + + + + +
+ +
+

询问框

+
+
+ okLayer.confirm(content, yesFunction) +
+
+okLayer.confirm("确定要删除吗?", function () {
+	// 请求后台api
+})
+        
+ + + + + + + + + + + + + + + + + + + + + + + + + +
参数类型描述
contentString内容
yesFunctionString回调函数
+ + +
+

弹窗

+
+
+ okLayer.open(title, content, width, height, successFunction, endFunction) +
+
+okLayer.open("编辑用户", "user-edit.html", "90%", "90%", function (layero) {
+	// 打开弹窗后的操作
+}, function () {
+	// 关闭弹窗后的操作
+})
+		
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
参数类型描述
titleString标题
contentString内容
widthString弹窗宽度
heightString弹窗高度
successFunctionFunction打开弹窗后执行函数
endFunctionFunction关闭弹窗后执行函数
+
+ + + + diff --git a/pages/help/okUtils.html b/pages/help/okUtils.html index f96725b..34eea22 100644 --- a/pages/help/okUtils.html +++ b/pages/help/okUtils.html @@ -13,10 +13,10 @@
+

异步请求封装

-
okUtils.ajax(url, type, params, load)