Skip to content

Commit cc801d9

Browse files
author
城西
committed
doc: SDK 类库API 文档更新
1 parent c5e20a5 commit cc801d9

File tree

131 files changed

+32548
-608
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+32548
-608
lines changed

Doc/LuaViewSDK/Alert.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
--- Alert
22
-- 弹出系统自带的提示框
3-
-- @classmod Alert
3+
-- @classmodOther Alert
44

55

66
--- 弹出一个提示框

Doc/LuaViewSDK/Animate.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--- 动画API
2-
-- @classmod Animate
2+
-- @classmodAnimation Animate
33

44

55
--- 通过这个方法 设置动画的时间,延时,最终状态,结束回调

Doc/LuaViewSDK/AudioPlayer.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
--- AudioPlayer
22
-- 声音播放器
3-
-- @classmod AudioPlayer
3+
-- @classmodAudio AudioPlayer
44

55
--- 创建声音播放器
66
-- @string url 声音资源(支持本地文件和网络资源)

Doc/LuaViewSDK/Button.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
--- Button
22
-- 按钮控件
33
--
4-
-- Button的父类是[View](View.html)
5-
-- @classmod Button
4+
-- Button的父类是[View](./../ui容器/View.html)
5+
-- @classmodUIItem Button
66

77

88
--- 通过这个方法可以创建一个Button对象

Doc/LuaViewSDK/CollectionView.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
-- 类似于Cell大小任意的TableView
33
--
44
-- CollectionView的父类是[VScrollView](./VScrollView.html)
5-
-- @classmod CollectionView
5+
-- @classmodUIView CollectionView
66

77

88
--- 通过这个方法创建一个CollectionView对象

Doc/LuaViewSDK/CustomPanel.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
-- native可定制
33
--
44
-- CustomPanel的父类是[View](View.html)
5-
-- @classmod CustomPanel
5+
-- @classmodUIView CustomPanel
66

77

88

Doc/LuaViewSDK/HScrollView.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
-- 水平滚动的View
33
--
44
-- HScrollView的父类是[View](./View.html)
5-
-- @classmod HScrollView
5+
-- @classmodUIView HScrollView
66

77

88
--- 通过这个方法创建一个HScrollView对象

Doc/LuaViewSDK/Http.lua

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
----
2+
-- Http请求接口
3+
-- @classmodNet Http
4+
5+
6+
--- 创建Http对象
7+
-- @table params Http请求参数
8+
-- @tparam function callback
9+
-- @usage
10+
-- function ajax(params0, callback)
11+
-- local url = params0.url;
12+
-- local data = params0.data;
13+
-- local params = nil;
14+
-- for key, value in pairs(data) do
15+
-- if (params) then
16+
-- params = params .. "&" .. key .. "=" .. tostring(value);
17+
-- else
18+
-- params = "" .. key .. "=" .. tostring(value);
19+
-- end
20+
-- end
21+
-- params = encodeURI(params)
22+
-- url = urlAddHttp(url);
23+
-- url = url .. "?" .. params;
24+
-- print("ajax: ", url);
25+
-- local http = Http();
26+
-- http.get(url,
27+
-- function(response)
28+
-- local str = tostring(response.data());
29+
-- local object = Json.toTable(str);
30+
-- if (callback) then
31+
-- callback(object);
32+
-- end
33+
-- end)
34+
-- end
35+
--
36+
function Http()
37+
end
38+
39+
40+
--- 发起请求
41+
function get()
42+
end
43+
--- 发起请求
44+
function post()
45+
end
46+
47+
--- 取消mtop请求
48+
function cancel()
49+
end
50+
51+
52+
--- 获取得到的数据
53+
function data()
54+
end
55+
56+
--- 获取得到的头信息
57+
function header()
58+
end
59+
--- 获取Http返回码
60+
function code()
61+
end
62+

Doc/LuaViewSDK/Image.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
--- Image
22
-- 放图片的View
33
--
4-
-- Image的父类是[View](./View.html)
5-
-- @classmod Image
4+
-- Image的父类是[View](./../ui容器/View.html)
5+
-- @classmodUIItem Image
66

77

88
--- summary.

Doc/LuaViewSDK/Label.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---- Label
22
-- 放文本的View, 类似安卓的TextView
33
--
4-
-- Label的父类是[View](./View.html)
5-
-- @classmod Label
4+
-- Label的父类是[View](./../ui容器/View.html)
5+
-- @classmodUIItem Label
66

77
--- 通过这个全局静态函数 构建一个新的Label对象
88
-- @treturn Label label

0 commit comments

Comments
 (0)