@dcloudio/uni-quickapp-webview 3.0.0-alpha-3080420230602001 → 3.0.0-alpha-3080520230612002

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.
@@ -1051,39 +1051,37 @@ const previewImage = {
1051
1051
  };
1052
1052
 
1053
1053
  const eventChannels = {};
1054
- const eventChannelStack = [];
1055
1054
  let id = 0;
1056
1055
  function initEventChannel(events, cache = true) {
1057
1056
  id++;
1058
1057
  const eventChannel = new qa.EventChannel(id, events);
1059
1058
  if (cache) {
1060
1059
  eventChannels[id] = eventChannel;
1061
- eventChannelStack.push(eventChannel);
1062
1060
  }
1063
1061
  return eventChannel;
1064
1062
  }
1065
1063
  function getEventChannel(id) {
1066
- if (id) {
1067
- const eventChannel = eventChannels[id];
1068
- delete eventChannels[id];
1069
- return eventChannel;
1070
- }
1071
- return eventChannelStack.shift();
1072
- }
1073
- const navigateTo = {
1074
- args(fromArgs) {
1075
- const id = initEventChannel(fromArgs.events).id;
1076
- if (fromArgs.url) {
1077
- fromArgs.url =
1078
- fromArgs.url +
1079
- (fromArgs.url.indexOf('?') === -1 ? '?' : '&') +
1080
- '__id__=' +
1081
- id;
1082
- }
1083
- },
1084
- returnValue(fromRes) {
1085
- fromRes.eventChannel = getEventChannel();
1086
- },
1064
+ const eventChannel = eventChannels[id];
1065
+ delete eventChannels[id];
1066
+ return eventChannel;
1067
+ }
1068
+ const navigateTo$1 = () => {
1069
+ let eventChannel;
1070
+ return {
1071
+ args(fromArgs) {
1072
+ eventChannel = initEventChannel(fromArgs.events);
1073
+ if (fromArgs.url) {
1074
+ fromArgs.url =
1075
+ fromArgs.url +
1076
+ (fromArgs.url.indexOf('?') === -1 ? '?' : '&') +
1077
+ '__id__=' +
1078
+ eventChannel.id;
1079
+ }
1080
+ },
1081
+ returnValue(fromRes) {
1082
+ fromRes.eventChannel = eventChannel;
1083
+ },
1084
+ };
1087
1085
  };
1088
1086
 
1089
1087
  const baseApis = {
@@ -1170,6 +1168,8 @@ var shims = /*#__PURE__*/Object.freeze({
1170
1168
  getProvider: getProvider
1171
1169
  });
1172
1170
 
1171
+ const navigateTo = navigateTo$1();
1172
+
1173
1173
  var protocols = /*#__PURE__*/Object.freeze({
1174
1174
  __proto__: null,
1175
1175
  getSystemInfo: getSystemInfo,
@@ -1,5 +1,5 @@
1
1
  import { SLOT_DEFAULT_NAME, EventChannel, invokeArrayFns, MINI_PROGRAM_PAGE_RUNTIME_HOOKS, ON_LOAD, ON_SHOW, ON_HIDE, ON_UNLOAD, ON_RESIZE, ON_TAB_ITEM_TAP, ON_REACH_BOTTOM, ON_PULL_DOWN_REFRESH, ON_ADD_TO_FAVORITES, isUniLifecycleHook, ON_READY, once, ON_LAUNCH, ON_ERROR, ON_THEME_CHANGE, ON_PAGE_NOT_FOUND, ON_UNHANDLE_REJECTION, addLeadingSlash, stringifyQuery, customizeEvent } from '@dcloudio/uni-shared';
2
- import { isArray, hasOwn, isFunction, extend, isPlainObject, isObject } from '@vue/shared';
2
+ import { isArray, isFunction, hasOwn, extend, isPlainObject, isObject } from '@vue/shared';
3
3
  import { ref, nextTick, findComponentPropsData, toRaw, updateProps, hasQueueJob, invalidateJob, devtoolsComponentAdded, getExposeProxy, pruneComponentPropsCache } from 'vue';
4
4
  import { normalizeLocale, LOCALE_EN } from '@dcloudio/uni-i18n';
5
5
 
@@ -88,7 +88,10 @@ function callHook(name, args) {
88
88
  name = 'm';
89
89
  }
90
90
  {
91
- if (name === 'onLoad' && args && args.__id__) {
91
+ if (name === 'onLoad' &&
92
+ args &&
93
+ args.__id__ &&
94
+ isFunction(qa.getEventChannel)) {
92
95
  this.__eventChannel__ = qa.getEventChannel(args.__id__);
93
96
  delete args.__id__;
94
97
  }
@@ -409,14 +412,18 @@ function initDefaultProps(options, isBehavior = false) {
409
412
  if (options.behaviors) {
410
413
  // wx://form-field
411
414
  if (options.behaviors.includes('qa://form-field')) {
412
- properties.name = {
413
- type: null,
414
- value: '',
415
- };
416
- properties.value = {
417
- type: null,
418
- value: '',
419
- };
415
+ if (!options.properties || !options.properties.name) {
416
+ properties.name = {
417
+ type: null,
418
+ value: '',
419
+ };
420
+ }
421
+ if (!options.properties || !options.properties.value) {
422
+ properties.value = {
423
+ type: null,
424
+ value: '',
425
+ };
426
+ }
420
427
  }
421
428
  }
422
429
  return properties;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcloudio/uni-quickapp-webview",
3
- "version": "3.0.0-alpha-3080420230602001",
3
+ "version": "3.0.0-alpha-3080520230612002",
4
4
  "description": "uni-app quickapp-webview",
5
5
  "main": "dist/index.js",
6
6
  "files": [
@@ -26,13 +26,13 @@
26
26
  },
27
27
  "gitHead": "33e807d66e1fe47e2ee08ad9c59247e37b8884da",
28
28
  "devDependencies": {
29
- "@vue/compiler-core": "3.2.47"
29
+ "@dcloudio/uni-mp-compiler": "3.0.0-alpha-3080520230612002"
30
30
  },
31
31
  "dependencies": {
32
- "@dcloudio/uni-cli-shared": "3.0.0-alpha-3080420230602001",
33
- "@dcloudio/uni-mp-vite": "3.0.0-alpha-3080420230602001",
34
- "@dcloudio/uni-mp-vue": "3.0.0-alpha-3080420230602001",
35
- "@dcloudio/uni-shared": "3.0.0-alpha-3080420230602001",
32
+ "@dcloudio/uni-cli-shared": "3.0.0-alpha-3080520230612002",
33
+ "@dcloudio/uni-mp-vite": "3.0.0-alpha-3080520230612002",
34
+ "@dcloudio/uni-mp-vue": "3.0.0-alpha-3080520230612002",
35
+ "@dcloudio/uni-shared": "3.0.0-alpha-3080520230612002",
36
36
  "@vue/shared": "3.2.47"
37
37
  }
38
38
  }