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

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 +5 -13
  2. package/package.json +5 -5
@@ -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) {
@@ -500,16 +498,9 @@ function selectAllComponents(mpInstance, selector, $refs) {
500
498
  const components = mpInstance.selectAllComponents(selector);
501
499
  components.forEach((component) => {
502
500
  const ref = component.properties.uR;
503
- $refs[ref] = findRefValue(component);
501
+ $refs[ref] = component.$vm || component;
504
502
  });
505
503
  }
506
- function findRefValue(component) {
507
- const vm = component.$vm;
508
- if (vm) {
509
- return getExposeProxy(vm.$) || vm;
510
- }
511
- return component;
512
- }
513
504
  function initRefs(instance, mpInstance) {
514
505
  Object.defineProperty(instance, 'refs', {
515
506
  get() {
@@ -524,7 +515,7 @@ function initRefs(instance, mpInstance) {
524
515
  if (!$refs[ref]) {
525
516
  $refs[ref] = [];
526
517
  }
527
- $refs[ref].push(findRefValue(component));
518
+ $refs[ref].push(component.$vm || component);
528
519
  });
529
520
  return $refs;
530
521
  },
@@ -816,7 +807,8 @@ function $createComponent(initialVNode, options) {
816
807
  if (!$createComponentFn) {
817
808
  $createComponentFn = getApp().$vm.$createComponent;
818
809
  }
819
- return $createComponentFn(initialVNode, options);
810
+ const proxy = $createComponentFn(initialVNode, options);
811
+ return getExposeProxy(proxy.$) || proxy;
820
812
  }
821
813
  function $destroyComponent(instance) {
822
814
  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-3030720220111003",
4
4
  "description": "uni-app quickapp-webview",
5
5
  "main": "dist/index.js",
6
6
  "repository": {
@@ -25,10 +25,10 @@
25
25
  "@vue/compiler-core": "3.2.26"
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",
28
+ "@dcloudio/uni-cli-shared": "3.0.0-alpha-3030720220111003",
29
+ "@dcloudio/uni-mp-vite": "3.0.0-alpha-3030720220111003",
30
+ "@dcloudio/uni-mp-vue": "3.0.0-alpha-3030720220111003",
31
+ "@dcloudio/uni-shared": "3.0.0-alpha-3030720220111003",
32
32
  "@vue/shared": "3.2.26"
33
33
  }
34
34
  }