@fonixtree/magic-design 2.0.95 → 2.0.97
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/common/LinkModal/MiniAppApi/const.js +637 -0
- package/es/common/LinkModal/MiniAppApi/index.js +61 -0
- package/es/common/LinkModal/index.js +6 -0
- package/es/constants/index.js +2 -1
- package/es/utils/businessUtil.js +12 -0
- package/lib/common/LinkModal/MiniAppApi/const.js +637 -0
- package/lib/common/LinkModal/MiniAppApi/index.js +61 -0
- package/lib/common/LinkModal/index.js +6 -0
- package/lib/constants/index.js +2 -1
- package/lib/utils/businessUtil.js +12 -0
- package/package.json +1 -1
- package/es/assets/fonts/.DS_Store +0 -0
- package/lib/assets/fonts/.DS_Store +0 -0
|
@@ -0,0 +1,637 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.source = void 0;
|
|
7
|
+
var source = [{
|
|
8
|
+
title: 'UI',
|
|
9
|
+
id: '1',
|
|
10
|
+
desc: '',
|
|
11
|
+
children: [{
|
|
12
|
+
title: 'Navigation bar',
|
|
13
|
+
id: '11',
|
|
14
|
+
children: [{
|
|
15
|
+
title: 'my.getTitleColor',
|
|
16
|
+
description: 'Get the background color of the navigation bar.'
|
|
17
|
+
}, {
|
|
18
|
+
title: 'my.hideBackHome',
|
|
19
|
+
description: 'Hide the “Back to Homepage” icon on the title bar.'
|
|
20
|
+
}, {
|
|
21
|
+
title: 'my.hideNavigationBarLoading',
|
|
22
|
+
description: 'Hide loading animation on the navigation bar of the current page.'
|
|
23
|
+
}, {
|
|
24
|
+
title: 'my.showNavigationBarLoading',
|
|
25
|
+
description: 'Show loading animation on the navigation bar of the current page.'
|
|
26
|
+
}, {
|
|
27
|
+
title: 'my.setNavigationBar',
|
|
28
|
+
description: 'Set navigation bar style including title, background color, bottom border color, and logo image in the upper-left corner of the navigation bar.'
|
|
29
|
+
}]
|
|
30
|
+
}, {
|
|
31
|
+
title: 'tabBar',
|
|
32
|
+
id: '12',
|
|
33
|
+
children: [{
|
|
34
|
+
title: 'my.hideTabBar',
|
|
35
|
+
description: 'Hide tabBar.'
|
|
36
|
+
}, {
|
|
37
|
+
title: 'my.hideTabBarRedDot',
|
|
38
|
+
description: 'Hide the red dot in the upper-right corner of an item on the tabBar.'
|
|
39
|
+
}, {
|
|
40
|
+
title: 'my.removeTabBarBadge',
|
|
41
|
+
description: 'Remove text in the upper-right corner of an item on the tabBar.'
|
|
42
|
+
}, {
|
|
43
|
+
title: 'my.setTabBarBadge',
|
|
44
|
+
description: 'Add text in the upper-right corner of an item on the tabBar. You can use red dot reminder to set the number of messages.'
|
|
45
|
+
}, {
|
|
46
|
+
title: 'my.setTabBarItem',
|
|
47
|
+
description: 'Set the content of an item on the tabBar dynamically.'
|
|
48
|
+
}, {
|
|
49
|
+
title: 'my.setTabBarStyle',
|
|
50
|
+
description: 'Set the general style of tabBar dynamically, such as font color, tab background color, and label border color.'
|
|
51
|
+
}, {
|
|
52
|
+
title: 'my.showTabBar',
|
|
53
|
+
description: 'Show tabBar.'
|
|
54
|
+
}, {
|
|
55
|
+
title: 'my.showTabBarRedDot',
|
|
56
|
+
description: 'Show the red dot in the upper-right corner of an item on the tabBar.'
|
|
57
|
+
}, {
|
|
58
|
+
title: 'onTabItemTap',
|
|
59
|
+
description: 'You can click a tab to trigger the function and listen to the events of tabBar click.'
|
|
60
|
+
}, {
|
|
61
|
+
title: 'FAQ regarding tabBar',
|
|
62
|
+
description: 'Answers to FAQ regarding tab.'
|
|
63
|
+
}]
|
|
64
|
+
}, {
|
|
65
|
+
title: 'Routes',
|
|
66
|
+
id: '13',
|
|
67
|
+
children: [{
|
|
68
|
+
title: 'my.switchTab',
|
|
69
|
+
description: 'Switch to the specific tabBar page and close all the irrelevant pages.'
|
|
70
|
+
}, {
|
|
71
|
+
title: 'my.reLaunch',
|
|
72
|
+
description: 'Close all the current pages and relaunch to the specific page in the application.'
|
|
73
|
+
}, {
|
|
74
|
+
title: 'my.redirectTo',
|
|
75
|
+
description: 'Close the current page and redirect to the specific page in the application.'
|
|
76
|
+
}, {
|
|
77
|
+
title: 'my.navigateTo',
|
|
78
|
+
description: 'Navigate to the specific page in the application from the current page.'
|
|
79
|
+
}, {
|
|
80
|
+
title: 'my.navigateBack',
|
|
81
|
+
description: 'Close the current page and navigate back to the previous level or multilevel page.'
|
|
82
|
+
}, {
|
|
83
|
+
title: 'FAQ regarding routes',
|
|
84
|
+
description: 'Answers to FAQ regarding routes.'
|
|
85
|
+
}]
|
|
86
|
+
}, {
|
|
87
|
+
title: 'Interaction feedback',
|
|
88
|
+
id: '13',
|
|
89
|
+
children: [{
|
|
90
|
+
title: 'my.alert',
|
|
91
|
+
description: 'Alert box (alert).'
|
|
92
|
+
}, {
|
|
93
|
+
title: 'my.confirm',
|
|
94
|
+
description: 'Confirm box (confirm).'
|
|
95
|
+
}, {
|
|
96
|
+
title: 'my.prompt',
|
|
97
|
+
description: 'You can enter text in the prompting dialogue box.'
|
|
98
|
+
}, {
|
|
99
|
+
title: 'my.showToast',
|
|
100
|
+
description: 'Show a toast. You can set the time that the toast lasts.'
|
|
101
|
+
}, {
|
|
102
|
+
title: 'my.hideToast',
|
|
103
|
+
description: 'Hide toasts.'
|
|
104
|
+
}, {
|
|
105
|
+
title: 'my.showLoading',
|
|
106
|
+
description: 'Show loading prompts.'
|
|
107
|
+
}, {
|
|
108
|
+
title: 'my.hideLoading',
|
|
109
|
+
description: 'Hide loading prompts.'
|
|
110
|
+
}, {
|
|
111
|
+
title: 'my.showActionSheet',
|
|
112
|
+
description: 'Show action sheet.'
|
|
113
|
+
}]
|
|
114
|
+
}, {
|
|
115
|
+
title: 'Pull-down refresh',
|
|
116
|
+
id: '14',
|
|
117
|
+
children: [{
|
|
118
|
+
title: 'onPullDownRefresh',
|
|
119
|
+
description: 'Listen to the pull-down refresh events that are performed by users on this page.'
|
|
120
|
+
}, {
|
|
121
|
+
title: 'my.stopPullDownRefresh',
|
|
122
|
+
description: 'Stop the operations of pull-down refresh on the current page.'
|
|
123
|
+
}, {
|
|
124
|
+
title: 'my.startPullDownRefresh',
|
|
125
|
+
description: 'Start the operations of pull-down refresh.'
|
|
126
|
+
}]
|
|
127
|
+
}, {
|
|
128
|
+
title: 'Contact',
|
|
129
|
+
id: '15',
|
|
130
|
+
children: [{
|
|
131
|
+
title: 'my.choosePhoneContact',
|
|
132
|
+
description: 'Select the phone number of a contact in the directory of the local system.'
|
|
133
|
+
}]
|
|
134
|
+
}, {
|
|
135
|
+
title: 'Choose city',
|
|
136
|
+
id: '16',
|
|
137
|
+
children: [{
|
|
138
|
+
title: 'my.chooseCity',
|
|
139
|
+
description: 'You can call this operation to open the city list.'
|
|
140
|
+
}, {
|
|
141
|
+
title: 'my.onLocatedComplete',
|
|
142
|
+
description: 'You can customize onLocatedComplete function and listen to the callback after the page located. This operation is only for the case when the attribute setLocatedCity in my.chooseCity is true.'
|
|
143
|
+
}, {
|
|
144
|
+
title: 'my.setLocatedCity',
|
|
145
|
+
description: 'You can call this operation to modify the default name of the located city in my.chooseCity.'
|
|
146
|
+
}]
|
|
147
|
+
}, {
|
|
148
|
+
title: 'Choose date',
|
|
149
|
+
id: '17',
|
|
150
|
+
children: [{
|
|
151
|
+
title: 'my.datePicker',
|
|
152
|
+
description: 'Open the date picker list.'
|
|
153
|
+
}]
|
|
154
|
+
}, {
|
|
155
|
+
title: 'Animation',
|
|
156
|
+
id: '18',
|
|
157
|
+
children: [{
|
|
158
|
+
title: 'my.createAnimation',
|
|
159
|
+
description: 'Create animation instances.'
|
|
160
|
+
}]
|
|
161
|
+
}, {
|
|
162
|
+
title: 'Canvas',
|
|
163
|
+
id: '19',
|
|
164
|
+
children: [{
|
|
165
|
+
title: 'my.createCanvasContext',
|
|
166
|
+
description: 'Create canvas drawing context.'
|
|
167
|
+
}]
|
|
168
|
+
}, {
|
|
169
|
+
title: 'Keypad',
|
|
170
|
+
id: '20',
|
|
171
|
+
children: [{
|
|
172
|
+
title: 'my.hideKeyboard',
|
|
173
|
+
description: 'Hide keypad.'
|
|
174
|
+
}]
|
|
175
|
+
}, {
|
|
176
|
+
title: 'Scroll',
|
|
177
|
+
id: '21',
|
|
178
|
+
children: [{
|
|
179
|
+
title: 'my.pageScrollTo',
|
|
180
|
+
description: 'Scroll to the target location on the page.'
|
|
181
|
+
}]
|
|
182
|
+
}, {
|
|
183
|
+
title: 'Node query',
|
|
184
|
+
id: '22',
|
|
185
|
+
children: [{
|
|
186
|
+
title: 'my.createSelectorQuery',
|
|
187
|
+
description: 'Get a node query object SelectorQuery.'
|
|
188
|
+
}]
|
|
189
|
+
}, {
|
|
190
|
+
title: 'Option selector',
|
|
191
|
+
id: '23',
|
|
192
|
+
children: [{
|
|
193
|
+
title: 'my.optionsSelect',
|
|
194
|
+
description: 'A component similar to the native Safari select but with more powerful features, which you can use to replace select or level 2 data.'
|
|
195
|
+
}]
|
|
196
|
+
}, {
|
|
197
|
+
title: 'Multilevel select',
|
|
198
|
+
id: '24',
|
|
199
|
+
children: [{
|
|
200
|
+
title: 'my.multiLevelSelect',
|
|
201
|
+
description: 'Business scenarios for relevant multilevel data selection such as the information selection of province, city, and region.'
|
|
202
|
+
}]
|
|
203
|
+
}, {
|
|
204
|
+
title: 'Set background window',
|
|
205
|
+
id: '25',
|
|
206
|
+
children: [{
|
|
207
|
+
title: 'my.setBackgroundColor',
|
|
208
|
+
description: 'Set the background color of the settings window dynamically.'
|
|
209
|
+
}, {
|
|
210
|
+
title: 'my.setBackgroundTextStyle',
|
|
211
|
+
description: 'Set the font of the pull-down background, and the style of loading graphic dynamically.'
|
|
212
|
+
}]
|
|
213
|
+
}, {
|
|
214
|
+
title: 'Set page pulldown',
|
|
215
|
+
id: '26',
|
|
216
|
+
children: [{
|
|
217
|
+
title: 'my.setCanPullDown',
|
|
218
|
+
description: 'Set if the page supports pull down operations. By default, the page in the mini program supports pull down operations.'
|
|
219
|
+
}]
|
|
220
|
+
}, {
|
|
221
|
+
title: 'Set optionMenu',
|
|
222
|
+
id: '27',
|
|
223
|
+
children: [{
|
|
224
|
+
title: 'my.setOptionMenu',
|
|
225
|
+
description: 'Configure extra icons on the optionMenu navigation bar, and then click to trigger onOptionMenuClick.'
|
|
226
|
+
}]
|
|
227
|
+
}]
|
|
228
|
+
}, {
|
|
229
|
+
title: 'Multimedia',
|
|
230
|
+
id: '2',
|
|
231
|
+
desc: '',
|
|
232
|
+
children: [{
|
|
233
|
+
title: 'Image',
|
|
234
|
+
id: '21',
|
|
235
|
+
desc: '',
|
|
236
|
+
children: [{
|
|
237
|
+
title: 'my.chooseImage',
|
|
238
|
+
description: 'Take photos or select images from your mobile phone album.'
|
|
239
|
+
}, {
|
|
240
|
+
title: 'my.previewImage',
|
|
241
|
+
description: 'Preview images.'
|
|
242
|
+
}, {
|
|
243
|
+
title: 'my.saveImage',
|
|
244
|
+
description: 'Save online images to your mobile phone album.'
|
|
245
|
+
}, {
|
|
246
|
+
title: 'my.compressImage',
|
|
247
|
+
description: 'Compress images.'
|
|
248
|
+
}, {
|
|
249
|
+
title: 'my.getImageInfo',
|
|
250
|
+
description: 'Get image information.'
|
|
251
|
+
}]
|
|
252
|
+
}]
|
|
253
|
+
}, {
|
|
254
|
+
title: 'Storage',
|
|
255
|
+
id: '3',
|
|
256
|
+
desc: '',
|
|
257
|
+
children: [{
|
|
258
|
+
title: 'my.setStorage',
|
|
259
|
+
description: 'The operation to save data in the specific key of the local storage will overwrite the corresponding data to this key.'
|
|
260
|
+
}, {
|
|
261
|
+
title: 'my.setStorageSync',
|
|
262
|
+
description: 'Synchronize data in the specific key of the local storage.'
|
|
263
|
+
}, {
|
|
264
|
+
title: 'my.getStorage',
|
|
265
|
+
description: 'Get data from the storage asynchronously.'
|
|
266
|
+
}, {
|
|
267
|
+
title: 'my.getStorageSync',
|
|
268
|
+
description: 'Get data from the storage synchronously.'
|
|
269
|
+
}, {
|
|
270
|
+
title: 'my.removeStorage',
|
|
271
|
+
description: 'Remove asynchronous operations for data storage.'
|
|
272
|
+
}, {
|
|
273
|
+
title: 'my.removeStorageSync',
|
|
274
|
+
description: 'Remove synchronous operations for data storage.'
|
|
275
|
+
}, {
|
|
276
|
+
title: 'my.clearStorage',
|
|
277
|
+
description: 'Clear asynchronous operations for local data storage.'
|
|
278
|
+
}, {
|
|
279
|
+
title: 'my.clearStorageSync',
|
|
280
|
+
description: 'Clear synchronous operations for local data storage.'
|
|
281
|
+
}, {
|
|
282
|
+
title: 'my.getStorageInfo',
|
|
283
|
+
description: 'Get relevant information for the current storage asynchronously.'
|
|
284
|
+
}, {
|
|
285
|
+
title: 'my.getStorageInfoSync',
|
|
286
|
+
description: 'Get relevant information for the current storage synchronously.'
|
|
287
|
+
}]
|
|
288
|
+
}, {
|
|
289
|
+
title: 'File',
|
|
290
|
+
id: 4,
|
|
291
|
+
children: [{
|
|
292
|
+
title: 'my.saveFile',
|
|
293
|
+
description: 'Save file to local system. The maximum local file size is 10 MB.'
|
|
294
|
+
}, {
|
|
295
|
+
title: 'my.getFileInfo',
|
|
296
|
+
description: 'Get file information.'
|
|
297
|
+
}, {
|
|
298
|
+
title: 'my.getSavedFileInfo',
|
|
299
|
+
description: 'Get the saved file information.'
|
|
300
|
+
}, {
|
|
301
|
+
title: 'my.getSavedFileList',
|
|
302
|
+
description: 'Get all the save files.'
|
|
303
|
+
}, {
|
|
304
|
+
title: 'my.removeSavedFile',
|
|
305
|
+
description: 'Remove a saved file.'
|
|
306
|
+
}]
|
|
307
|
+
}, {
|
|
308
|
+
title: 'Network',
|
|
309
|
+
id: 5,
|
|
310
|
+
children: [{
|
|
311
|
+
title: 'my.request',
|
|
312
|
+
description: 'Network request of the mini program.'
|
|
313
|
+
}, {
|
|
314
|
+
title: 'my.uploadFile',
|
|
315
|
+
description: 'Upload local resource to the developer server.'
|
|
316
|
+
}, {
|
|
317
|
+
title: 'my.downloadFile',
|
|
318
|
+
description: 'Download files to the local system.'
|
|
319
|
+
}, {
|
|
320
|
+
title: 'my.connectSocket',
|
|
321
|
+
description: 'Create a WebSocket connection.'
|
|
322
|
+
}, {
|
|
323
|
+
title: 'my.onSocketOpen',
|
|
324
|
+
description: 'Listen to the events of WebSocket connection open.'
|
|
325
|
+
}, {
|
|
326
|
+
title: 'my.offSocketOpen',
|
|
327
|
+
description: 'Stop listening to the events of WebSocket connection off.'
|
|
328
|
+
}, {
|
|
329
|
+
title: 'my.onSocketError',
|
|
330
|
+
description: 'Listen to WebSocket errors.'
|
|
331
|
+
}, {
|
|
332
|
+
title: 'my.offSocketError',
|
|
333
|
+
description: 'Stop listening to WebSocket errors.'
|
|
334
|
+
}, {
|
|
335
|
+
title: 'my.sendSocketMessage',
|
|
336
|
+
description: 'Send data through WebSocket connection.'
|
|
337
|
+
}, {
|
|
338
|
+
title: 'my.onSocketMessage',
|
|
339
|
+
description: 'Listen to the message events on the server received by WebSocket.'
|
|
340
|
+
}, {
|
|
341
|
+
title: 'my.offSocketMessage',
|
|
342
|
+
description: 'Stop listening to message events on the server received by WebSocket.'
|
|
343
|
+
}, {
|
|
344
|
+
title: 'my.closeSocket',
|
|
345
|
+
description: 'Close WebSocket connection.'
|
|
346
|
+
}, {
|
|
347
|
+
title: 'my.onSocketClose',
|
|
348
|
+
description: 'Listen to close WebSocket connection.'
|
|
349
|
+
}, {
|
|
350
|
+
title: 'my.offSocketClose',
|
|
351
|
+
description: 'Stop listening to close WebSocket connection.'
|
|
352
|
+
}]
|
|
353
|
+
}, {
|
|
354
|
+
title: 'Device',
|
|
355
|
+
id: 6,
|
|
356
|
+
children: [{
|
|
357
|
+
title: 'canIUse',
|
|
358
|
+
id: 61,
|
|
359
|
+
children: [{
|
|
360
|
+
title: 'my.canIUse',
|
|
361
|
+
description: 'Determine if the current version supports API operations, input parameters or output values, components, and attributes of the current mini program.'
|
|
362
|
+
}]
|
|
363
|
+
}, {
|
|
364
|
+
title: 'Get base library version number',
|
|
365
|
+
id: 62,
|
|
366
|
+
children: [{
|
|
367
|
+
title: 'my.SDKVersion',
|
|
368
|
+
description: 'Get the version number of the base library.'
|
|
369
|
+
}]
|
|
370
|
+
}, {
|
|
371
|
+
title: 'System information',
|
|
372
|
+
id: 63,
|
|
373
|
+
children: [{
|
|
374
|
+
title: 'my.getSystemInfo',
|
|
375
|
+
description: 'Get mobile phone system information.'
|
|
376
|
+
}, {
|
|
377
|
+
title: 'my.getSystemInfoSync',
|
|
378
|
+
description: 'Get the synchronous operation for mobile phone system information.'
|
|
379
|
+
}]
|
|
380
|
+
}, {
|
|
381
|
+
title: 'Network status',
|
|
382
|
+
id: 64,
|
|
383
|
+
children: [{
|
|
384
|
+
title: 'my.getNetworkType',
|
|
385
|
+
description: 'Get current network status.'
|
|
386
|
+
}, {
|
|
387
|
+
title: 'my.onNetworkStatusChange',
|
|
388
|
+
description: 'Start listening to network status changes.'
|
|
389
|
+
}, {
|
|
390
|
+
title: 'my.offNetworkStatusChange',
|
|
391
|
+
description: 'Stop listening to network status changes.'
|
|
392
|
+
}]
|
|
393
|
+
}, {
|
|
394
|
+
title: 'Clipboard',
|
|
395
|
+
id: 65,
|
|
396
|
+
children: [{
|
|
397
|
+
title: 'my.getClipboard',
|
|
398
|
+
description: 'Get clipboard data.'
|
|
399
|
+
}, {
|
|
400
|
+
title: 'my.setClipboard',
|
|
401
|
+
description: 'Set clipboard data.'
|
|
402
|
+
}]
|
|
403
|
+
}, {
|
|
404
|
+
title: 'Shake',
|
|
405
|
+
id: 66,
|
|
406
|
+
children: [{
|
|
407
|
+
title: 'my.watchShake',
|
|
408
|
+
description: 'Use shake feature. Every time you call the API, the callback will be triggered after you shake the mobile phone. If you need to listen again, you have to recall this API.'
|
|
409
|
+
}]
|
|
410
|
+
}, {
|
|
411
|
+
title: 'Vibrate',
|
|
412
|
+
id: 67,
|
|
413
|
+
children: [{
|
|
414
|
+
title: 'my.vibrate',
|
|
415
|
+
description: 'Use vibrate feature.'
|
|
416
|
+
}, {
|
|
417
|
+
title: 'my.vibrateLong',
|
|
418
|
+
description: 'Long vibration lasts for 400 ms.'
|
|
419
|
+
}, {
|
|
420
|
+
title: 'my.vibrateShort',
|
|
421
|
+
description: 'Short vibration lasts for 40 ms.'
|
|
422
|
+
}]
|
|
423
|
+
}, {
|
|
424
|
+
title: 'Accelerometer',
|
|
425
|
+
id: 68,
|
|
426
|
+
children: [{
|
|
427
|
+
title: 'my.onAccelerometerChange',
|
|
428
|
+
description: 'Listen to accelerometer data.'
|
|
429
|
+
}, {
|
|
430
|
+
title: 'my.offAccelerometerChange',
|
|
431
|
+
description: 'Stop listening to accelerometer data.'
|
|
432
|
+
}]
|
|
433
|
+
}, {
|
|
434
|
+
title: 'Gyroscope',
|
|
435
|
+
id: 69,
|
|
436
|
+
children: [{
|
|
437
|
+
title: 'my.onGyroscopeChange',
|
|
438
|
+
description: 'Listen to the events of gyroscope data change.'
|
|
439
|
+
}, {
|
|
440
|
+
title: 'my.offGyroscopeChange',
|
|
441
|
+
description: 'Stop listening to gyroscope data.'
|
|
442
|
+
}]
|
|
443
|
+
}, {
|
|
444
|
+
title: 'Compass',
|
|
445
|
+
id: 70,
|
|
446
|
+
children: [{
|
|
447
|
+
title: 'my.onCompassChange',
|
|
448
|
+
description: 'Listen to compass data.'
|
|
449
|
+
}, {
|
|
450
|
+
title: 'my.offCompassChange',
|
|
451
|
+
description: 'Stop listening to compass data.'
|
|
452
|
+
}]
|
|
453
|
+
}, {
|
|
454
|
+
title: 'Make phone calls',
|
|
455
|
+
id: 71,
|
|
456
|
+
children: [{
|
|
457
|
+
title: 'my.makePhoneCall',
|
|
458
|
+
description: 'Make phone calls.'
|
|
459
|
+
}]
|
|
460
|
+
}, {
|
|
461
|
+
title: 'Events of user capture screen',
|
|
462
|
+
id: 72,
|
|
463
|
+
children: [{
|
|
464
|
+
title: 'my.onUserCaptureScreen',
|
|
465
|
+
description: 'Listen to the events of active screen capture initiated by the user.'
|
|
466
|
+
}, {
|
|
467
|
+
title: 'my.offUserCaptureScreen',
|
|
468
|
+
description: 'Stop listening to the events of screen capture.'
|
|
469
|
+
}]
|
|
470
|
+
}, {
|
|
471
|
+
title: 'Screen brightness',
|
|
472
|
+
id: 73,
|
|
473
|
+
children: [{
|
|
474
|
+
title: 'my.setKeepScreenOn',
|
|
475
|
+
description: 'Set whether to keep the screen on.'
|
|
476
|
+
}, {
|
|
477
|
+
title: 'my.getScreenBrightness',
|
|
478
|
+
description: 'Get screen brightness.'
|
|
479
|
+
}, {
|
|
480
|
+
title: 'my.setScreenBrightness',
|
|
481
|
+
description: 'Set screen brightness.'
|
|
482
|
+
}]
|
|
483
|
+
}, {
|
|
484
|
+
title: 'Add phone contact',
|
|
485
|
+
id: 74,
|
|
486
|
+
children: [{
|
|
487
|
+
title: 'my.addPhoneContact',
|
|
488
|
+
description: 'You can add the list to the directory in the mobile phone system by Create New Contact or Add to Existing Contact.'
|
|
489
|
+
}]
|
|
490
|
+
}, {
|
|
491
|
+
title: 'Scan',
|
|
492
|
+
id: 75,
|
|
493
|
+
children: [{
|
|
494
|
+
title: 'my.scan',
|
|
495
|
+
description: 'Use scan feature.'
|
|
496
|
+
}]
|
|
497
|
+
}, {
|
|
498
|
+
title: 'Bluetooth',
|
|
499
|
+
id: 76,
|
|
500
|
+
children: [{
|
|
501
|
+
title: 'my.openBluetoothAdapter',
|
|
502
|
+
description: 'Initialize Bluetooth module of the mini program.'
|
|
503
|
+
}, {
|
|
504
|
+
title: 'my.closeBluetoothAdapter',
|
|
505
|
+
description: 'Turn off the local Bluetooth module.'
|
|
506
|
+
}, {
|
|
507
|
+
title: 'my.getBluetoothAdapterState',
|
|
508
|
+
description: 'Get the status of the local Bluetooth module.'
|
|
509
|
+
}, {
|
|
510
|
+
title: 'my.startBluetoothDevicesDiscovery',
|
|
511
|
+
description: 'Start searching for nearby Bluetooth devices.'
|
|
512
|
+
}, {
|
|
513
|
+
title: 'my.stopBluetoothDevicesDiscovery',
|
|
514
|
+
description: 'Stop searching for nearby Bluetooth devices.'
|
|
515
|
+
}, {
|
|
516
|
+
title: 'my.getBluetoothDevices',
|
|
517
|
+
description: 'Get all discovered Bluetooth devices, including the Bluetooth device that is already connected.'
|
|
518
|
+
}, {
|
|
519
|
+
title: 'my.getConnectedBluetoothDevices',
|
|
520
|
+
description: 'Get connected devices.'
|
|
521
|
+
}, {
|
|
522
|
+
title: 'my.connectBLEDevice',
|
|
523
|
+
description: 'Connect to the Bluetooth Low Energy (BLE) device.'
|
|
524
|
+
}, {
|
|
525
|
+
title: 'my.disconnectBLEDevice',
|
|
526
|
+
description: 'Disconnect from the BLE device.'
|
|
527
|
+
}, {
|
|
528
|
+
title: 'my.writeBLECharacteristicValue',
|
|
529
|
+
description: 'Write data into the characteristic value of the BLE device.'
|
|
530
|
+
}, {
|
|
531
|
+
title: 'my.readBLECharacteristicValue',
|
|
532
|
+
description: 'Read the data from the characteristic value of the BLE device.'
|
|
533
|
+
}, {
|
|
534
|
+
title: 'my.notifyBLECharacteristicValueChange',
|
|
535
|
+
description: 'Enable the notify feature for the characteristic value change of the BLE device.'
|
|
536
|
+
}, {
|
|
537
|
+
title: 'my.getBLEDeviceServices',
|
|
538
|
+
description: 'Get all the services of Bluetooth devices.'
|
|
539
|
+
}, {
|
|
540
|
+
title: 'my.getBLEDeviceCharacteristics',
|
|
541
|
+
description: 'Get all the characteristic values of Bluetooth devices.'
|
|
542
|
+
}, {
|
|
543
|
+
title: 'my.onBluetoothDeviceFound',
|
|
544
|
+
description: 'This event is triggered when a new Bluetooth device is found.'
|
|
545
|
+
}, {
|
|
546
|
+
title: 'my.offBluetoothDeviceFound',
|
|
547
|
+
description: 'Stop listening to the events of searches for new Bluetooth devices.'
|
|
548
|
+
}, {
|
|
549
|
+
title: 'my.onBLECharacteristicValueChange',
|
|
550
|
+
description: 'Listen to the events of characteristic value changes of the BLE device.'
|
|
551
|
+
}, {
|
|
552
|
+
title: 'my.offBLECharacteristicValueChange',
|
|
553
|
+
description: 'Stop listening to the events of characteristic value changes of the BLE device.'
|
|
554
|
+
}, {
|
|
555
|
+
title: 'my.onBLEConnectionStateChanged',
|
|
556
|
+
description: 'Listen to the events of BLE connection errors, such as device loss and abnormal disconnection.'
|
|
557
|
+
}, {
|
|
558
|
+
title: 'my.offBLEConnectionStateChanged',
|
|
559
|
+
description: 'Stop listening to the events of connection status changes of the BLE device.'
|
|
560
|
+
}, {
|
|
561
|
+
title: 'my.onBluetoothAdapterStateChange',
|
|
562
|
+
description: 'Listen to the events of local Bluetooth status changes.'
|
|
563
|
+
}, {
|
|
564
|
+
title: 'my.offBluetoothAdapterStateChange',
|
|
565
|
+
description: 'Stop listening to the events of local Bluetooth status changes.'
|
|
566
|
+
}, {
|
|
567
|
+
title: 'Error code',
|
|
568
|
+
description: 'List for the error code of Bluetooth API.'
|
|
569
|
+
}]
|
|
570
|
+
}]
|
|
571
|
+
}, {
|
|
572
|
+
title: 'Data security',
|
|
573
|
+
id: 7,
|
|
574
|
+
children: [{
|
|
575
|
+
title: 'my.rsa',
|
|
576
|
+
description: 'Asymmetric encryption.'
|
|
577
|
+
}]
|
|
578
|
+
}, {
|
|
579
|
+
title: 'Share',
|
|
580
|
+
id: 8,
|
|
581
|
+
children: [{
|
|
582
|
+
title: 'onShareAppMessage',
|
|
583
|
+
description: 'Customize onShareAppMessage function on the page to set the information for sharing on this page.'
|
|
584
|
+
}, {
|
|
585
|
+
title: 'my.hideShareMenu',
|
|
586
|
+
description: 'Hide Share button.'
|
|
587
|
+
}]
|
|
588
|
+
}, {
|
|
589
|
+
title: 'Current running version',
|
|
590
|
+
id: 9,
|
|
591
|
+
children: [{
|
|
592
|
+
title: 'my.getRunScene',
|
|
593
|
+
description: 'Get the running version of the current mini program.'
|
|
594
|
+
}]
|
|
595
|
+
}, {
|
|
596
|
+
title: 'Custom analysis',
|
|
597
|
+
id: 10,
|
|
598
|
+
children: [{
|
|
599
|
+
title: 'my.reportAnalytics',
|
|
600
|
+
description: 'Customize the report operation of data analysis.'
|
|
601
|
+
}]
|
|
602
|
+
}, {
|
|
603
|
+
title: 'Mini program redirection',
|
|
604
|
+
id: 11,
|
|
605
|
+
children: [{
|
|
606
|
+
title: 'my.navigateToMiniProgram',
|
|
607
|
+
description: 'Navigate to other mini programs.'
|
|
608
|
+
}, {
|
|
609
|
+
title: 'my.navigateBackMiniProgram',
|
|
610
|
+
description: 'You can navigate back to the previous mini program only when another mini program is navigated to the active mini program.'
|
|
611
|
+
}]
|
|
612
|
+
}, {
|
|
613
|
+
title: 'webview component control',
|
|
614
|
+
id: 12,
|
|
615
|
+
children: [{
|
|
616
|
+
title: 'my.createWebViewContext',
|
|
617
|
+
description: 'Create and return webViewContext object.'
|
|
618
|
+
}, {
|
|
619
|
+
title: 'webViewContext',
|
|
620
|
+
description: 'You can bind WebViewContext with a web-view component and implement some features through webviewId.'
|
|
621
|
+
}]
|
|
622
|
+
}]; // const trList = document.getElementsByTagName('table')[0].getElementsByTagName('tbody')[0];
|
|
623
|
+
// const rows = trList.querySelectorAll('tr');
|
|
624
|
+
// // 遍历每一行,提取信息
|
|
625
|
+
// const newMapList = [];
|
|
626
|
+
// rows.forEach(row => {
|
|
627
|
+
// const linkElement = row.querySelector('a');
|
|
628
|
+
// const descriptionElement = row.querySelector('td:nth-child(2) p');
|
|
629
|
+
// // 获取链接文本作为title
|
|
630
|
+
// const title = linkElement.textContent.trim();
|
|
631
|
+
// // 获取描述
|
|
632
|
+
// const description = descriptionElement.textContent.trim();
|
|
633
|
+
// newMapList.push({ title, description });
|
|
634
|
+
// });
|
|
635
|
+
// console.log(newMapList);
|
|
636
|
+
|
|
637
|
+
exports.source = source;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = MiniAppApi;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _antd = require("antd");
|
|
11
|
+
|
|
12
|
+
var _const = require("./const");
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
|
+
|
|
16
|
+
var Search = _antd.Input.Search;
|
|
17
|
+
|
|
18
|
+
function MiniAppApi(_a) {
|
|
19
|
+
var _onChange = _a.onChange;
|
|
20
|
+
var columns = [{
|
|
21
|
+
title: 'Name',
|
|
22
|
+
dataIndex: 'title'
|
|
23
|
+
}, {
|
|
24
|
+
title: 'Features',
|
|
25
|
+
dataIndex: 'description'
|
|
26
|
+
}];
|
|
27
|
+
var rowSelection = {
|
|
28
|
+
getCheckboxProps: function getCheckboxProps(record) {
|
|
29
|
+
return {
|
|
30
|
+
disabled: record.children
|
|
31
|
+
};
|
|
32
|
+
},
|
|
33
|
+
onChange: function onChange(selectedRowKeys, selectedRow) {
|
|
34
|
+
_onChange({
|
|
35
|
+
value: selectedRowKeys[0],
|
|
36
|
+
name: selectedRow[0].title
|
|
37
|
+
});
|
|
38
|
+
},
|
|
39
|
+
type: 'radio'
|
|
40
|
+
};
|
|
41
|
+
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
42
|
+
style: {
|
|
43
|
+
padding: '10px 0'
|
|
44
|
+
}
|
|
45
|
+
}, /*#__PURE__*/_react["default"].createElement(Search, {
|
|
46
|
+
enterButton: true,
|
|
47
|
+
onSearch: function onSearch() {},
|
|
48
|
+
placeholder: "Api Name"
|
|
49
|
+
})), /*#__PURE__*/_react["default"].createElement(_antd.Table, {
|
|
50
|
+
bordered: false,
|
|
51
|
+
columns: columns,
|
|
52
|
+
dataSource: _const.source,
|
|
53
|
+
defaultExpandAllRows: true,
|
|
54
|
+
pagination: false,
|
|
55
|
+
rowKey: "title",
|
|
56
|
+
rowSelection: rowSelection,
|
|
57
|
+
scroll: {
|
|
58
|
+
y: 480
|
|
59
|
+
}
|
|
60
|
+
}));
|
|
61
|
+
}
|