@dcloudio/uni-app-plus 3.0.0-alpha-3070720230309001 → 3.0.0-alpha-3070720230314001

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.
@@ -17302,6 +17302,9 @@ function getProxy() {
17302
17302
  return proxy;
17303
17303
  }
17304
17304
  function resolveSyncResult(res) {
17305
+ if ((process.env.NODE_ENV !== 'production')) {
17306
+ console.log('uts.invokeSync.result', res);
17307
+ }
17305
17308
  if (res.errMsg) {
17306
17309
  throw new Error(res.errMsg);
17307
17310
  }
@@ -17312,6 +17315,9 @@ function invokePropGetter(args) {
17312
17315
  throw new Error(args.errMsg);
17313
17316
  }
17314
17317
  delete args.errMsg;
17318
+ if ((process.env.NODE_ENV !== 'production')) {
17319
+ console.log('uts.invokePropGetter.args', args);
17320
+ }
17315
17321
  return resolveSyncResult(getProxy().invokeSync(args, () => { }));
17316
17322
  }
17317
17323
  function initProxyFunction(async, { moduleName, moduleType, package: pkg, class: cls, name: propOrMethod, method, companion, params: methodParams, errMsg, }, instanceId) {
@@ -17353,7 +17359,13 @@ function initProxyFunction(async, { moduleName, moduleType, package: pkg, class:
17353
17359
  });
17354
17360
  if (async) {
17355
17361
  return new Promise((resolve, reject) => {
17362
+ if ((process.env.NODE_ENV !== 'production')) {
17363
+ console.log('uts.invokeAsync.args', invokeArgs);
17364
+ }
17356
17365
  getProxy().invokeAsync(invokeArgs, (res) => {
17366
+ if ((process.env.NODE_ENV !== 'production')) {
17367
+ console.log('uts.invokeAsync.result', res);
17368
+ }
17357
17369
  if (res.type !== 'return') {
17358
17370
  invokeCallback(res);
17359
17371
  }
@@ -17368,6 +17380,9 @@ function initProxyFunction(async, { moduleName, moduleType, package: pkg, class:
17368
17380
  });
17369
17381
  });
17370
17382
  }
17383
+ if ((process.env.NODE_ENV !== 'production')) {
17384
+ console.log('uts.invokeSync.args', invokeArgs);
17385
+ }
17371
17386
  return resolveSyncResult(getProxy().invokeSync(invokeArgs, invokeCallback));
17372
17387
  };
17373
17388
  }
@@ -17380,6 +17395,12 @@ function initUTSStaticMethod(async, opts) {
17380
17395
  return initProxyFunction(async, opts, 0);
17381
17396
  }
17382
17397
  const initUTSProxyFunction = initUTSStaticMethod;
17398
+ function parseClassMethodName(name, methods) {
17399
+ if (hasOwn$1(methods, name + 'ByJs')) {
17400
+ return name + 'ByJs';
17401
+ }
17402
+ return name;
17403
+ }
17383
17404
  function initUTSProxyClass({ moduleName, moduleType, package: pkg, class: cls, constructor: { params: constructorParams }, methods, props, staticProps, staticMethods, errMsg, }) {
17384
17405
  const baseOptions = {
17385
17406
  moduleName,
@@ -17388,6 +17409,12 @@ function initUTSProxyClass({ moduleName, moduleType, package: pkg, class: cls, c
17388
17409
  class: cls,
17389
17410
  errMsg,
17390
17411
  };
17412
+ // iOS 需要为 ByJs 的 class 构造函数(如果包含JSONObject或UTSCallback类型)补充最后一个参数
17413
+ if (typeof plus !== 'undefined' && plus.os.name === 'iOS') {
17414
+ if (constructorParams.find((p) => p.type === 'UTSCallback' || p.type.indexOf('JSONObject') > 0)) {
17415
+ constructorParams.push({ name: '_byJs', type: 'boolean' });
17416
+ }
17417
+ }
17391
17418
  const ProxyClass = class UTSClass {
17392
17419
  constructor(...params) {
17393
17420
  if (errMsg) {
@@ -17403,6 +17430,7 @@ function initUTSProxyClass({ moduleName, moduleType, package: pkg, class: cls, c
17403
17430
  get(_, name) {
17404
17431
  if (!target[name]) {
17405
17432
  //实例方法
17433
+ name = parseClassMethodName(name, methods);
17406
17434
  if (hasOwn$1(methods, name)) {
17407
17435
  const { async, params } = methods[name];
17408
17436
  target[name] = initUTSInstanceMethod(!!async, extend({
@@ -17429,6 +17457,7 @@ function initUTSProxyClass({ moduleName, moduleType, package: pkg, class: cls, c
17429
17457
  const staticMethodCache = {};
17430
17458
  return new Proxy(ProxyClass, {
17431
17459
  get(target, name, receiver) {
17460
+ name = parseClassMethodName(name, staticMethods);
17432
17461
  if (hasOwn$1(staticMethods, name)) {
17433
17462
  if (!staticMethodCache[name]) {
17434
17463
  const { async, params } = staticMethods[name];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcloudio/uni-app-plus",
3
- "version": "3.0.0-alpha-3070720230309001",
3
+ "version": "3.0.0-alpha-3070720230314001",
4
4
  "description": "@dcloudio/uni-app-plus",
5
5
  "files": [
6
6
  "dist",
@@ -28,19 +28,19 @@
28
28
  "main": "dist/uni.compiler.js"
29
29
  },
30
30
  "dependencies": {
31
- "@dcloudio/uni-app-vite": "3.0.0-alpha-3070720230309001",
32
- "@dcloudio/uni-app-vue": "3.0.0-alpha-3070720230309001",
31
+ "@dcloudio/uni-app-vite": "3.0.0-alpha-3070720230314001",
32
+ "@dcloudio/uni-app-vue": "3.0.0-alpha-3070720230314001",
33
33
  "debug": "^4.3.3",
34
34
  "fs-extra": "^10.0.0",
35
35
  "licia": "^1.29.0",
36
36
  "postcss-selector-parser": "^6.0.6"
37
37
  },
38
38
  "devDependencies": {
39
- "@dcloudio/uni-cli-shared": "3.0.0-alpha-3070720230309001",
40
- "@dcloudio/uni-components": "3.0.0-alpha-3070720230309001",
41
- "@dcloudio/uni-h5": "3.0.0-alpha-3070720230309001",
42
- "@dcloudio/uni-i18n": "3.0.0-alpha-3070720230309001",
43
- "@dcloudio/uni-shared": "3.0.0-alpha-3070720230309001",
39
+ "@dcloudio/uni-cli-shared": "3.0.0-alpha-3070720230314001",
40
+ "@dcloudio/uni-components": "3.0.0-alpha-3070720230314001",
41
+ "@dcloudio/uni-h5": "3.0.0-alpha-3070720230314001",
42
+ "@dcloudio/uni-i18n": "3.0.0-alpha-3070720230314001",
43
+ "@dcloudio/uni-shared": "3.0.0-alpha-3070720230314001",
44
44
  "@types/pako": "1.0.2",
45
45
  "@vue/compiler-sfc": "3.2.47",
46
46
  "autoprefixer": "^10.4.13",