From 91c34207a1110b96a75417ec995fb6c8c925f09a Mon Sep 17 00:00:00 2001 From: qiang Date: Thu, 18 Apr 2024 13:28:42 +0800 Subject: [PATCH] =?UTF-8?q?fix(x-ios):=20=E8=B0=83=E6=95=B4vue=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E5=AE=9E=E4=BE=8B=E5=88=A4=E6=96=AD=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/uni-app-plus/dist/uni.x.runtime.esm.js | 5 ++--- packages/uni-app-plus/src/x/api/dom/createSelectorQuery.ts | 7 +++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/packages/uni-app-plus/dist/uni.x.runtime.esm.js b/packages/uni-app-plus/dist/uni.x.runtime.esm.js index 8ec2286026..f7de8b2cf9 100644 --- a/packages/uni-app-plus/dist/uni.x.runtime.esm.js +++ b/packages/uni-app-plus/dist/uni.x.runtime.esm.js @@ -1858,9 +1858,8 @@ var getElementById = /* @__PURE__ */ defineSyncApi("getElementById", (id2) => { }); function isVueComponent(comp) { var has$option = typeof comp.$ === "object"; - var has$nativePage = typeof comp.$nativePage === "object"; - var has$mpType = typeof comp.$mpType === "string"; - return has$option && has$nativePage && has$mpType; + var has$el = typeof comp.$el === "object"; + return has$option && has$el; } var isFunction = (val) => typeof val === "function"; class NodesRefImpl { diff --git a/packages/uni-app-plus/src/x/api/dom/createSelectorQuery.ts b/packages/uni-app-plus/src/x/api/dom/createSelectorQuery.ts index 5038c86c5a..5d5a26ae5c 100644 --- a/packages/uni-app-plus/src/x/api/dom/createSelectorQuery.ts +++ b/packages/uni-app-plus/src/x/api/dom/createSelectorQuery.ts @@ -11,11 +11,10 @@ import { getCurrentPage } from '@dcloudio/uni-core' import type { ComponentPublicInstance } from 'vue' function isVueComponent(comp: any) { - const has$option = typeof comp.$ === 'object' - const has$nativePage = typeof comp.$nativePage === 'object' - const has$mpType = typeof comp.$mpType === 'string' + const has$instance = typeof comp.$ === 'object' + const has$el = typeof comp.$el === 'object' - return has$option && has$nativePage && has$mpType + return has$instance && has$el } const isFunction = (val: any): val is Function => typeof val === 'function' -- GitLab