@dcloudio/uni-app-x 0.7.120 → 0.7.121

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.
Files changed (174) hide show
  1. package/package.json +1 -1
  2. package/types/app.d.ts +2 -1
  3. package/types/dom2-internal/UniPage.d.ts +6 -0
  4. package/types/native/DrawableContext.d.ts +104 -52
  5. package/types/native/IUniElement.d.ts +4 -2
  6. package/types/node_modules/.package-lock.json +20 -0
  7. package/types/node_modules/typescript/LICENSE.txt +55 -0
  8. package/types/node_modules/typescript/ThirdPartyNoticeText.txt +193 -0
  9. package/types/node_modules/typescript/bin/tsc +2 -0
  10. package/types/node_modules/typescript/bin/tsserver +2 -0
  11. package/types/node_modules/typescript/lib/cancellationToken.js +90 -0
  12. package/types/node_modules/typescript/lib/cs/diagnosticMessages.generated.json +1880 -0
  13. package/types/node_modules/typescript/lib/de/diagnosticMessages.generated.json +1880 -0
  14. package/types/node_modules/typescript/lib/es/diagnosticMessages.generated.json +1880 -0
  15. package/types/node_modules/typescript/lib/fr/diagnosticMessages.generated.json +1880 -0
  16. package/types/node_modules/typescript/lib/it/diagnosticMessages.generated.json +1880 -0
  17. package/types/node_modules/typescript/lib/ja/diagnosticMessages.generated.json +1880 -0
  18. package/types/node_modules/typescript/lib/ko/diagnosticMessages.generated.json +1880 -0
  19. package/types/node_modules/typescript/lib/lib.d.ts +22 -0
  20. package/types/node_modules/typescript/lib/lib.decorators.d.ts +386 -0
  21. package/types/node_modules/typescript/lib/lib.decorators.legacy.d.ts +22 -0
  22. package/types/node_modules/typescript/lib/lib.dom.asynciterable.d.ts +33 -0
  23. package/types/node_modules/typescript/lib/lib.dom.d.ts +28596 -0
  24. package/types/node_modules/typescript/lib/lib.dom.iterable.d.ts +475 -0
  25. package/types/node_modules/typescript/lib/lib.es2015.collection.d.ts +147 -0
  26. package/types/node_modules/typescript/lib/lib.es2015.core.d.ts +597 -0
  27. package/types/node_modules/typescript/lib/lib.es2015.d.ts +28 -0
  28. package/types/node_modules/typescript/lib/lib.es2015.generator.d.ts +77 -0
  29. package/types/node_modules/typescript/lib/lib.es2015.iterable.d.ts +495 -0
  30. package/types/node_modules/typescript/lib/lib.es2015.promise.d.ts +81 -0
  31. package/types/node_modules/typescript/lib/lib.es2015.proxy.d.ts +128 -0
  32. package/types/node_modules/typescript/lib/lib.es2015.reflect.d.ts +144 -0
  33. package/types/node_modules/typescript/lib/lib.es2015.symbol.d.ts +46 -0
  34. package/types/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts +326 -0
  35. package/types/node_modules/typescript/lib/lib.es2016.array.include.d.ts +116 -0
  36. package/types/node_modules/typescript/lib/lib.es2016.d.ts +21 -0
  37. package/types/node_modules/typescript/lib/lib.es2016.full.d.ts +23 -0
  38. package/types/node_modules/typescript/lib/lib.es2016.intl.d.ts +31 -0
  39. package/types/node_modules/typescript/lib/lib.es2017.d.ts +25 -0
  40. package/types/node_modules/typescript/lib/lib.es2017.date.d.ts +31 -0
  41. package/types/node_modules/typescript/lib/lib.es2017.full.d.ts +23 -0
  42. package/types/node_modules/typescript/lib/lib.es2017.intl.d.ts +44 -0
  43. package/types/node_modules/typescript/lib/lib.es2017.object.d.ts +49 -0
  44. package/types/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts +135 -0
  45. package/types/node_modules/typescript/lib/lib.es2017.string.d.ts +45 -0
  46. package/types/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts +53 -0
  47. package/types/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts +77 -0
  48. package/types/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts +43 -0
  49. package/types/node_modules/typescript/lib/lib.es2018.d.ts +24 -0
  50. package/types/node_modules/typescript/lib/lib.es2018.full.d.ts +24 -0
  51. package/types/node_modules/typescript/lib/lib.es2018.intl.d.ts +83 -0
  52. package/types/node_modules/typescript/lib/lib.es2018.promise.d.ts +30 -0
  53. package/types/node_modules/typescript/lib/lib.es2018.regexp.d.ts +37 -0
  54. package/types/node_modules/typescript/lib/lib.es2019.array.d.ts +79 -0
  55. package/types/node_modules/typescript/lib/lib.es2019.d.ts +24 -0
  56. package/types/node_modules/typescript/lib/lib.es2019.full.d.ts +24 -0
  57. package/types/node_modules/typescript/lib/lib.es2019.intl.d.ts +23 -0
  58. package/types/node_modules/typescript/lib/lib.es2019.object.d.ts +33 -0
  59. package/types/node_modules/typescript/lib/lib.es2019.string.d.ts +37 -0
  60. package/types/node_modules/typescript/lib/lib.es2019.symbol.d.ts +24 -0
  61. package/types/node_modules/typescript/lib/lib.es2020.bigint.d.ts +727 -0
  62. package/types/node_modules/typescript/lib/lib.es2020.d.ts +27 -0
  63. package/types/node_modules/typescript/lib/lib.es2020.date.d.ts +42 -0
  64. package/types/node_modules/typescript/lib/lib.es2020.full.d.ts +24 -0
  65. package/types/node_modules/typescript/lib/lib.es2020.intl.d.ts +474 -0
  66. package/types/node_modules/typescript/lib/lib.es2020.number.d.ts +28 -0
  67. package/types/node_modules/typescript/lib/lib.es2020.promise.d.ts +47 -0
  68. package/types/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts +97 -0
  69. package/types/node_modules/typescript/lib/lib.es2020.string.d.ts +42 -0
  70. package/types/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts +37 -0
  71. package/types/node_modules/typescript/lib/lib.es2021.d.ts +23 -0
  72. package/types/node_modules/typescript/lib/lib.es2021.full.d.ts +24 -0
  73. package/types/node_modules/typescript/lib/lib.es2021.intl.d.ts +166 -0
  74. package/types/node_modules/typescript/lib/lib.es2021.promise.d.ts +48 -0
  75. package/types/node_modules/typescript/lib/lib.es2021.string.d.ts +33 -0
  76. package/types/node_modules/typescript/lib/lib.es2021.weakref.d.ts +76 -0
  77. package/types/node_modules/typescript/lib/lib.es2022.array.d.ts +121 -0
  78. package/types/node_modules/typescript/lib/lib.es2022.d.ts +26 -0
  79. package/types/node_modules/typescript/lib/lib.es2022.error.d.ts +73 -0
  80. package/types/node_modules/typescript/lib/lib.es2022.full.d.ts +24 -0
  81. package/types/node_modules/typescript/lib/lib.es2022.intl.d.ts +117 -0
  82. package/types/node_modules/typescript/lib/lib.es2022.object.d.ts +26 -0
  83. package/types/node_modules/typescript/lib/lib.es2022.regexp.d.ts +39 -0
  84. package/types/node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts +39 -0
  85. package/types/node_modules/typescript/lib/lib.es2022.string.d.ts +25 -0
  86. package/types/node_modules/typescript/lib/lib.es2023.array.d.ts +924 -0
  87. package/types/node_modules/typescript/lib/lib.es2023.collection.d.ts +21 -0
  88. package/types/node_modules/typescript/lib/lib.es2023.d.ts +22 -0
  89. package/types/node_modules/typescript/lib/lib.es2023.full.d.ts +24 -0
  90. package/types/node_modules/typescript/lib/lib.es2023.intl.d.ts +56 -0
  91. package/types/node_modules/typescript/lib/lib.es5.d.ts +4585 -0
  92. package/types/node_modules/typescript/lib/lib.es6.d.ts +23 -0
  93. package/types/node_modules/typescript/lib/lib.esnext.array.d.ts +35 -0
  94. package/types/node_modules/typescript/lib/lib.esnext.collection.d.ts +106 -0
  95. package/types/node_modules/typescript/lib/lib.esnext.d.ts +28 -0
  96. package/types/node_modules/typescript/lib/lib.esnext.decorators.d.ts +28 -0
  97. package/types/node_modules/typescript/lib/lib.esnext.disposable.d.ts +185 -0
  98. package/types/node_modules/typescript/lib/lib.esnext.full.d.ts +24 -0
  99. package/types/node_modules/typescript/lib/lib.esnext.intl.d.ts +21 -0
  100. package/types/node_modules/typescript/lib/lib.esnext.object.d.ts +29 -0
  101. package/types/node_modules/typescript/lib/lib.esnext.promise.d.ts +35 -0
  102. package/types/node_modules/typescript/lib/lib.esnext.regexp.d.ts +25 -0
  103. package/types/node_modules/typescript/lib/lib.esnext.string.d.ts +29 -0
  104. package/types/node_modules/typescript/lib/lib.scripthost.d.ts +322 -0
  105. package/types/node_modules/typescript/lib/lib.webworker.asynciterable.d.ts +33 -0
  106. package/types/node_modules/typescript/lib/lib.webworker.d.ts +9431 -0
  107. package/types/node_modules/typescript/lib/lib.webworker.importscripts.d.ts +23 -0
  108. package/types/node_modules/typescript/lib/lib.webworker.iterable.d.ts +276 -0
  109. package/types/node_modules/typescript/lib/pl/diagnosticMessages.generated.json +1880 -0
  110. package/types/node_modules/typescript/lib/pt-br/diagnosticMessages.generated.json +1880 -0
  111. package/types/node_modules/typescript/lib/ru/diagnosticMessages.generated.json +1880 -0
  112. package/types/node_modules/typescript/lib/tr/diagnosticMessages.generated.json +1880 -0
  113. package/types/node_modules/typescript/lib/tsc.js +129741 -0
  114. package/types/node_modules/typescript/lib/tsserver.js +621 -0
  115. package/types/node_modules/typescript/lib/tsserverlibrary.d.ts +17 -0
  116. package/types/node_modules/typescript/lib/tsserverlibrary.js +21 -0
  117. package/types/node_modules/typescript/lib/typesMap.json +497 -0
  118. package/types/node_modules/typescript/lib/typescript.d.ts +11240 -0
  119. package/types/node_modules/typescript/lib/typescript.js +194910 -0
  120. package/types/node_modules/typescript/lib/typingsInstaller.js +236 -0
  121. package/types/node_modules/typescript/lib/watchGuard.js +53 -0
  122. package/types/node_modules/typescript/lib/zh-cn/diagnosticMessages.generated.json +1880 -0
  123. package/types/node_modules/typescript/lib/zh-tw/diagnosticMessages.generated.json +1880 -0
  124. package/types/node_modules/typescript/package.json +116 -0
  125. package/types/page.d.ts +2 -2
  126. package/types/uni/env/index.d.ts +2 -1
  127. package/types/uni/uts-plugin-api/lib/uni-dialogPage/utssdk/global.d.ts +0 -2
  128. package/types/uni/uts-plugin-api/lib/uni-dialogPage/utssdk/index.d.ts +0 -1
  129. package/types/uni/uts-plugin-api/lib/uni-dialogPage/utssdk/interface.d.ts +0 -1
  130. package/types/uni/uts-plugin-api/lib/uni-getElementById/utssdk/interface.d.ts +1 -0
  131. package/types/uni/uts-plugin-api/lib/uni-getEnterOptionsSync/utssdk/interface.d.ts +72 -531
  132. package/types/uni/uts-plugin-api/lib/uni-getLaunchOptionsSync/utssdk/interface.d.ts +72 -531
  133. package/types/uni/uts-plugin-api/lib/uni-keyboard/utssdk/interface.d.ts +6 -6
  134. package/types/uni/uts-plugin-api/lib/uni-makePhoneCall/utssdk/interface.d.ts +72 -68
  135. package/types/uni/uts-plugin-api/lib/uni-modal/utssdk/global.d.ts +8 -12
  136. package/types/uni/uts-plugin-api/lib/uni-modal/utssdk/index.d.ts +4 -6
  137. package/types/uni/uts-plugin-api/lib/uni-modal/utssdk/interface.d.ts +1741 -905
  138. package/types/uni/uts-plugin-api/lib/uni-oauth/utssdk/interface.d.ts +12 -12
  139. package/types/uni/uts-plugin-api/lib/uni-screenBrightness/utssdk/interface.d.ts +1157 -830
  140. package/types/uni/uts-plugin-api/lib/uni-share/utssdk/interface.d.ts +936 -335
  141. package/types/uni/uts-plugin-api/lib/uni-showLoading/utssdk/global.d.ts +8 -0
  142. package/types/uni/uts-plugin-api/lib/uni-showLoading/utssdk/index.d.ts +4 -0
  143. package/types/uni/uts-plugin-api/lib/uni-showLoading/utssdk/interface.d.ts +1155 -1142
  144. package/types/uni/uts-plugin-api/lib/uni-web-view/utssdk/interface.d.ts +6 -6
  145. package/types/uni/uts-plugin-component/lib/uni-dialogPage/utssdk/global.d.ts +0 -2
  146. package/types/uni/uts-plugin-component/lib/uni-dialogPage/utssdk/index.d.ts +0 -1
  147. package/types/uni/uts-plugin-component/lib/uni-dialogPage/utssdk/interface.d.ts +0 -1
  148. package/types/uni/uts-plugin-component/lib/uni-editor-global/utssdk/interface.d.ts +2 -1
  149. package/types/uni/uts-plugin-component/lib/uni-form-global/utssdk/interface.d.ts +1 -1
  150. package/types/uni/uts-plugin-component/lib/uni-getElementById/utssdk/interface.d.ts +1 -0
  151. package/types/uni/uts-plugin-component/lib/uni-getEnterOptionsSync/utssdk/interface.d.ts +531 -72
  152. package/types/uni/uts-plugin-component/lib/uni-getLaunchOptionsSync/utssdk/interface.d.ts +531 -72
  153. package/types/uni/uts-plugin-component/lib/uni-keyboard/utssdk/interface.d.ts +6 -6
  154. package/types/uni/uts-plugin-component/lib/uni-makePhoneCall/utssdk/interface.d.ts +73 -67
  155. package/types/uni/uts-plugin-component/lib/uni-match-media-global/utssdk/interface.d.ts +1 -1
  156. package/types/uni/uts-plugin-component/lib/uni-modal/utssdk/global.d.ts +8 -12
  157. package/types/uni/uts-plugin-component/lib/uni-modal/utssdk/index.d.ts +4 -6
  158. package/types/uni/uts-plugin-component/lib/uni-modal/utssdk/interface.d.ts +1743 -291
  159. package/types/uni/uts-plugin-component/lib/uni-navigator-global/utssdk/interface.d.ts +1 -1
  160. package/types/uni/uts-plugin-component/lib/uni-oauth/utssdk/interface.d.ts +12 -12
  161. package/types/uni/uts-plugin-component/lib/uni-progress-global/utssdk/interface.d.ts +1 -1
  162. package/types/uni/uts-plugin-component/lib/uni-screenBrightness/utssdk/interface.d.ts +1175 -314
  163. package/types/uni/uts-plugin-component/lib/uni-share/utssdk/interface.d.ts +936 -335
  164. package/types/uni/uts-plugin-component/lib/uni-showLoading/utssdk/global.d.ts +8 -0
  165. package/types/uni/uts-plugin-component/lib/uni-showLoading/utssdk/index.d.ts +4 -0
  166. package/types/uni/uts-plugin-component/lib/uni-showLoading/utssdk/interface.d.ts +1617 -446
  167. package/types/uni/uts-plugin-component/lib/uni-web-view/utssdk/interface.d.ts +6 -6
  168. package/types/uni/uts-plugin-extend/global.d.ts +0 -1
  169. package/types/uni/uts-plugin-extend/index.d.ts +0 -1
  170. package/types/uni/uts-plugin-extend/lib/uni-memory/utssdk/interface.d.ts +3 -3
  171. package/types/uni/uts-plugin-extend/lib/uni-openLocation/utssdk/interface.d.ts +2 -1
  172. package/types/vue/LifeCycle.d.ts +2 -2
  173. package/types/uni/uts-plugin-extend/lib/uni-memory/utssdk/global.d.ts +0 -9
  174. package/types/uni/uts-plugin-extend/lib/uni-memory/utssdk/index.d.ts +0 -1
@@ -1,907 +1,1743 @@
1
-
2
- export type UniShowModalResult = {
3
- /**
1
+ export interface ShowModalSuccess {
2
+ /**
3
+ * 错误信息
4
+ * @uniPlatform
5
+ {
6
+ "app": {
7
+ "android": {
8
+ "osVer": "5.0",
9
+ "uniVer": "x",
10
+ "uniUtsPlugin": "x",
11
+ "unixVer": "4.61"
12
+ },
13
+ "ios": {
14
+ "osVer": "12.0",
15
+ "uniVer": "x",
16
+ "uniUtsPlugin": "x",
17
+ "unixVer": "4.61",
18
+ "unixUtsPlugin": "4.61"
19
+ },
20
+ "harmony": {
21
+ "osVer": "3.0",
22
+ "uniVer": "4.23",
23
+ "unixVer": "4.61",
24
+ "unixVaporVer": "5.0"
25
+ }
26
+ },
27
+ "mp": {
28
+ "weixin": {
29
+ "hostVer": "√",
30
+ "uniVer": "√",
31
+ "unixVer": "4.41"
32
+ },
33
+ "alipay": {
34
+ "hostVer": "√",
35
+ "uniVer": "√",
36
+ "unixVer": "x"
37
+ },
38
+ "baidu": {
39
+ "hostVer": "√",
40
+ "uniVer": "√",
41
+ "unixVer": "x"
42
+ },
43
+ "toutiao": {
44
+ "hostVer": "√",
45
+ "uniVer": "√",
46
+ "unixVer": "x"
47
+ },
48
+ "lark": {
49
+ "hostVer": "√",
50
+ "uniVer": "√",
51
+ "unixVer": "x"
52
+ },
53
+ "qq": {
54
+ "hostVer": "√",
55
+ "uniVer": "√",
56
+ "unixVer": "x"
57
+ },
58
+ "kuaishou": {
59
+ "hostVer": "√",
60
+ "uniVer": "√",
61
+ "unixVer": "x"
62
+ },
63
+ "jd": {
64
+ "hostVer": "√",
65
+ "uniVer": "√",
66
+ "unixVer": "x"
67
+ }
68
+ },
69
+ "web": {
70
+ "uniVer": "√",
71
+ "unixVer": "4.0"
72
+ }
73
+ }
74
+ */
75
+ errMsg: string
76
+ /**
4
77
  * editable 为 true 时,用户输入的文本
5
- * @uniPlatform {
6
- * "mp": {
7
- * "weixin": {
8
- * "hostVer": "√",
9
- * "uniVer": "",
10
- * "unixVer": "4.41"
11
- * },
12
- * "alipay": {
13
- * "hostVer": "-",
14
- * "uniVer": "-",
15
- * "unixVer": "-"
16
- * },
17
- * "baidu": {
18
- * "hostVer": "-",
19
- * "uniVer": "-",
20
- * "unixVer": "-"
21
- * },
22
- * "toutiao": {
23
- * "hostVer": "-",
24
- * "uniVer": "-",
25
- * "unixVer": "-"
26
- * },
27
- * "lark": {
28
- * "hostVer": "-",
29
- * "uniVer": "-",
30
- * "unixVer": "-"
31
- * },
32
- * "qq": {
33
- * "hostVer": "-",
34
- * "uniVer": "-",
35
- * "unixVer": "-"
36
- * },
37
- * "kuaishou": {
38
- * "hostVer": "-",
39
- * "uniVer": "-",
40
- * "unixVer": "-"
41
- * },
42
- * "jd": {
43
- * "hostVer": "-",
44
- * "uniVer": "-",
45
- * "unixVer": "-"
46
- * }
47
- * }
48
- * }
49
- */
50
- content?: string|null
51
- /**
52
- * 为 true 时,表示用户点击了取消(用于 Android 系统区分点击蒙层关闭还是点击取消按钮关闭)
53
- * @uniPlatform {
54
- * "mp": {
55
- * "weixin": {
56
- * "hostVer": "√",
57
- * "uniVer": "",
58
- * "unixVer": "4.41"
59
- * },
60
- * "alipay": {
61
- * "hostVer": "-",
62
- * "uniVer": "-",
63
- * "unixVer": "-"
64
- * },
65
- * "baidu": {
66
- * "hostVer": "-",
67
- * "uniVer": "-",
68
- * "unixVer": "-"
69
- * },
70
- * "toutiao": {
71
- * "hostVer": "-",
72
- * "uniVer": "-",
73
- * "unixVer": "-"
74
- * },
75
- * "lark": {
76
- * "hostVer": "-",
77
- * "uniVer": "-",
78
- * "unixVer": "-"
79
- * },
80
- * "qq": {
81
- * "hostVer": "-",
82
- * "uniVer": "-",
83
- * "unixVer": "-"
84
- * },
85
- * "kuaishou": {
86
- * "hostVer": "-",
87
- * "uniVer": "-",
88
- * "unixVer": "-"
89
- * },
90
- * "jd": {
91
- * "hostVer": "-",
92
- * "uniVer": "-",
93
- * "unixVer": "-"
94
- * }
95
- * }
96
- * }
97
- */
98
- cancel: boolean
99
- /**
100
- * 为 true 时,表示用户点击了确定按钮
101
- * @uniPlatform {
102
- * "mp": {
103
- * "weixin": {
104
- * "hostVer": "√",
105
- * "uniVer": "√",
106
- * "unixVer": "4.41"
107
- * },
108
- * "alipay": {
109
- * "hostVer": "-",
110
- * "uniVer": "-",
111
- * "unixVer": "-"
112
- * },
113
- * "baidu": {
114
- * "hostVer": "-",
115
- * "uniVer": "-",
116
- * "unixVer": "-"
117
- * },
118
- * "toutiao": {
119
- * "hostVer": "-",
120
- * "uniVer": "-",
121
- * "unixVer": "-"
122
- * },
123
- * "lark": {
124
- * "hostVer": "-",
125
- * "uniVer": "-",
126
- * "unixVer": "-"
127
- * },
128
- * "qq": {
129
- * "hostVer": "-",
130
- * "uniVer": "-",
131
- * "unixVer": "-"
132
- * },
133
- * "kuaishou": {
134
- * "hostVer": "-",
135
- * "uniVer": "-",
136
- * "unixVer": "-"
137
- * },
138
- * "jd": {
139
- * "hostVer": "-",
140
- * "uniVer": "-",
141
- * "unixVer": "-"
142
- * }
143
- * }
144
- * }
145
- */
146
- confirm: boolean
147
- }
148
-
149
- export type ShowModalResult = UniShowModalResult
150
-
151
- export type ShowModalErrorCode = 4
152
-
153
- export interface UniShowModalFail extends IUniError {
154
- errCode: ShowModalErrorCode
155
- }
156
-
157
- export type ShowModalFail = UniShowModalFail
158
-
159
- export class ShowModalFailImpl extends UniError implements ShowModalFail {
160
- override errCode: ShowModalErrorCode
161
- constructor(errMsg: string = 'showModal:fail cancel', errCode: ShowModalErrorCode = 4) {
162
- super()
163
- this.errMsg = errMsg
164
- this.errCode = errCode
165
- }
166
- }
167
-
168
- type UniShowModalFailCallback = (result: ShowModalFail) => void
169
-
170
- type UniShowModalSuccessCallback = (result: ShowModalResult) => void
171
-
172
- type UniShowModalCompleteCallback = (result: any) => void
173
-
174
-
175
- export type ShowModalOptions = {
176
- /**
177
- * 提示的标题
178
- * @uniPlatform {
179
- * "mp": {
180
- * "weixin": {
181
- * "hostVer": "√",
182
- * "uniVer": "√",
183
- * "unixVer": "4.41"
184
- * },
185
- * "alipay": {
186
- * "hostVer": "-",
187
- * "uniVer": "-",
188
- * "unixVer": "-"
189
- * },
190
- * "baidu": {
191
- * "hostVer": "-",
192
- * "uniVer": "-",
193
- * "unixVer": "-"
194
- * },
195
- * "toutiao": {
196
- * "hostVer": "-",
197
- * "uniVer": "-",
198
- * "unixVer": "-"
199
- * },
200
- * "lark": {
201
- * "hostVer": "-",
202
- * "uniVer": "-",
203
- * "unixVer": "-"
204
- * },
205
- * "qq": {
206
- * "hostVer": "-",
207
- * "uniVer": "-",
208
- * "unixVer": "-"
209
- * },
210
- * "kuaishou": {
211
- * "hostVer": "-",
212
- * "uniVer": "-",
213
- * "unixVer": "-"
214
- * },
215
- * "jd": {
216
- * "hostVer": "-",
217
- * "uniVer": "-",
218
- * "unixVer": "-"
219
- * }
220
- * }
221
- * }
222
- */
223
- title?: string | null,
224
- /**
225
- * 提示的内容
226
- * @uniPlatform {
227
- * "mp": {
228
- * "weixin": {
229
- * "hostVer": "√",
230
- * "uniVer": "√",
231
- * "unixVer": "4.41"
232
- * },
233
- * "alipay": {
234
- * "hostVer": "-",
235
- * "uniVer": "-",
236
- * "unixVer": "-"
237
- * },
238
- * "baidu": {
239
- * "hostVer": "-",
240
- * "uniVer": "-",
241
- * "unixVer": "-"
242
- * },
243
- * "toutiao": {
244
- * "hostVer": "-",
245
- * "uniVer": "-",
246
- * "unixVer": "-"
247
- * },
248
- * "lark": {
249
- * "hostVer": "-",
250
- * "uniVer": "-",
251
- * "unixVer": "-"
252
- * },
253
- * "qq": {
254
- * "hostVer": "-",
255
- * "uniVer": "-",
256
- * "unixVer": "-"
257
- * },
258
- * "kuaishou": {
259
- * "hostVer": "-",
260
- * "uniVer": "-",
261
- * "unixVer": "-"
262
- * },
263
- * "jd": {
264
- * "hostVer": "-",
265
- * "uniVer": "-",
266
- * "unixVer": "-"
267
- * }
268
- * }
269
- * }
270
- */
271
- content?: string | null,
272
- /**
273
- * @defaultValue true
274
- * @default true
275
- * 是否显示取消按钮,默认为 true
276
- */
277
- showCancel?: boolean | null,
278
- /**
279
- * 取消按钮的文字,默认为"取消"
280
- * @uniPlatform {
281
- * "mp": {
282
- * "weixin": {
283
- * "hostVer": "",
284
- * "uniVer": "",
285
- * "unixVer": "4.41"
286
- * },
287
- * "alipay": {
288
- * "hostVer": "-",
289
- * "uniVer": "-",
290
- * "unixVer": "-"
291
- * },
292
- * "baidu": {
293
- * "hostVer": "-",
294
- * "uniVer": "-",
295
- * "unixVer": "-"
296
- * },
297
- * "toutiao": {
298
- * "hostVer": "-",
299
- * "uniVer": "-",
300
- * "unixVer": "-"
301
- * },
302
- * "lark": {
303
- * "hostVer": "-",
304
- * "uniVer": "-",
305
- * "unixVer": "-"
306
- * },
307
- * "qq": {
308
- * "hostVer": "-",
309
- * "uniVer": "-",
310
- * "unixVer": "-"
311
- * },
312
- * "kuaishou": {
313
- * "hostVer": "-",
314
- * "uniVer": "-",
315
- * "unixVer": "-"
316
- * },
317
- * "jd": {
318
- * "hostVer": "-",
319
- * "uniVer": "-",
320
- * "unixVer": "-"
321
- * }
322
- * }
323
- * }
324
- */
325
- cancelText?: string | null,
326
- /**
327
- * 取消按钮的文字颜色,默认为"#000000"
328
- * @uniPlatform {
329
- * "mp": {
330
- * "weixin": {
331
- * "hostVer": "√",
332
- * "uniVer": "√",
333
- * "unixVer": "4.41"
334
- * },
335
- * "alipay": {
336
- * "hostVer": "-",
337
- * "uniVer": "-",
338
- * "unixVer": "-"
339
- * },
340
- * "baidu": {
341
- * "hostVer": "-",
342
- * "uniVer": "-",
343
- * "unixVer": "-"
344
- * },
345
- * "toutiao": {
346
- * "hostVer": "-",
347
- * "uniVer": "-",
348
- * "unixVer": "-"
349
- * },
350
- * "lark": {
351
- * "hostVer": "-",
352
- * "uniVer": "-",
353
- * "unixVer": "-"
354
- * },
355
- * "qq": {
356
- * "hostVer": "-",
357
- * "uniVer": "-",
358
- * "unixVer": "-"
359
- * },
360
- * "kuaishou": {
361
- * "hostVer": "-",
362
- * "uniVer": "-",
363
- * "unixVer": "-"
364
- * },
365
- * "jd": {
366
- * "hostVer": "-",
367
- * "uniVer": "-",
368
- * "unixVer": "-"
369
- * }
370
- * }
371
- * }
372
- */
373
- cancelColor?: string.ColorString | null,
374
- /**
375
- * 确定按钮的文字,默认为"确定"
376
- * @uniPlatform {
377
- * "mp": {
378
- * "weixin": {
379
- * "hostVer": "√",
380
- * "uniVer": "√",
381
- * "unixVer": "4.41"
382
- * },
383
- * "alipay": {
384
- * "hostVer": "-",
385
- * "uniVer": "-",
386
- * "unixVer": "-"
387
- * },
388
- * "baidu": {
389
- * "hostVer": "-",
390
- * "uniVer": "-",
391
- * "unixVer": "-"
392
- * },
393
- * "toutiao": {
394
- * "hostVer": "-",
395
- * "uniVer": "-",
396
- * "unixVer": "-"
397
- * },
398
- * "lark": {
399
- * "hostVer": "-",
400
- * "uniVer": "-",
401
- * "unixVer": "-"
402
- * },
403
- * "qq": {
404
- * "hostVer": "-",
405
- * "uniVer": "-",
406
- * "unixVer": "-"
407
- * },
408
- * "kuaishou": {
409
- * "hostVer": "-",
410
- * "uniVer": "-",
411
- * "unixVer": "-"
412
- * },
413
- * "jd": {
414
- * "hostVer": "-",
415
- * "uniVer": "-",
416
- * "unixVer": "-"
417
- * }
418
- * }
419
- * }
420
- */
421
- confirmText?: string | null,
422
- /**
423
- * 确定按钮的文字颜色
424
- * @uniPlatform {
425
- * "mp": {
426
- * "weixin": {
427
- * "hostVer": "",
428
- * "uniVer": "",
429
- * "unixVer": "4.41"
430
- * },
431
- * "alipay": {
432
- * "hostVer": "-",
433
- * "uniVer": "-",
434
- * "unixVer": "-"
435
- * },
436
- * "baidu": {
437
- * "hostVer": "-",
438
- * "uniVer": "-",
439
- * "unixVer": "-"
440
- * },
441
- * "toutiao": {
442
- * "hostVer": "-",
443
- * "uniVer": "-",
444
- * "unixVer": "-"
445
- * },
446
- * "lark": {
447
- * "hostVer": "-",
448
- * "uniVer": "-",
449
- * "unixVer": "-"
450
- * },
451
- * "qq": {
452
- * "hostVer": "-",
453
- * "uniVer": "-",
454
- * "unixVer": "-"
455
- * },
456
- * "kuaishou": {
457
- * "hostVer": "-",
458
- * "uniVer": "-",
459
- * "unixVer": "-"
460
- * },
461
- * "jd": {
462
- * "hostVer": "-",
463
- * "uniVer": "-",
464
- * "unixVer": "-"
465
- * }
466
- * }
467
- * }
468
- */
469
- confirmColor?: string.ColorString | null,
470
- /**
471
- * 是否显示输入框
472
- * @defaultValue false
473
- * @uniPlatform {
474
- * "mp": {
475
- * "weixin": {
476
- * "hostVer": "√",
477
- * "uniVer": "√",
478
- * "unixVer": "4.41"
479
- * },
480
- * "alipay": {
481
- * "hostVer": "-",
482
- * "uniVer": "-",
483
- * "unixVer": "-"
484
- * },
485
- * "baidu": {
486
- * "hostVer": "-",
487
- * "uniVer": "-",
488
- * "unixVer": "-"
489
- * },
490
- * "toutiao": {
491
- * "hostVer": "-",
492
- * "uniVer": "-",
493
- * "unixVer": "-"
494
- * },
495
- * "lark": {
496
- * "hostVer": "-",
497
- * "uniVer": "-",
498
- * "unixVer": "-"
499
- * },
500
- * "qq": {
501
- * "hostVer": "-",
502
- * "uniVer": "-",
503
- * "unixVer": "-"
504
- * },
505
- * "kuaishou": {
506
- * "hostVer": "-",
507
- * "uniVer": "-",
508
- * "unixVer": "-"
509
- * },
510
- * "jd": {
511
- * "hostVer": "-",
512
- * "uniVer": "-",
513
- * "unixVer": "-"
514
- * }
515
- * }
516
- * }
517
- */
518
- editable?: boolean | null,
519
- /**
520
- * 显示输入框时的提示文本
521
- * @uniPlatform {
522
- * "mp": {
523
- * "weixin": {
524
- * "hostVer": "√",
525
- * "uniVer": "√",
526
- * "unixVer": "4.41"
527
- * },
528
- * "alipay": {
529
- * "hostVer": "-",
530
- * "uniVer": "-",
531
- * "unixVer": "-"
532
- * },
533
- * "baidu": {
534
- * "hostVer": "-",
535
- * "uniVer": "-",
536
- * "unixVer": "-"
537
- * },
538
- * "toutiao": {
539
- * "hostVer": "-",
540
- * "uniVer": "-",
541
- * "unixVer": "-"
542
- * },
543
- * "lark": {
544
- * "hostVer": "-",
545
- * "uniVer": "-",
546
- * "unixVer": "-"
547
- * },
548
- * "qq": {
549
- * "hostVer": "-",
550
- * "uniVer": "-",
551
- * "unixVer": "-"
552
- * },
553
- * "kuaishou": {
554
- * "hostVer": "-",
555
- * "uniVer": "-",
556
- * "unixVer": "-"
557
- * },
558
- * "jd": {
559
- * "hostVer": "-",
560
- * "uniVer": "-",
561
- * "unixVer": "-"
562
- * }
563
- * }
564
- * }
565
- */
566
- placeholderText?: string | null,
567
- /**
568
- * 接口调用成功的回调函数
569
- * @uniPlatform {
570
- * "mp": {
571
- * "weixin": {
572
- * "hostVer": "√",
573
- * "uniVer": "√",
574
- * "unixVer": "4.41"
575
- * },
576
- * "alipay": {
577
- * "hostVer": "-",
578
- * "uniVer": "-",
579
- * "unixVer": "-"
580
- * },
581
- * "baidu": {
582
- * "hostVer": "-",
583
- * "uniVer": "-",
584
- * "unixVer": "-"
585
- * },
586
- * "toutiao": {
587
- * "hostVer": "-",
588
- * "uniVer": "-",
589
- * "unixVer": "-"
590
- * },
591
- * "lark": {
592
- * "hostVer": "-",
593
- * "uniVer": "-",
594
- * "unixVer": "-"
595
- * },
596
- * "qq": {
597
- * "hostVer": "-",
598
- * "uniVer": "-",
599
- * "unixVer": "-"
600
- * },
601
- * "kuaishou": {
602
- * "hostVer": "-",
603
- * "uniVer": "-",
604
- * "unixVer": "-"
605
- * },
606
- * "jd": {
607
- * "hostVer": "-",
608
- * "uniVer": "-",
609
- * "unixVer": "-"
610
- * }
611
- * }
612
- * }
613
- */
614
- success?: UniShowModalSuccessCallback | null,
615
- /**
616
- * 接口调用失败的回调函数
617
- * @uniPlatform {
618
- * "mp": {
619
- * "weixin": {
620
- * "hostVer": "√",
621
- * "uniVer": "",
622
- * "unixVer": "4.41"
623
- * },
624
- * "alipay": {
625
- * "hostVer": "-",
626
- * "uniVer": "-",
627
- * "unixVer": "-"
628
- * },
629
- * "baidu": {
630
- * "hostVer": "-",
631
- * "uniVer": "-",
632
- * "unixVer": "-"
633
- * },
634
- * "toutiao": {
635
- * "hostVer": "-",
636
- * "uniVer": "-",
637
- * "unixVer": "-"
638
- * },
639
- * "lark": {
640
- * "hostVer": "-",
641
- * "uniVer": "-",
642
- * "unixVer": "-"
643
- * },
644
- * "qq": {
645
- * "hostVer": "-",
646
- * "uniVer": "-",
647
- * "unixVer": "-"
648
- * },
649
- * "kuaishou": {
650
- * "hostVer": "-",
651
- * "uniVer": "-",
652
- * "unixVer": "-"
653
- * },
654
- * "jd": {
655
- * "hostVer": "-",
656
- * "uniVer": "-",
657
- * "unixVer": "-"
658
- * }
659
- * }
660
- * }
661
- */
662
- fail?: UniShowModalFailCallback | null,
663
- /**
664
- * 接口调用结束的回调函数(调用成功、失败都会执行)
665
- * @uniPlatform {
666
- * "mp": {
667
- * "weixin": {
668
- * "hostVer": "√",
669
- * "uniVer": "√",
670
- * "unixVer": "4.41"
671
- * },
672
- * "alipay": {
673
- * "hostVer": "-",
674
- * "uniVer": "-",
675
- * "unixVer": "-"
676
- * },
677
- * "baidu": {
678
- * "hostVer": "-",
679
- * "uniVer": "-",
680
- * "unixVer": "-"
681
- * },
682
- * "toutiao": {
683
- * "hostVer": "-",
684
- * "uniVer": "-",
685
- * "unixVer": "-"
686
- * },
687
- * "lark": {
688
- * "hostVer": "-",
689
- * "uniVer": "-",
690
- * "unixVer": "-"
691
- * },
692
- * "qq": {
693
- * "hostVer": "-",
694
- * "uniVer": "-",
695
- * "unixVer": "-"
696
- * },
697
- * "kuaishou": {
698
- * "hostVer": "-",
699
- * "uniVer": "-",
700
- * "unixVer": "-"
701
- * },
702
- * "jd": {
703
- * "hostVer": "-",
704
- * "uniVer": "-",
705
- * "unixVer": "-"
706
- * }
707
- * }
708
- * }
709
- */
710
- complete?: UniShowModalCompleteCallback | null
711
- }
712
- export type ShowModal = (options: ShowModalOptions) => ModalPage | null;
713
-
714
- export type ModalPage = UniPage;
715
-
716
- /**
717
- * HideModal 数据结构定义
718
- */
719
- export type UniHideModalResult = {
720
-
721
- }
722
-
723
- export type HideModalResult = UniHideModalResult
724
-
725
- export type HideModalErrorCode = 4
726
-
727
- export interface UniHideModalFail extends IUniError {
728
- errCode: HideModalErrorCode
729
- }
730
-
731
- export type HideModalFail = UniHideModalFail
732
-
733
- export class HideModalFailImpl extends UniError implements HideModalFail {
734
- override errCode: HideModalErrorCode
735
- constructor(errMsg: string = 'hideModal:fail cancel', errCode: HideModalErrorCode = 4) {
736
- super()
737
- this.errMsg = errMsg
738
- this.errCode = errCode
739
- }
740
- }
741
-
742
- type UniHideModalFailCallback = (result: HideModalFail) => void
743
-
744
- type UniHideModalSuccessCallback = (result: HideModalResult) => void
745
-
746
- type UniHideModalCompleteCallback = (result: any) => void
747
-
748
-
749
- export type HideModalOptions = {
750
- /**
751
- * 期望隐藏的目标modal 如果为null 会关闭当前栈顶全部modal
752
- */
753
- modalPage?: ModalPage | null,
754
- /**
755
- * 接口调用成功的回调函数
756
- */
757
- success?: UniHideModalSuccessCallback | null,
758
- /**
759
- * 接口调用失败的回调函数
760
- */
761
- fail?: UniHideModalFailCallback | null,
762
- /**
763
- * 接口调用结束的回调函数(调用成功、失败都会执行)
764
- */
765
- complete?: UniHideModalCompleteCallback | null
766
- }
767
-
768
- export type HideModal = (options: HideModalOptions | null) => void;
769
-
770
-
771
- export interface Uni {
772
-
773
- /**
774
- * @description 显示模态弹窗,可以只有一个确定按钮,也可以同时有确定和取消按钮。类似于一个API整合了 html 中:alert、confirm。
775
- * @example
776
- ```typescript
777
- uni.showModal({
778
- title: '提示',
779
- content: '这是一个模态弹窗',
780
- success: function (res) {
781
- if (res.confirm) {
782
- console.log('用户点击确定');
783
- } else if (res.cancel) {
784
- console.log('用户点击取消');
785
- }
786
- }
787
- });
788
- ```
789
- * @tutorial_uni_app https://uniapp.dcloud.net.cn/api/ui/prompt.html#showmodal
790
- * @tutorial_uni_app_x https://doc.dcloud.net.cn/uni-app-x/api/prompt.html#showmodal
791
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/prompt.html#showmodal
78
+ * @uniPlatform
79
+ {
80
+ "app": {
81
+ "android": {
82
+ "osVer": "5.0",
83
+ "uniVer": "x",
84
+ "uniUtsPlugin": "x",
85
+ "unixVer": "4.61"
86
+ },
87
+ "ios": {
88
+ "osVer": "12.0",
89
+ "uniVer": "x",
90
+ "uniUtsPlugin": "x",
91
+ "unixVer": "4.61",
92
+ "unixUtsPlugin": "4.61"
93
+ },
94
+ "harmony": {
95
+ "osVer": "3.0",
96
+ "uniVer": "4.23",
97
+ "unixVer": "4.61",
98
+ "unixVaporVer": "5.0"
99
+ }
100
+ },
101
+ "mp": {
102
+ "weixin": {
103
+ "hostVer": "",
104
+ "uniVer": "√",
105
+ "unixVer": "4.41"
106
+ },
107
+ "alipay": {
108
+ "hostVer": "",
109
+ "uniVer": "√",
110
+ "unixVer": "x"
111
+ },
112
+ "baidu": {
113
+ "hostVer": "",
114
+ "uniVer": "√",
115
+ "unixVer": "x"
116
+ },
117
+ "toutiao": {
118
+ "hostVer": "",
119
+ "uniVer": "√",
120
+ "unixVer": "x"
121
+ },
122
+ "lark": {
123
+ "hostVer": "√",
124
+ "uniVer": "√",
125
+ "unixVer": "x"
126
+ },
127
+ "qq": {
128
+ "hostVer": "√",
129
+ "uniVer": "√",
130
+ "unixVer": "x"
131
+ },
132
+ "kuaishou": {
133
+ "hostVer": "√",
134
+ "uniVer": "",
135
+ "unixVer": "x"
136
+ },
137
+ "jd": {
138
+ "hostVer": "√",
139
+ "uniVer": "",
140
+ "unixVer": "x"
141
+ }
142
+ },
143
+ "web": {
144
+ "uniVer": "",
145
+ "unixVer": "4.0"
146
+ }
147
+ }
148
+ */
149
+ content?: string | null
150
+ /**
151
+ * 为 true 时,表示用户点击了取消(用于 Android 系统区分点击蒙层关闭还是点击取消按钮关闭)
152
+ * @uniPlatform
153
+ {
154
+ "app": {
155
+ "android": {
156
+ "osVer": "5.0",
157
+ "uniVer": "x",
158
+ "uniUtsPlugin": "x",
159
+ "unixVer": "4.61"
160
+ },
161
+ "ios": {
162
+ "osVer": "12.0",
163
+ "uniVer": "x",
164
+ "uniUtsPlugin": "x",
165
+ "unixVer": "4.61",
166
+ "unixUtsPlugin": "4.61"
167
+ },
168
+ "harmony": {
169
+ "osVer": "3.0",
170
+ "uniVer": "4.23",
171
+ "unixVer": "4.61",
172
+ "unixVaporVer": "5.0"
173
+ }
174
+ },
175
+ "mp": {
176
+ "weixin": {
177
+ "hostVer": "√",
178
+ "uniVer": "√",
179
+ "unixVer": "4.41"
180
+ },
181
+ "alipay": {
182
+ "hostVer": "",
183
+ "uniVer": "",
184
+ "unixVer": "x"
185
+ },
186
+ "baidu": {
187
+ "hostVer": "",
188
+ "uniVer": "",
189
+ "unixVer": "x"
190
+ },
191
+ "toutiao": {
192
+ "hostVer": "",
193
+ "uniVer": "",
194
+ "unixVer": "x"
195
+ },
196
+ "lark": {
197
+ "hostVer": "",
198
+ "uniVer": "",
199
+ "unixVer": "x"
200
+ },
201
+ "qq": {
202
+ "hostVer": "",
203
+ "uniVer": "",
204
+ "unixVer": "x"
205
+ },
206
+ "kuaishou": {
207
+ "hostVer": "",
208
+ "uniVer": "",
209
+ "unixVer": "x"
210
+ },
211
+ "jd": {
212
+ "hostVer": "",
213
+ "uniVer": "",
214
+ "unixVer": "x"
215
+ }
216
+ },
217
+ "web": {
218
+ "uniVer": "√",
219
+ "unixVer": "4.0"
220
+ }
221
+ }
222
+ */
223
+ cancel: boolean
224
+ /**
225
+ * 为 true 时,表示用户点击了确定按钮
226
+ * @uniPlatform
227
+ {
228
+ "app": {
229
+ "android": {
230
+ "osVer": "5.0",
231
+ "uniVer": "x",
232
+ "uniUtsPlugin": "x",
233
+ "unixVer": "4.61"
234
+ },
235
+ "ios": {
236
+ "osVer": "12.0",
237
+ "uniVer": "x",
238
+ "uniUtsPlugin": "x",
239
+ "unixVer": "4.61",
240
+ "unixUtsPlugin": "4.61"
241
+ },
242
+ "harmony": {
243
+ "osVer": "3.0",
244
+ "uniVer": "4.23",
245
+ "unixVer": "4.61",
246
+ "unixVaporVer": "5.0"
247
+ }
248
+ },
249
+ "mp": {
250
+ "weixin": {
251
+ "hostVer": "√",
252
+ "uniVer": "√",
253
+ "unixVer": "4.41"
254
+ },
255
+ "alipay": {
256
+ "hostVer": "",
257
+ "uniVer": "√",
258
+ "unixVer": "x"
259
+ },
260
+ "baidu": {
261
+ "hostVer": "",
262
+ "uniVer": "√",
263
+ "unixVer": "x"
264
+ },
265
+ "toutiao": {
266
+ "hostVer": "",
267
+ "uniVer": "√",
268
+ "unixVer": "x"
269
+ },
270
+ "lark": {
271
+ "hostVer": "",
272
+ "uniVer": "√",
273
+ "unixVer": "x"
274
+ },
275
+ "qq": {
276
+ "hostVer": "",
277
+ "uniVer": "√",
278
+ "unixVer": "x"
279
+ },
280
+ "kuaishou": {
281
+ "hostVer": "",
282
+ "uniVer": "√",
283
+ "unixVer": "x"
284
+ },
285
+ "jd": {
286
+ "hostVer": "",
287
+ "uniVer": "√",
288
+ "unixVer": "x"
289
+ }
290
+ },
291
+ "web": {
292
+ "uniVer": "√",
293
+ "unixVer": "4.0"
294
+ }
295
+ }
296
+ */
297
+ confirm: boolean
298
+ }
299
+
300
+ export type ShowModalErrorCode = 4
301
+
302
+ export interface ShowModalFail extends IUniError {
303
+ errCode: ShowModalErrorCode
304
+ }
305
+
306
+ export class ShowModalSuccessImpl implements ShowModalSuccess {
307
+ errMsg: string
308
+ content?: string | null
309
+ cancel: boolean
310
+ confirm: boolean
311
+ constructor(cancel: boolean, confirm: boolean, content: string | null = null, errMsg: string = 'showModal:ok') {
312
+ this.errMsg = errMsg
313
+ this.content = content
314
+ this.cancel = cancel
315
+ this.confirm = confirm
316
+ }
317
+ }
318
+
319
+ export class ShowModalFailImpl extends UniError implements ShowModalFail {
320
+ override errCode: ShowModalErrorCode
321
+ constructor(errMsg: string = 'showModal:fail cancel', errCode: ShowModalErrorCode = 4) {
322
+ super()
323
+ this.errMsg = errMsg
324
+ this.errCode = errCode
325
+ }
326
+ }
327
+
328
+ type ShowModalFailCallback = (result: ShowModalFail) => void
329
+
330
+ type ShowModalSuccessCallback = (result: ShowModalSuccess) => void
331
+
332
+ type ShowModalComplete = any
333
+
334
+ type UniShowModalCompleteCallback = (result: ShowModalComplete) => void
335
+
336
+ export type ShowModalOptions = {
337
+ /**
338
+ * 提示的标题
339
+ * @uniPlatform
340
+ {
341
+ "app": {
342
+ "android": {
343
+ "osVer": "5.0",
344
+ "uniVer": "x",
345
+ "uniUtsPlugin": "x",
346
+ "unixVer": "4.61"
347
+ },
348
+ "ios": {
349
+ "osVer": "12.0",
350
+ "uniVer": "x",
351
+ "uniUtsPlugin": "x",
352
+ "unixVer": "4.61",
353
+ "unixUtsPlugin": "4.61"
354
+ },
355
+ "harmony": {
356
+ "osVer": "3.0",
357
+ "uniVer": "4.23",
358
+ "unixVer": "4.61",
359
+ "unixVaporVer": "5.0"
360
+ }
361
+ },
362
+ "mp": {
363
+ "weixin": {
364
+ "hostVer": "√",
365
+ "uniVer": "√",
366
+ "unixVer": "4.41"
367
+ },
368
+ "alipay": {
369
+ "hostVer": "√",
370
+ "uniVer": "√",
371
+ "unixVer": "x"
372
+ },
373
+ "baidu": {
374
+ "hostVer": "√",
375
+ "uniVer": "√",
376
+ "unixVer": "x"
377
+ },
378
+ "toutiao": {
379
+ "hostVer": "√",
380
+ "uniVer": "√",
381
+ "unixVer": "x"
382
+ },
383
+ "lark": {
384
+ "hostVer": "√",
385
+ "uniVer": "√",
386
+ "unixVer": "x"
387
+ },
388
+ "qq": {
389
+ "hostVer": "√",
390
+ "uniVer": "√",
391
+ "unixVer": "x"
392
+ },
393
+ "kuaishou": {
394
+ "hostVer": "√",
395
+ "uniVer": "√",
396
+ "unixVer": "x"
397
+ },
398
+ "jd": {
399
+ "hostVer": "√",
400
+ "uniVer": "",
401
+ "unixVer": "x"
402
+ }
403
+ },
404
+ "web": {
405
+ "uniVer": "√",
406
+ "unixVer": "4.0"
407
+ }
408
+ }
409
+ */
410
+ title?: string | null,
411
+ /**
412
+ * 提示的内容
413
+ * @uniPlatform
414
+ {
415
+ "app": {
416
+ "android": {
417
+ "osVer": "5.0",
418
+ "uniVer": "x",
419
+ "uniUtsPlugin": "x",
420
+ "unixVer": "4.61"
421
+ },
422
+ "ios": {
423
+ "osVer": "12.0",
424
+ "uniVer": "x",
425
+ "uniUtsPlugin": "x",
426
+ "unixVer": "4.61",
427
+ "unixUtsPlugin": "4.61"
428
+ },
429
+ "harmony": {
430
+ "osVer": "3.0",
431
+ "uniVer": "4.23",
432
+ "unixVer": "4.61",
433
+ "unixVaporVer": "5.0"
434
+ }
435
+ },
436
+ "mp": {
437
+ "weixin": {
438
+ "hostVer": "√",
439
+ "uniVer": "",
440
+ "unixVer": "4.41"
441
+ },
442
+ "alipay": {
443
+ "hostVer": "√",
444
+ "uniVer": "√",
445
+ "unixVer": "x"
446
+ },
447
+ "baidu": {
448
+ "hostVer": "",
449
+ "uniVer": "√",
450
+ "unixVer": "x"
451
+ },
452
+ "toutiao": {
453
+ "hostVer": "√",
454
+ "uniVer": "",
455
+ "unixVer": "x"
456
+ },
457
+ "lark": {
458
+ "hostVer": "",
459
+ "uniVer": "",
460
+ "unixVer": "x"
461
+ },
462
+ "qq": {
463
+ "hostVer": "",
464
+ "uniVer": "",
465
+ "unixVer": "x"
466
+ },
467
+ "kuaishou": {
468
+ "hostVer": "",
469
+ "uniVer": "",
470
+ "unixVer": "x"
471
+ },
472
+ "jd": {
473
+ "hostVer": "",
474
+ "uniVer": "",
475
+ "unixVer": "x"
476
+ }
477
+ },
478
+ "web": {
479
+ "uniVer": "",
480
+ "unixVer": "4.0"
481
+ }
482
+ }
483
+ */
484
+ content?: string | null,
485
+ /**
486
+ * @defaultValue true
487
+ * @default true
488
+ * 是否显示取消按钮,默认为 true
489
+ * @uniPlatform
490
+ {
491
+ "app": {
492
+ "android": {
493
+ "osVer": "5.0",
494
+ "uniVer": "x",
495
+ "uniUtsPlugin": "x",
496
+ "unixVer": "4.61"
497
+ },
498
+ "ios": {
499
+ "osVer": "12.0",
500
+ "uniVer": "x",
501
+ "uniUtsPlugin": "x",
502
+ "unixVer": "4.61",
503
+ "unixUtsPlugin": "4.61"
504
+ },
505
+ "harmony": {
506
+ "osVer": "3.0",
507
+ "uniVer": "4.23",
508
+ "unixVer": "4.61",
509
+ "unixVaporVer": "5.0"
510
+ }
511
+ },
512
+ "mp": {
513
+ "weixin": {
514
+ "hostVer": "√",
515
+ "uniVer": "",
516
+ "unixVer": "4.41"
517
+ },
518
+ "alipay": {
519
+ "hostVer": "√",
520
+ "uniVer": "",
521
+ "unixVer": "x"
522
+ },
523
+ "baidu": {
524
+ "hostVer": "√",
525
+ "uniVer": "",
526
+ "unixVer": "x"
527
+ },
528
+ "toutiao": {
529
+ "hostVer": "√",
530
+ "uniVer": "",
531
+ "unixVer": "x"
532
+ },
533
+ "lark": {
534
+ "hostVer": "√",
535
+ "uniVer": "",
536
+ "unixVer": "x"
537
+ },
538
+ "qq": {
539
+ "hostVer": "√",
540
+ "uniVer": "√",
541
+ "unixVer": "x"
542
+ },
543
+ "kuaishou": {
544
+ "hostVer": "√",
545
+ "uniVer": "√",
546
+ "unixVer": "x"
547
+ },
548
+ "jd": {
549
+ "hostVer": "√",
550
+ "uniVer": "√",
551
+ "unixVer": "x"
552
+ }
553
+ },
554
+ "web": {
555
+ "uniVer": "",
556
+ "unixVer": "4.0"
557
+ }
558
+ }
559
+ */
560
+ showCancel?: boolean | null,
561
+ /**
562
+ * 取消按钮的文字,默认为"取消"
563
+ * @uniPlatform
564
+ {
565
+ "app": {
566
+ "android": {
567
+ "osVer": "5.0",
568
+ "uniVer": "x",
569
+ "uniUtsPlugin": "x",
570
+ "unixVer": "4.61"
571
+ },
572
+ "ios": {
573
+ "osVer": "12.0",
574
+ "uniVer": "x",
575
+ "uniUtsPlugin": "x",
576
+ "unixVer": "4.61",
577
+ "unixUtsPlugin": "4.61"
578
+ },
579
+ "harmony": {
580
+ "osVer": "3.0",
581
+ "uniVer": "4.23",
582
+ "unixVer": "4.61",
583
+ "unixVaporVer": "5.0"
584
+ }
585
+ },
586
+ "mp": {
587
+ "weixin": {
588
+ "hostVer": "√",
589
+ "uniVer": "√",
590
+ "unixVer": "4.41"
591
+ },
592
+ "alipay": {
593
+ "hostVer": "√",
594
+ "uniVer": "√",
595
+ "unixVer": "x"
596
+ },
597
+ "baidu": {
598
+ "hostVer": "√",
599
+ "uniVer": "",
600
+ "unixVer": "x"
601
+ },
602
+ "toutiao": {
603
+ "hostVer": "",
604
+ "uniVer": "",
605
+ "unixVer": "x"
606
+ },
607
+ "lark": {
608
+ "hostVer": "",
609
+ "uniVer": "",
610
+ "unixVer": "x"
611
+ },
612
+ "qq": {
613
+ "hostVer": "",
614
+ "uniVer": "",
615
+ "unixVer": "x"
616
+ },
617
+ "kuaishou": {
618
+ "hostVer": "",
619
+ "uniVer": "",
620
+ "unixVer": "x"
621
+ },
622
+ "jd": {
623
+ "hostVer": "",
624
+ "uniVer": "",
625
+ "unixVer": "x"
626
+ }
627
+ },
628
+ "web": {
629
+ "uniVer": "",
630
+ "unixVer": "4.0"
631
+ }
632
+ }
633
+ */
634
+ cancelText?: string | null,
635
+ /**
636
+ * 取消按钮的文字颜色,默认为"#000000"
637
+ * @uniPlatform
638
+ {
639
+ "app": {
640
+ "android": {
641
+ "osVer": "5.0",
642
+ "uniVer": "x",
643
+ "uniUtsPlugin": "x",
644
+ "unixVer": "4.61"
645
+ },
646
+ "ios": {
647
+ "osVer": "12.0",
648
+ "uniVer": "x",
649
+ "uniUtsPlugin": "x",
650
+ "unixVer": "4.61",
651
+ "unixUtsPlugin": "4.61"
652
+ },
653
+ "harmony": {
654
+ "osVer": "3.0",
655
+ "uniVer": "4.23",
656
+ "unixVer": "4.61",
657
+ "unixVaporVer": "5.0"
658
+ }
659
+ },
660
+ "mp": {
661
+ "weixin": {
662
+ "hostVer": "",
663
+ "uniVer": "√",
664
+ "unixVer": "4.41"
665
+ },
666
+ "alipay": {
667
+ "hostVer": "",
668
+ "uniVer": "√",
669
+ "unixVer": "x"
670
+ },
671
+ "baidu": {
672
+ "hostVer": "",
673
+ "uniVer": "√",
674
+ "unixVer": "x"
675
+ },
676
+ "toutiao": {
677
+ "hostVer": "",
678
+ "uniVer": "√",
679
+ "unixVer": "x"
680
+ },
681
+ "lark": {
682
+ "hostVer": "",
683
+ "uniVer": "√",
684
+ "unixVer": "x"
685
+ },
686
+ "qq": {
687
+ "hostVer": "√",
688
+ "uniVer": "√",
689
+ "unixVer": "x"
690
+ },
691
+ "kuaishou": {
692
+ "hostVer": "√",
693
+ "uniVer": "√",
694
+ "unixVer": "x"
695
+ },
696
+ "jd": {
697
+ "hostVer": "√",
698
+ "uniVer": "",
699
+ "unixVer": "x"
700
+ }
701
+ },
702
+ "web": {
703
+ "uniVer": "",
704
+ "unixVer": "4.0"
705
+ }
706
+ }
707
+ */
708
+ cancelColor?: string.ColorString | null,
709
+ /**
710
+ * 确定按钮的文字,默认为"确定"
711
+ * @uniPlatform
712
+ {
713
+ "app": {
714
+ "android": {
715
+ "osVer": "5.0",
716
+ "uniVer": "x",
717
+ "uniUtsPlugin": "x",
718
+ "unixVer": "4.61"
719
+ },
720
+ "ios": {
721
+ "osVer": "12.0",
722
+ "uniVer": "x",
723
+ "uniUtsPlugin": "x",
724
+ "unixVer": "4.61",
725
+ "unixUtsPlugin": "4.61"
726
+ },
727
+ "harmony": {
728
+ "osVer": "3.0",
729
+ "uniVer": "4.23",
730
+ "unixVer": "4.61",
731
+ "unixVaporVer": "5.0"
732
+ }
733
+ },
734
+ "mp": {
735
+ "weixin": {
736
+ "hostVer": "√",
737
+ "uniVer": "√",
738
+ "unixVer": "4.41"
739
+ },
740
+ "alipay": {
741
+ "hostVer": "√",
742
+ "uniVer": "√",
743
+ "unixVer": "x"
744
+ },
745
+ "baidu": {
746
+ "hostVer": "",
747
+ "uniVer": "",
748
+ "unixVer": "x"
749
+ },
750
+ "toutiao": {
751
+ "hostVer": "",
752
+ "uniVer": "",
753
+ "unixVer": "x"
754
+ },
755
+ "lark": {
756
+ "hostVer": "",
757
+ "uniVer": "",
758
+ "unixVer": "x"
759
+ },
760
+ "qq": {
761
+ "hostVer": "",
762
+ "uniVer": "",
763
+ "unixVer": "x"
764
+ },
765
+ "kuaishou": {
766
+ "hostVer": "",
767
+ "uniVer": "",
768
+ "unixVer": "x"
769
+ },
770
+ "jd": {
771
+ "hostVer": "",
772
+ "uniVer": "",
773
+ "unixVer": "x"
774
+ }
775
+ },
776
+ "web": {
777
+ "uniVer": "",
778
+ "unixVer": "4.0"
779
+ }
780
+ }
781
+ */
782
+ confirmText?: string | null,
783
+ /**
784
+ * 确定按钮的文字颜色
785
+ * @uniPlatform
786
+ {
787
+ "app": {
788
+ "android": {
789
+ "osVer": "5.0",
790
+ "uniVer": "x",
791
+ "uniUtsPlugin": "x",
792
+ "unixVer": "4.61"
793
+ },
794
+ "ios": {
795
+ "osVer": "12.0",
796
+ "uniVer": "x",
797
+ "uniUtsPlugin": "x",
798
+ "unixVer": "4.61",
799
+ "unixUtsPlugin": "4.61"
800
+ },
801
+ "harmony": {
802
+ "osVer": "3.0",
803
+ "uniVer": "4.23",
804
+ "unixVer": "4.61",
805
+ "unixVaporVer": "5.0"
806
+ }
807
+ },
808
+ "mp": {
809
+ "weixin": {
810
+ "hostVer": "√",
811
+ "uniVer": "√",
812
+ "unixVer": "4.41"
813
+ },
814
+ "alipay": {
815
+ "hostVer": "√",
816
+ "uniVer": "√",
817
+ "unixVer": "x"
818
+ },
819
+ "baidu": {
820
+ "hostVer": "√",
821
+ "uniVer": "√",
822
+ "unixVer": "x"
823
+ },
824
+ "toutiao": {
825
+ "hostVer": "√",
826
+ "uniVer": "√",
827
+ "unixVer": "x"
828
+ },
829
+ "lark": {
830
+ "hostVer": "√",
831
+ "uniVer": "√",
832
+ "unixVer": "x"
833
+ },
834
+ "qq": {
835
+ "hostVer": "√",
836
+ "uniVer": "√",
837
+ "unixVer": "x"
838
+ },
839
+ "kuaishou": {
840
+ "hostVer": "√",
841
+ "uniVer": "√",
842
+ "unixVer": "x"
843
+ },
844
+ "jd": {
845
+ "hostVer": "√",
846
+ "uniVer": "√",
847
+ "unixVer": "x"
848
+ }
849
+ },
850
+ "web": {
851
+ "uniVer": "√",
852
+ "unixVer": "4.0"
853
+ }
854
+ }
855
+ */
856
+ confirmColor?: string.ColorString | null,
857
+ /**
858
+ * 是否显示输入框
859
+ * @uniPlatform
860
+ {
861
+ "app": {
862
+ "android": {
863
+ "osVer": "5.0",
864
+ "uniVer": "x",
865
+ "uniUtsPlugin": "x",
866
+ "unixVer": "4.61"
867
+ },
868
+ "ios": {
869
+ "osVer": "12.0",
870
+ "uniVer": "x",
871
+ "uniUtsPlugin": "x",
872
+ "unixVer": "4.61",
873
+ "unixUtsPlugin": "4.61"
874
+ },
875
+ "harmony": {
876
+ "osVer": "3.0",
877
+ "uniVer": "4.23",
878
+ "unixVer": "4.61",
879
+ "unixVaporVer": "5.0"
880
+ }
881
+ },
882
+ "mp": {
883
+ "weixin": {
884
+ "hostVer": "√",
885
+ "uniVer": "√",
886
+ "unixVer": "4.41"
887
+ },
888
+ "alipay": {
889
+ "hostVer": "√",
890
+ "uniVer": "√",
891
+ "unixVer": "x"
892
+ },
893
+ "baidu": {
894
+ "hostVer": "√",
895
+ "uniVer": "√",
896
+ "unixVer": "x"
897
+ },
898
+ "toutiao": {
899
+ "hostVer": "√",
900
+ "uniVer": "√",
901
+ "unixVer": "x"
902
+ },
903
+ "lark": {
904
+ "hostVer": "√",
905
+ "uniVer": "√",
906
+ "unixVer": "x"
907
+ },
908
+ "qq": {
909
+ "hostVer": "√",
910
+ "uniVer": "√",
911
+ "unixVer": "x"
912
+ },
913
+ "kuaishou": {
914
+ "hostVer": "√",
915
+ "uniVer": "√",
916
+ "unixVer": "x"
917
+ },
918
+ "jd": {
919
+ "hostVer": "√",
920
+ "uniVer": "√",
921
+ "unixVer": "x"
922
+ }
923
+ },
924
+ "web": {
925
+ "uniVer": "√",
926
+ "unixVer": "4.0"
927
+ }
928
+ }
929
+ * @defaultValue false
930
+ */
931
+ editable?: boolean | null,
932
+ /**
933
+ * 显示输入框时的提示文本
934
+ * @uniPlatform
935
+ {
936
+ "app": {
937
+ "android": {
938
+ "osVer": "5.0",
939
+ "uniVer": "x",
940
+ "uniUtsPlugin": "x",
941
+ "unixVer": "4.61"
942
+ },
943
+ "ios": {
944
+ "osVer": "12.0",
945
+ "uniVer": "x",
946
+ "uniUtsPlugin": "x",
947
+ "unixVer": "4.61",
948
+ "unixUtsPlugin": "4.61"
949
+ },
950
+ "harmony": {
951
+ "osVer": "3.0",
952
+ "uniVer": "4.23",
953
+ "unixVer": "4.61",
954
+ "unixVaporVer": "5.0"
955
+ }
956
+ },
957
+ "mp": {
958
+ "weixin": {
959
+ "hostVer": "√",
960
+ "uniVer": "√",
961
+ "unixVer": "4.41"
962
+ },
963
+ "alipay": {
964
+ "hostVer": "√",
965
+ "uniVer": "√",
966
+ "unixVer": "x"
967
+ },
968
+ "baidu": {
969
+ "hostVer": "√",
970
+ "uniVer": "√",
971
+ "unixVer": "x"
972
+ },
973
+ "toutiao": {
974
+ "hostVer": "√",
975
+ "uniVer": "√",
976
+ "unixVer": "x"
977
+ },
978
+ "lark": {
979
+ "hostVer": "√",
980
+ "uniVer": "√",
981
+ "unixVer": "x"
982
+ },
983
+ "qq": {
984
+ "hostVer": "√",
985
+ "uniVer": "√",
986
+ "unixVer": "x"
987
+ },
988
+ "kuaishou": {
989
+ "hostVer": "√",
990
+ "uniVer": "√",
991
+ "unixVer": "x"
992
+ },
993
+ "jd": {
994
+ "hostVer": "√",
995
+ "uniVer": "√",
996
+ "unixVer": "x"
997
+ }
998
+ },
999
+ "web": {
1000
+ "uniVer": "√",
1001
+ "unixVer": "4.0"
1002
+ }
1003
+ }
1004
+ */
1005
+ placeholderText?: string | null,
1006
+ /**
1007
+ * 接口调用成功的回调函数
1008
+ * @uniPlatform
1009
+ {
1010
+ "app": {
1011
+ "android": {
1012
+ "osVer": "5.0",
1013
+ "uniVer": "x",
1014
+ "uniUtsPlugin": "x",
1015
+ "unixVer": "4.61"
1016
+ },
1017
+ "ios": {
1018
+ "osVer": "12.0",
1019
+ "uniVer": "x",
1020
+ "uniUtsPlugin": "x",
1021
+ "unixVer": "4.61",
1022
+ "unixUtsPlugin": "4.61"
1023
+ },
1024
+ "harmony": {
1025
+ "osVer": "3.0",
1026
+ "uniVer": "4.23",
1027
+ "unixVer": "4.61",
1028
+ "unixVaporVer": "5.0"
1029
+ }
1030
+ },
1031
+ "mp": {
1032
+ "weixin": {
1033
+ "hostVer": "√",
1034
+ "uniVer": "√",
1035
+ "unixVer": "4.41"
1036
+ },
1037
+ "alipay": {
1038
+ "hostVer": "√",
1039
+ "uniVer": "√",
1040
+ "unixVer": "x"
1041
+ },
1042
+ "baidu": {
1043
+ "hostVer": "√",
1044
+ "uniVer": "√",
1045
+ "unixVer": "x"
1046
+ },
1047
+ "toutiao": {
1048
+ "hostVer": "√",
1049
+ "uniVer": "√",
1050
+ "unixVer": "x"
1051
+ },
1052
+ "lark": {
1053
+ "hostVer": "√",
1054
+ "uniVer": "√",
1055
+ "unixVer": "x"
1056
+ },
1057
+ "qq": {
1058
+ "hostVer": "√",
1059
+ "uniVer": "√",
1060
+ "unixVer": "x"
1061
+ },
1062
+ "kuaishou": {
1063
+ "hostVer": "√",
1064
+ "uniVer": "√",
1065
+ "unixVer": "x"
1066
+ },
1067
+ "jd": {
1068
+ "hostVer": "√",
1069
+ "uniVer": "√",
1070
+ "unixVer": "x"
1071
+ }
1072
+ },
1073
+ "web": {
1074
+ "uniVer": "√",
1075
+ "unixVer": "4.0"
1076
+ }
1077
+ }
1078
+ */
1079
+ success?: ShowModalSuccessCallback | null,
1080
+ /**
1081
+ * 接口调用失败的回调函数
1082
+ * @uniPlatform
1083
+ {
1084
+ "app": {
1085
+ "android": {
1086
+ "osVer": "5.0",
1087
+ "uniVer": "x",
1088
+ "uniUtsPlugin": "x",
1089
+ "unixVer": "4.61"
1090
+ },
1091
+ "ios": {
1092
+ "osVer": "12.0",
1093
+ "uniVer": "x",
1094
+ "uniUtsPlugin": "x",
1095
+ "unixVer": "4.61",
1096
+ "unixUtsPlugin": "4.61"
1097
+ },
1098
+ "harmony": {
1099
+ "osVer": "3.0",
1100
+ "uniVer": "4.23",
1101
+ "unixVer": "4.61",
1102
+ "unixVaporVer": "5.0"
1103
+ }
1104
+ },
1105
+ "mp": {
1106
+ "weixin": {
1107
+ "hostVer": "√",
1108
+ "uniVer": "√",
1109
+ "unixVer": "4.41"
1110
+ },
1111
+ "alipay": {
1112
+ "hostVer": "√",
1113
+ "uniVer": "√",
1114
+ "unixVer": "x"
1115
+ },
1116
+ "baidu": {
1117
+ "hostVer": "√",
1118
+ "uniVer": "√",
1119
+ "unixVer": "x"
1120
+ },
1121
+ "toutiao": {
1122
+ "hostVer": "√",
1123
+ "uniVer": "√",
1124
+ "unixVer": "x"
1125
+ },
1126
+ "lark": {
1127
+ "hostVer": "√",
1128
+ "uniVer": "√",
1129
+ "unixVer": "x"
1130
+ },
1131
+ "qq": {
1132
+ "hostVer": "√",
1133
+ "uniVer": "√",
1134
+ "unixVer": "x"
1135
+ },
1136
+ "kuaishou": {
1137
+ "hostVer": "√",
1138
+ "uniVer": "√",
1139
+ "unixVer": "x"
1140
+ },
1141
+ "jd": {
1142
+ "hostVer": "√",
1143
+ "uniVer": "√",
1144
+ "unixVer": "x"
1145
+ }
1146
+ },
1147
+ "web": {
1148
+ "uniVer": "√",
1149
+ "unixVer": "4.0"
1150
+ }
1151
+ }
1152
+ */
1153
+ fail?: ShowModalFailCallback | null,
1154
+ /**
1155
+ * 接口调用结束的回调函数(调用成功、失败都会执行)
1156
+ * @uniPlatform
1157
+ {
1158
+ "app": {
1159
+ "android": {
1160
+ "osVer": "5.0",
1161
+ "uniVer": "x",
1162
+ "uniUtsPlugin": "x",
1163
+ "unixVer": "4.61"
1164
+ },
1165
+ "ios": {
1166
+ "osVer": "12.0",
1167
+ "uniVer": "x",
1168
+ "uniUtsPlugin": "x",
1169
+ "unixVer": "4.61",
1170
+ "unixUtsPlugin": "4.61"
1171
+ },
1172
+ "harmony": {
1173
+ "osVer": "3.0",
1174
+ "uniVer": "4.23",
1175
+ "unixVer": "4.61",
1176
+ "unixVaporVer": "5.0"
1177
+ }
1178
+ },
1179
+ "mp": {
1180
+ "weixin": {
1181
+ "hostVer": "√",
1182
+ "uniVer": "√",
1183
+ "unixVer": "4.41"
1184
+ },
1185
+ "alipay": {
1186
+ "hostVer": "√",
1187
+ "uniVer": "√",
1188
+ "unixVer": "x"
1189
+ },
1190
+ "baidu": {
1191
+ "hostVer": "√",
1192
+ "uniVer": "√",
1193
+ "unixVer": "x"
1194
+ },
1195
+ "toutiao": {
1196
+ "hostVer": "√",
1197
+ "uniVer": "√",
1198
+ "unixVer": "x"
1199
+ },
1200
+ "lark": {
1201
+ "hostVer": "√",
1202
+ "uniVer": "√",
1203
+ "unixVer": "x"
1204
+ },
1205
+ "qq": {
1206
+ "hostVer": "√",
1207
+ "uniVer": "√",
1208
+ "unixVer": "x"
1209
+ },
1210
+ "kuaishou": {
1211
+ "hostVer": "√",
1212
+ "uniVer": "√",
1213
+ "unixVer": "x"
1214
+ },
1215
+ "jd": {
1216
+ "hostVer": "√",
1217
+ "uniVer": "√",
1218
+ "unixVer": "x"
1219
+ }
1220
+ },
1221
+ "web": {
1222
+ "uniVer": "√",
1223
+ "unixVer": "4.0"
1224
+ }
1225
+ }
1226
+ */
1227
+ complete?: UniShowModalCompleteCallback | null
1228
+ }
1229
+
1230
+ export type ShowModal = (options?: ShowModalOptions | null) => ModalPage | null
1231
+
1232
+ export type ModalPage = UniPage
1233
+
1234
+ export interface HideModalSuccess {
1235
+ errMsg: string
1236
+ }
1237
+
1238
+ export type HideModalErrorCode = 4
1239
+
1240
+ export interface HideModalFail extends IUniError {
1241
+ errCode: HideModalErrorCode
1242
+ }
1243
+
1244
+ export class HideModalSuccessImpl implements HideModalSuccess {
1245
+ errMsg: string
1246
+ constructor(errMsg: string = 'hideModal:ok') {
1247
+ this.errMsg = errMsg
1248
+ }
1249
+ }
1250
+
1251
+ export class HideModalFailImpl extends UniError implements HideModalFail {
1252
+ override errCode: HideModalErrorCode
1253
+ constructor(errMsg: string = 'hideModal:fail cancel', errCode: HideModalErrorCode = 4) {
1254
+ super()
1255
+ this.errMsg = errMsg
1256
+ this.errCode = errCode
1257
+ }
1258
+ }
1259
+
1260
+ type UniHideModalFailCallback = (result: HideModalFail) => void
1261
+
1262
+ type UniHideModalSuccessCallback = (result: HideModalSuccess) => void
1263
+
1264
+ type HideModalComplete = any
1265
+
1266
+ type UniHideModalCompleteCallback = (result: HideModalComplete) => void
1267
+
1268
+ export type HideModalOptions = {
1269
+ /**
1270
+ * 期望隐藏的目标 modal,如果为 null 会关闭当前栈顶全部 modal
792
1271
  * @uniPlatform {
793
- * "app": {
794
- * "android": {
795
- * "osVer": "5.0",
796
- * "uniVer": "",
797
- * "uniUtsPlugin": "x",
798
- * "unixVer": "3.91"
799
- * },
800
- * "ios": {
801
- * "osVer": "12.0",
802
- * "uniVer": "",
803
- * "uniUtsPlugin": "x",
804
- * "unixVer": "4.11",
805
- * "unixUtsPlugin": "4.11"
806
- * },
807
- * "harmony": {
808
- * "osVer": "3.0",
809
- * "uniVer": "4.23",
810
- * "unixVer": "4.61",
811
- * "unixVaporVer": "5.0"
812
- * }
813
- * },
814
- * "mp": {
815
- * "weixin": {
816
- * "hostVer": "1.9.6",
817
- * "uniVer": "",
818
- * "unixVer": "4.41"
819
- * },
820
- * "alipay": {
821
- * "hostVer": "",
822
- * "uniVer": "",
823
- * "unixVer": "x"
824
- * },
825
- * "baidu": {
826
- * "hostVer": "",
827
- * "uniVer": "",
828
- * "unixVer": "x"
829
- * },
830
- * "toutiao": {
831
- * "hostVer": "",
832
- * "uniVer": "",
833
- * "unixVer": "x"
834
- * },
835
- * "lark": {
836
- * "hostVer": "",
837
- * "uniVer": "",
838
- * "unixVer": "x"
839
- * },
840
- * "qq": {
841
- * "hostVer": "",
842
- * "uniVer": "",
843
- * "unixVer": "x"
844
- * },
845
- * "kuaishou": {
846
- * "hostVer": "",
847
- * "uniVer": "",
848
- * "unixVer": "x"
849
- * },
850
- * "jd": {
851
- * "hostVer": "",
852
- * "uniVer": "",
853
- * "unixVer": "x"
854
- * }
855
- * },
856
- * "web": {
857
- * "uniVer": "√",
858
- * "unixVer": "4.0"
859
- * }
860
- * }
861
- * @tutorial_weixin https://developers.weixin.qq.com/miniprogram/dev/api/ui/interaction/wx.showModal.html
862
- */
863
- showModal(options: ShowModalOptions): ModalPage | null,
864
-
865
- /**
866
- * @description 隐藏已弹出的对话框实例,如果 `modalPage` 参数为空,则隐藏当前栈顶全部对话框
867
- * @example
868
- ```typescript
869
- uni.hideModal({
870
- modalPage:null,
871
- success: function (res) {
872
- }
873
- });
874
- ```
875
- * @tutorial_uni_app https://uniapp.dcloud.net.cn/api/ui/prompt.html#hidemodal
876
- * @tutorial_uni_app_x https://doc.dcloud.net.cn/uni-app-x/api/prompt.html#hidemodal
877
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/prompt.html#hidemodal
878
- * @uniPlatform
879
- {
880
- "app": {
881
- "android": {
882
- "osVer": "5.0",
883
- "uniVer": "x",
884
- "uniUtsPlugin": "x",
885
- "unixVer": "4.61"
886
- },
887
- "ios": {
888
- "osVer": "12.0",
889
- "uniVer": "x",
890
- "uniUtsPlugin": "x",
891
- "unixVer": "4.61",
892
- "unixUtsPlugin": "4.61"
893
- },
894
- "harmony": {
895
- "osVer": "x",
896
- "uniVer": "x",
897
- "unixVer": "x"
898
- }
899
- },
900
- "web": {
901
- "uniVer": "x",
902
- "unixVer": "4.61"
903
- }
904
- }
905
- */
906
- hideModal(options: HideModalOptions | null):void
907
- }
1272
+ "app": {
1273
+ "android": {
1274
+ "osVer": "5.0",
1275
+ "uniVer": "x",
1276
+ "uniUtsPlugin": "x",
1277
+ "unixVer": "4.61"
1278
+ },
1279
+ "ios": {
1280
+ "osVer": "12.0",
1281
+ "uniVer": "x",
1282
+ "uniUtsPlugin": "x",
1283
+ "unixVer": "4.61",
1284
+ "unixUtsPlugin": "4.61"
1285
+ },
1286
+ "harmony": {
1287
+ "osVer": "3.0",
1288
+ "uniVer": "4.23",
1289
+ "unixVer": "4.61",
1290
+ "unixVaporVer": "5.0"
1291
+ }
1292
+ },
1293
+ "mp": {
1294
+ "weixin": {
1295
+ "hostVer": "x",
1296
+ "uniVer": "x",
1297
+ "unixVer": "x"
1298
+ },
1299
+ "alipay": {
1300
+ "hostVer": "x",
1301
+ "uniVer": "x",
1302
+ "unixVer": "x"
1303
+ },
1304
+ "baidu": {
1305
+ "hostVer": "x",
1306
+ "uniVer": "x",
1307
+ "unixVer": "x"
1308
+ },
1309
+ "toutiao": {
1310
+ "hostVer": "x",
1311
+ "uniVer": "x",
1312
+ "unixVer": "x"
1313
+ },
1314
+ "lark": {
1315
+ "hostVer": "x",
1316
+ "uniVer": "x",
1317
+ "unixVer": "x"
1318
+ },
1319
+ "qq": {
1320
+ "hostVer": "x",
1321
+ "uniVer": "x",
1322
+ "unixVer": "x"
1323
+ },
1324
+ "kuaishou": {
1325
+ "hostVer": "x",
1326
+ "uniVer": "x",
1327
+ "unixVer": "x"
1328
+ },
1329
+ "jd": {
1330
+ "hostVer": "x",
1331
+ "uniVer": "x",
1332
+ "unixVer": "x"
1333
+ }
1334
+ },
1335
+ "web": {
1336
+ "uniVer": "√",
1337
+ "unixVer": "4.0"
1338
+ }
1339
+ }
1340
+ */
1341
+ modalPage?: ModalPage | null,
1342
+ /**
1343
+ * 接口调用成功的回调函数
1344
+ * @uniPlatform {
1345
+ "app": {
1346
+ "android": {
1347
+ "osVer": "5.0",
1348
+ "uniVer": "x",
1349
+ "uniUtsPlugin": "x",
1350
+ "unixVer": "4.61"
1351
+ },
1352
+ "ios": {
1353
+ "osVer": "12.0",
1354
+ "uniVer": "x",
1355
+ "uniUtsPlugin": "x",
1356
+ "unixVer": "4.61",
1357
+ "unixUtsPlugin": "4.61"
1358
+ },
1359
+ "harmony": {
1360
+ "osVer": "3.0",
1361
+ "uniVer": "4.23",
1362
+ "unixVer": "4.61",
1363
+ "unixVaporVer": "5.0"
1364
+ }
1365
+ },
1366
+ "mp": {
1367
+ "weixin": {
1368
+ "hostVer": "x",
1369
+ "uniVer": "x",
1370
+ "unixVer": "x"
1371
+ },
1372
+ "alipay": {
1373
+ "hostVer": "x",
1374
+ "uniVer": "x",
1375
+ "unixVer": "x"
1376
+ },
1377
+ "baidu": {
1378
+ "hostVer": "x",
1379
+ "uniVer": "x",
1380
+ "unixVer": "x"
1381
+ },
1382
+ "toutiao": {
1383
+ "hostVer": "x",
1384
+ "uniVer": "x",
1385
+ "unixVer": "x"
1386
+ },
1387
+ "lark": {
1388
+ "hostVer": "x",
1389
+ "uniVer": "x",
1390
+ "unixVer": "x"
1391
+ },
1392
+ "qq": {
1393
+ "hostVer": "x",
1394
+ "uniVer": "x",
1395
+ "unixVer": "x"
1396
+ },
1397
+ "kuaishou": {
1398
+ "hostVer": "x",
1399
+ "uniVer": "x",
1400
+ "unixVer": "x"
1401
+ },
1402
+ "jd": {
1403
+ "hostVer": "x",
1404
+ "uniVer": "x",
1405
+ "unixVer": "x"
1406
+ }
1407
+ },
1408
+ "web": {
1409
+ "uniVer": "√",
1410
+ "unixVer": "4.0"
1411
+ }
1412
+ }
1413
+ */
1414
+ success?: UniHideModalSuccessCallback | null,
1415
+ /**
1416
+ * 接口调用失败的回调函数
1417
+ * @uniPlatform {
1418
+ "app": {
1419
+ "android": {
1420
+ "osVer": "5.0",
1421
+ "uniVer": "x",
1422
+ "uniUtsPlugin": "x",
1423
+ "unixVer": "4.61"
1424
+ },
1425
+ "ios": {
1426
+ "osVer": "12.0",
1427
+ "uniVer": "x",
1428
+ "uniUtsPlugin": "x",
1429
+ "unixVer": "4.61",
1430
+ "unixUtsPlugin": "4.61"
1431
+ },
1432
+ "harmony": {
1433
+ "osVer": "3.0",
1434
+ "uniVer": "4.23",
1435
+ "unixVer": "4.61",
1436
+ "unixVaporVer": "5.0"
1437
+ }
1438
+ },
1439
+ "mp": {
1440
+ "weixin": {
1441
+ "hostVer": "x",
1442
+ "uniVer": "x",
1443
+ "unixVer": "x"
1444
+ },
1445
+ "alipay": {
1446
+ "hostVer": "x",
1447
+ "uniVer": "x",
1448
+ "unixVer": "x"
1449
+ },
1450
+ "baidu": {
1451
+ "hostVer": "x",
1452
+ "uniVer": "x",
1453
+ "unixVer": "x"
1454
+ },
1455
+ "toutiao": {
1456
+ "hostVer": "x",
1457
+ "uniVer": "x",
1458
+ "unixVer": "x"
1459
+ },
1460
+ "lark": {
1461
+ "hostVer": "x",
1462
+ "uniVer": "x",
1463
+ "unixVer": "x"
1464
+ },
1465
+ "qq": {
1466
+ "hostVer": "x",
1467
+ "uniVer": "x",
1468
+ "unixVer": "x"
1469
+ },
1470
+ "kuaishou": {
1471
+ "hostVer": "x",
1472
+ "uniVer": "x",
1473
+ "unixVer": "x"
1474
+ },
1475
+ "jd": {
1476
+ "hostVer": "x",
1477
+ "uniVer": "x",
1478
+ "unixVer": "x"
1479
+ }
1480
+ },
1481
+ "web": {
1482
+ "uniVer": "√",
1483
+ "unixVer": "4.0"
1484
+ }
1485
+ }
1486
+ */
1487
+ fail?: UniHideModalFailCallback | null,
1488
+ /**
1489
+ * 接口调用结束的回调函数(调用成功、失败都会执行)
1490
+ * @uniPlatform {
1491
+ "app": {
1492
+ "android": {
1493
+ "osVer": "5.0",
1494
+ "uniVer": "x",
1495
+ "uniUtsPlugin": "x",
1496
+ "unixVer": "4.61"
1497
+ },
1498
+ "ios": {
1499
+ "osVer": "12.0",
1500
+ "uniVer": "x",
1501
+ "uniUtsPlugin": "x",
1502
+ "unixVer": "4.61",
1503
+ "unixUtsPlugin": "4.61"
1504
+ },
1505
+ "harmony": {
1506
+ "osVer": "3.0",
1507
+ "uniVer": "4.23",
1508
+ "unixVer": "4.61",
1509
+ "unixVaporVer": "5.0"
1510
+ }
1511
+ },
1512
+ "mp": {
1513
+ "weixin": {
1514
+ "hostVer": "x",
1515
+ "uniVer": "x",
1516
+ "unixVer": "x"
1517
+ },
1518
+ "alipay": {
1519
+ "hostVer": "x",
1520
+ "uniVer": "x",
1521
+ "unixVer": "x"
1522
+ },
1523
+ "baidu": {
1524
+ "hostVer": "x",
1525
+ "uniVer": "x",
1526
+ "unixVer": "x"
1527
+ },
1528
+ "toutiao": {
1529
+ "hostVer": "x",
1530
+ "uniVer": "x",
1531
+ "unixVer": "x"
1532
+ },
1533
+ "lark": {
1534
+ "hostVer": "x",
1535
+ "uniVer": "x",
1536
+ "unixVer": "x"
1537
+ },
1538
+ "qq": {
1539
+ "hostVer": "x",
1540
+ "uniVer": "x",
1541
+ "unixVer": "x"
1542
+ },
1543
+ "kuaishou": {
1544
+ "hostVer": "x",
1545
+ "uniVer": "x",
1546
+ "unixVer": "x"
1547
+ },
1548
+ "jd": {
1549
+ "hostVer": "x",
1550
+ "uniVer": "x",
1551
+ "unixVer": "x"
1552
+ }
1553
+ },
1554
+ "web": {
1555
+ "uniVer": "√",
1556
+ "unixVer": "4.0"
1557
+ }
1558
+ }
1559
+ */
1560
+ complete?: UniHideModalCompleteCallback | null
1561
+ }
1562
+
1563
+ export type HideModal = (options?: HideModalOptions | null) => void
1564
+
1565
+ export interface Uni {
1566
+ /**
1567
+ * @description 显示模态弹窗,可以只有一个确定按钮,也可以同时有确定和取消按钮。类似于一个API整合了 html 中:alert、confirm。
1568
+ * @example
1569
+ ```typescript
1570
+ uni.showModal({
1571
+ title: '提示',
1572
+ content: '这是一个模态弹窗',
1573
+ success: function (res) {
1574
+ if (res.confirm) {
1575
+ console.log('用户点击确定');
1576
+ } else if (res.cancel) {
1577
+ console.log('用户点击取消');
1578
+ }
1579
+ }
1580
+ });
1581
+ ```
1582
+ * @tutorial_uni_app https://uniapp.dcloud.net.cn/api/ui/prompt.html#showmodal
1583
+ * @tutorial_uni_app_x https://doc.dcloud.net.cn/uni-app-x/api/prompt.html#showmodal
1584
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/prompt.html#showmodal
1585
+ * @uniPlatform
1586
+ {
1587
+ "app": {
1588
+ "android": {
1589
+ "osVer": "5.0",
1590
+ "uniVer": "x",
1591
+ "uniUtsPlugin": "x",
1592
+ "unixVer": "4.61"
1593
+ },
1594
+ "ios": {
1595
+ "osVer": "12.0",
1596
+ "uniVer": "x",
1597
+ "uniUtsPlugin": "x",
1598
+ "unixVer": "4.61",
1599
+ "unixUtsPlugin": "4.61"
1600
+ },
1601
+ "harmony": {
1602
+ "osVer": "3.0",
1603
+ "uniVer": "4.23",
1604
+ "unixVer": "4.61",
1605
+ "unixVaporVer": "5.0"
1606
+ }
1607
+ },
1608
+ "mp": {
1609
+ "weixin": {
1610
+ "hostVer": "√",
1611
+ "uniVer": "√",
1612
+ "unixVer": "4.41"
1613
+ },
1614
+ "alipay": {
1615
+ "hostVer": "√",
1616
+ "uniVer": "√",
1617
+ "unixVer": "x"
1618
+ },
1619
+ "baidu": {
1620
+ "hostVer": "√",
1621
+ "uniVer": "√",
1622
+ "unixVer": "x"
1623
+ },
1624
+ "toutiao": {
1625
+ "hostVer": "√",
1626
+ "uniVer": "√",
1627
+ "unixVer": "x"
1628
+ },
1629
+ "lark": {
1630
+ "hostVer": "√",
1631
+ "uniVer": "√",
1632
+ "unixVer": "x"
1633
+ },
1634
+ "qq": {
1635
+ "hostVer": "√",
1636
+ "uniVer": "√",
1637
+ "unixVer": "x"
1638
+ },
1639
+ "kuaishou": {
1640
+ "hostVer": "√",
1641
+ "uniVer": "√",
1642
+ "unixVer": "x"
1643
+ },
1644
+ "jd": {
1645
+ "hostVer": "√",
1646
+ "uniVer": "√",
1647
+ "unixVer": "x"
1648
+ }
1649
+ },
1650
+ "web": {
1651
+ "uniVer": "√",
1652
+ "unixVer": "4.0"
1653
+ }
1654
+ }
1655
+ */
1656
+ showModal(options?: ShowModalOptions | null): ModalPage | null,
1657
+
1658
+ /**
1659
+ * @description 隐藏已弹出的对话框实例,如果 `modalPage` 参数为空,则隐藏当前栈顶全部对话框
1660
+ * @example
1661
+ ```typescript
1662
+ uni.hideModal({
1663
+ modalPage: null,
1664
+ success: function (res) {
1665
+ }
1666
+ });
1667
+ ```
1668
+ * @tutorial_uni_app https://uniapp.dcloud.net.cn/api/ui/prompt.html#hidemodal
1669
+ * @tutorial_uni_app_x https://doc.dcloud.net.cn/uni-app-x/api/prompt.html#hidemodal
1670
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/prompt.html#hidemodal
1671
+ * @uniPlatform
1672
+ {
1673
+ "app": {
1674
+ "android": {
1675
+ "osVer": "5.0",
1676
+ "uniVer": "x",
1677
+ "uniUtsPlugin": "x",
1678
+ "unixVer": "4.61"
1679
+ },
1680
+ "ios": {
1681
+ "osVer": "12.0",
1682
+ "uniVer": "x",
1683
+ "uniUtsPlugin": "x",
1684
+ "unixVer": "4.61",
1685
+ "unixUtsPlugin": "4.61"
1686
+ },
1687
+ "harmony": {
1688
+ "osVer": "3.0",
1689
+ "uniVer": "4.23",
1690
+ "unixVer": "4.61",
1691
+ "unixVaporVer": "5.0"
1692
+ }
1693
+ },
1694
+ "mp": {
1695
+ "weixin": {
1696
+ "hostVer": "√",
1697
+ "uniVer": "√",
1698
+ "unixVer": "x"
1699
+ },
1700
+ "alipay": {
1701
+ "hostVer": "√",
1702
+ "uniVer": "√",
1703
+ "unixVer": "x"
1704
+ },
1705
+ "baidu": {
1706
+ "hostVer": "√",
1707
+ "uniVer": "√",
1708
+ "unixVer": "x"
1709
+ },
1710
+ "toutiao": {
1711
+ "hostVer": "√",
1712
+ "uniVer": "√",
1713
+ "unixVer": "x"
1714
+ },
1715
+ "lark": {
1716
+ "hostVer": "√",
1717
+ "uniVer": "√",
1718
+ "unixVer": "x"
1719
+ },
1720
+ "qq": {
1721
+ "hostVer": "√",
1722
+ "uniVer": "√",
1723
+ "unixVer": "x"
1724
+ },
1725
+ "kuaishou": {
1726
+ "hostVer": "√",
1727
+ "uniVer": "√",
1728
+ "unixVer": "x"
1729
+ },
1730
+ "jd": {
1731
+ "hostVer": "√",
1732
+ "uniVer": "√",
1733
+ "unixVer": "x"
1734
+ }
1735
+ },
1736
+ "web": {
1737
+ "uniVer": "√",
1738
+ "unixVer": "4.0"
1739
+ }
1740
+ }
1741
+ */
1742
+ hideModal(options?: HideModalOptions | null): void
1743
+ }