@dcloudio/uni-app-x 0.7.28 → 0.7.30

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcloudio/uni-app-x",
3
- "version": "0.7.28",
3
+ "version": "0.7.30",
4
4
  "description": "uni-app x types",
5
5
  "typings": "index.d.ts",
6
6
  "author": "DCloud",
package/types/app.d.ts CHANGED
@@ -1002,11 +1002,290 @@ declare module '@vue/runtime-core' {
1002
1002
  }
1003
1003
 
1004
1004
  export interface UniApp {
1005
- $vm: EditorCreateVueAppComponentX,
1006
- vm: EditorCreateVueAppComponentX,
1005
+ /**
1006
+ * App vue 实例对象
1007
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/collocation/app.html#applifecycle
1008
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/collocation/app.html#applifecycle
1009
+ * @uniPlatform {
1010
+ * "app": {
1011
+ * "android": {
1012
+ * "osVer": "5.0",
1013
+ * "uniVer": "x",
1014
+ * "unixVer": "4.28"
1015
+ * },
1016
+ * "ios": {
1017
+ * "osVer": "x",
1018
+ * "uniVer": "x",
1019
+ * "unixVer": "4.28"
1020
+ * },
1021
+ * "harmony": {
1022
+ * "osVer": "x",
1023
+ * "uniVer": "x",
1024
+ * "unixVer": "x"
1025
+ * }
1026
+ * },
1027
+ * "mp": {
1028
+ * "weixin": {
1029
+ * "hostVer": "√",
1030
+ * "uniVer": "x",
1031
+ * "unixVer": "x"
1032
+ * },
1033
+ * },
1034
+ * "web": {
1035
+ * "uniVer": "x",
1036
+ * "unixVer": "4.28"
1037
+ * }
1038
+ * }
1039
+ */
1040
+ $vm: ComponentPublicInstance,
1041
+ /**
1042
+ * App vue 实例对象
1043
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/collocation/app.html#applifecycle
1044
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/collocation/app.html#applifecycle
1045
+ * @uniPlatform {
1046
+ * "app": {
1047
+ * "android": {
1048
+ * "osVer": "5.0",
1049
+ * "uniVer": "x",
1050
+ * "unixVer": "4.28"
1051
+ * },
1052
+ * "ios": {
1053
+ * "osVer": "x",
1054
+ * "uniVer": "x",
1055
+ * "unixVer": "4.28"
1056
+ * },
1057
+ * "harmony": {
1058
+ * "osVer": "x",
1059
+ * "uniVer": "x",
1060
+ * "unixVer": "x"
1061
+ * }
1062
+ * },
1063
+ * "mp": {
1064
+ * "weixin": {
1065
+ * "hostVer": "√",
1066
+ * "uniVer": "x",
1067
+ * "unixVer": "x"
1068
+ * },
1069
+ * },
1070
+ * "web": {
1071
+ * "uniVer": "x",
1072
+ * "unixVer": "4.28"
1073
+ * }
1074
+ * }
1075
+ */
1076
+ vm: ComponentPublicInstance,
1077
+ /**
1078
+ * 全局对象
1079
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/collocation/app.html#applifecycle
1080
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/collocation/app.html#applifecycle
1081
+ * @uniPlatform {
1082
+ * "app": {
1083
+ * "android": {
1084
+ * "osVer": "5.0",
1085
+ * "uniVer": "x",
1086
+ * "unixVer": "4.28"
1087
+ * },
1088
+ * "ios": {
1089
+ * "osVer": "x",
1090
+ * "uniVer": "x",
1091
+ * "unixVer": "4.28"
1092
+ * },
1093
+ * "harmony": {
1094
+ * "osVer": "x",
1095
+ * "uniVer": "x",
1096
+ * "unixVer": "x"
1097
+ * }
1098
+ * },
1099
+ * "mp": {
1100
+ * "weixin": {
1101
+ * "hostVer": "√",
1102
+ * "uniVer": "x",
1103
+ * "unixVer": "x"
1104
+ * },
1105
+ * },
1106
+ * "web": {
1107
+ * "uniVer": "x",
1108
+ * "unixVer": "4.28"
1109
+ * }
1110
+ * }
1111
+ */
1007
1112
  globalData: GlobalData,
1113
+ /**
1114
+ * 监听自定义事件。事件可以由 uni.$emit 触发。回调函数会接收 uni.$emit 传递的参数。
1115
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/event-bus.html#emit
1116
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/event-bus.html#emit
1117
+ * @uniPlatform {
1118
+ * "app": {
1119
+ * "android": {
1120
+ * "osVer": "5.0",
1121
+ * "uniVer": "x",
1122
+ * "unixVer": "4.28"
1123
+ * },
1124
+ * "ios": {
1125
+ * "osVer": "x",
1126
+ * "uniVer": "x",
1127
+ * "unixVer": "4.28"
1128
+ * },
1129
+ * "harmony": {
1130
+ * "osVer": "x",
1131
+ * "uniVer": "x",
1132
+ * "unixVer": "x"
1133
+ * }
1134
+ * },
1135
+ * "mp": {
1136
+ * "weixin": {
1137
+ * "hostVer": "√",
1138
+ * "uniVer": "x",
1139
+ * "unixVer": "x"
1140
+ * },
1141
+ * },
1142
+ * "web": {
1143
+ * "uniVer": "x",
1144
+ * "unixVer": "4.28"
1145
+ * }
1146
+ * }
1147
+ */
1008
1148
  on(eventName: string, callback: Function): void
1149
+ /**
1150
+ * 监听一个自定义事件。事件只触发一次,在第一次触发之后移除事件监听器
1151
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/event-bus.html#emit
1152
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/event-bus.html#emit
1153
+ * @uniPlatform {
1154
+ * "app": {
1155
+ * "android": {
1156
+ * "osVer": "5.0",
1157
+ * "uniVer": "x",
1158
+ * "unixVer": "4.28"
1159
+ * },
1160
+ * "ios": {
1161
+ * "osVer": "x",
1162
+ * "uniVer": "x",
1163
+ * "unixVer": "4.28"
1164
+ * },
1165
+ * "harmony": {
1166
+ * "osVer": "x",
1167
+ * "uniVer": "x",
1168
+ * "unixVer": "x"
1169
+ * }
1170
+ * },
1171
+ * "mp": {
1172
+ * "weixin": {
1173
+ * "hostVer": "√",
1174
+ * "uniVer": "x",
1175
+ * "unixVer": "x"
1176
+ * },
1177
+ * },
1178
+ * "web": {
1179
+ * "uniVer": "x",
1180
+ * "unixVer": "4.28"
1181
+ * }
1182
+ * }
1183
+ */
1009
1184
  once(eventName: string, callback: Function): void
1185
+ /**
1186
+ * 移除自定义事件监听器。如果提供了事件名和回调,则只移除这个回调的监听器。如果仅提供事件名,则移除该事件的所有监听器。
1187
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/event-bus.html#emit
1188
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/event-bus.html#emit
1189
+ * @uniPlatform {
1190
+ * "app": {
1191
+ * "android": {
1192
+ * "osVer": "5.0",
1193
+ * "uniVer": "x",
1194
+ * "unixVer": "4.28"
1195
+ * },
1196
+ * "ios": {
1197
+ * "osVer": "x",
1198
+ * "uniVer": "x",
1199
+ * "unixVer": "4.28"
1200
+ * },
1201
+ * "harmony": {
1202
+ * "osVer": "x",
1203
+ * "uniVer": "x",
1204
+ * "unixVer": "x"
1205
+ * }
1206
+ * },
1207
+ * "mp": {
1208
+ * "weixin": {
1209
+ * "hostVer": "√",
1210
+ * "uniVer": "x",
1211
+ * "unixVer": "x"
1212
+ * },
1213
+ * },
1214
+ * "web": {
1215
+ * "uniVer": "x",
1216
+ * "unixVer": "4.28"
1217
+ * }
1218
+ * }
1219
+ */
1010
1220
  off(eventName: string, callback?: Function | null): void
1221
+ /**
1222
+ * 触发自定义事件,附加的参数会传递给事件监听器。
1223
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/event-bus.html#emit
1224
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/event-bus.html#emit
1225
+ * @uniPlatform {
1226
+ * "app": {
1227
+ * "android": {
1228
+ * "osVer": "5.0",
1229
+ * "uniVer": "x",
1230
+ * "unixVer": "4.28"
1231
+ * },
1232
+ * "ios": {
1233
+ * "osVer": "x",
1234
+ * "uniVer": "x",
1235
+ * "unixVer": "4.28"
1236
+ * },
1237
+ * "harmony": {
1238
+ * "osVer": "x",
1239
+ * "uniVer": "x",
1240
+ * "unixVer": "x"
1241
+ * }
1242
+ * },
1243
+ * "mp": {
1244
+ * "weixin": {
1245
+ * "hostVer": "√",
1246
+ * "uniVer": "x",
1247
+ * "unixVer": "x"
1248
+ * },
1249
+ * },
1250
+ * "web": {
1251
+ * "uniVer": "x",
1252
+ * "unixVer": "4.28"
1253
+ * }
1254
+ * }
1255
+ */
1011
1256
  emit(eventName: string, args: any | null): void
1257
+ /**
1258
+ * 获取 Android 应用 Application 上下文
1259
+ * @uniPlatform {
1260
+ * "app": {
1261
+ * "android": {
1262
+ * "osVer": "5.0",
1263
+ * "uniVer": "x",
1264
+ * "unixVer": "4.28"
1265
+ * },
1266
+ * "ios": {
1267
+ * "osVer": "x",
1268
+ * "uniVer": "x",
1269
+ * "unixVer": "x"
1270
+ * },
1271
+ * "harmony": {
1272
+ * "osVer": "x",
1273
+ * "uniVer": "x",
1274
+ * "unixVer": "x"
1275
+ * }
1276
+ * },
1277
+ * "mp": {
1278
+ * "weixin": {
1279
+ * "hostVer": "√",
1280
+ * "uniVer": "x",
1281
+ * "unixVer": "x"
1282
+ * },
1283
+ * },
1284
+ * "web": {
1285
+ * "uniVer": "x",
1286
+ * "unixVer": "x"
1287
+ * }
1288
+ * }
1289
+ */
1290
+ getAndroidApplication(): Application
1012
1291
  }
@@ -266,5 +266,4 @@ export interface UniNativePage {
266
266
  */
267
267
  setPageStyle(style: UTSJSONObject): void
268
268
  }
269
- export type UniPage = UniNativePage
270
269
  export type IPage = UniNativePage
@@ -101,7 +101,6 @@ import {
101
101
  UniNestedPreScrollEvent as UniNestedPreScrollEventOrigin,
102
102
  NestedPreScrollEvent as NestedPreScrollEventOrigin,
103
103
  UniNativePage as UniNativePageOrigin,
104
- UniPage as UniPageOrigin,
105
104
  IPage as IPageOrigin,
106
105
  UniNativeApp as UniNativeAppOrigin,
107
106
  IApp as IAppOrigin,
@@ -414,7 +413,6 @@ declare global {
414
413
  const NestedPreScrollEvent: typeof NestedPreScrollEventOrigin
415
414
  type NestedPreScrollEvent = NestedPreScrollEventOrigin
416
415
  type UniNativePage = UniNativePageOrigin
417
- type UniPage = UniPageOrigin
418
416
  type IPage = IPageOrigin
419
417
  type UniNativeApp = UniNativeAppOrigin
420
418
  type IApp = IAppOrigin