@dcloudio/uni-quickapp-webview 3.0.0-alpha-3030720220111002 → 3.0.0-alpha-3030820220114002

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 (2) hide show
  1. package/dist/uni.mp.esm.js +9 -34
  2. package/package.json +7 -7
@@ -1,5 +1,5 @@
1
1
  import { isPlainObject, isArray, hasOwn, isFunction, extend, camelize, isObject } from '@vue/shared';
2
- import { injectHook, ref, nextTick, getExposeProxy, findComponentPropsData, toRaw, updateProps, invalidateJob, pruneComponentPropsCache } from 'vue';
2
+ import { injectHook, ref, nextTick, findComponentPropsData, toRaw, updateProps, invalidateJob, getExposeProxy, pruneComponentPropsCache } from 'vue';
3
3
 
4
4
  const ON_READY$1 = 'onReady';
5
5
 
@@ -232,8 +232,6 @@ function initBaseInstance(instance, options) {
232
232
  if (__VUE_OPTIONS_API__) {
233
233
  ctx._self = {};
234
234
  }
235
- // $vm
236
- ctx.$scope.$vm = instance.proxy;
237
235
  // slots
238
236
  instance.slots = {};
239
237
  if (isArray(options.slots) && options.slots.length) {
@@ -461,9 +459,6 @@ function initLocale(appVm) {
461
459
  });
462
460
  }
463
461
 
464
- function initBehavior(options) {
465
- return Behavior(options);
466
- }
467
462
  function initVueIds(vueIds, mpInstance) {
468
463
  if (!vueIds) {
469
464
  return;
@@ -500,16 +495,9 @@ function selectAllComponents(mpInstance, selector, $refs) {
500
495
  const components = mpInstance.selectAllComponents(selector);
501
496
  components.forEach((component) => {
502
497
  const ref = component.properties.uR;
503
- $refs[ref] = findRefValue(component);
498
+ $refs[ref] = component.$vm || component;
504
499
  });
505
500
  }
506
- function findRefValue(component) {
507
- const vm = component.$vm;
508
- if (vm) {
509
- return getExposeProxy(vm.$) || vm;
510
- }
511
- return component;
512
- }
513
501
  function initRefs(instance, mpInstance) {
514
502
  Object.defineProperty(instance, 'refs', {
515
503
  get() {
@@ -524,7 +512,7 @@ function initRefs(instance, mpInstance) {
524
512
  if (!$refs[ref]) {
525
513
  $refs[ref] = [];
526
514
  }
527
- $refs[ref].push(findRefValue(component));
515
+ $refs[ref].push(component.$vm || component);
528
516
  });
529
517
  return $refs;
530
518
  },
@@ -716,10 +704,8 @@ function hasPropsChanged(prevProps, nextProps, checkLen = true) {
716
704
  }
717
705
  return false;
718
706
  }
719
- function initBehaviors(vueOptions, initBehavior) {
707
+ function initBehaviors(vueOptions) {
720
708
  const vueBehaviors = vueOptions.behaviors;
721
- const vueExtends = vueOptions.extends;
722
- const vueMixins = vueOptions.mixins;
723
709
  let vueProps = vueOptions.props;
724
710
  if (!vueProps) {
725
711
  vueOptions.props = vueProps = [];
@@ -746,23 +732,11 @@ function initBehaviors(vueOptions, initBehavior) {
746
732
  }
747
733
  });
748
734
  }
749
- if (vueExtends && vueExtends.props) {
750
- const behavior = {};
751
- behaviors.push(initBehavior(behavior));
752
- }
753
- if (isArray(vueMixins)) {
754
- vueMixins.forEach((vueMixin) => {
755
- if (vueMixin.props) {
756
- const behavior = {};
757
- behaviors.push(initBehavior(behavior));
758
- }
759
- });
760
- }
761
735
  return behaviors;
762
736
  }
763
- function applyOptions(componentOptions, vueOptions, initBehavior) {
737
+ function applyOptions(componentOptions, vueOptions) {
764
738
  componentOptions.data = initData();
765
- componentOptions.behaviors = initBehaviors(vueOptions, initBehavior);
739
+ componentOptions.behaviors = initBehaviors(vueOptions);
766
740
  }
767
741
 
768
742
  function parseComponent(vueOptions, { parse, mocks, isPage, initRelation, handleLink, initLifetimes, }) {
@@ -794,7 +768,7 @@ function parseComponent(vueOptions, { parse, mocks, isPage, initRelation, handle
794
768
  },
795
769
  };
796
770
  if (__VUE_OPTIONS_API__) {
797
- applyOptions(mpComponentOptions, vueOptions, initBehavior);
771
+ applyOptions(mpComponentOptions, vueOptions);
798
772
  }
799
773
  initProps(mpComponentOptions);
800
774
  initPropsObserver(mpComponentOptions);
@@ -816,7 +790,8 @@ function $createComponent(initialVNode, options) {
816
790
  if (!$createComponentFn) {
817
791
  $createComponentFn = getApp().$vm.$createComponent;
818
792
  }
819
- return $createComponentFn(initialVNode, options);
793
+ const proxy = $createComponentFn(initialVNode, options);
794
+ return getExposeProxy(proxy.$) || proxy;
820
795
  }
821
796
  function $destroyComponent(instance) {
822
797
  if (!$destroyComponentFn) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcloudio/uni-quickapp-webview",
3
- "version": "3.0.0-alpha-3030720220111002",
3
+ "version": "3.0.0-alpha-3030820220114002",
4
4
  "description": "uni-app quickapp-webview",
5
5
  "main": "dist/index.js",
6
6
  "repository": {
@@ -22,13 +22,13 @@
22
22
  },
23
23
  "gitHead": "33e807d66e1fe47e2ee08ad9c59247e37b8884da",
24
24
  "devDependencies": {
25
- "@vue/compiler-core": "3.2.26"
25
+ "@vue/compiler-core": "3.2.27"
26
26
  },
27
27
  "dependencies": {
28
- "@dcloudio/uni-cli-shared": "3.0.0-alpha-3030720220111002",
29
- "@dcloudio/uni-mp-vite": "3.0.0-alpha-3030720220111002",
30
- "@dcloudio/uni-mp-vue": "3.0.0-alpha-3030720220111002",
31
- "@dcloudio/uni-shared": "3.0.0-alpha-3030720220111002",
32
- "@vue/shared": "3.2.26"
28
+ "@dcloudio/uni-cli-shared": "3.0.0-alpha-3030820220114002",
29
+ "@dcloudio/uni-mp-vite": "3.0.0-alpha-3030820220114002",
30
+ "@dcloudio/uni-mp-vue": "3.0.0-alpha-3030820220114002",
31
+ "@dcloudio/uni-shared": "3.0.0-alpha-3030820220114002",
32
+ "@vue/shared": "3.2.27"
33
33
  }
34
34
  }