From 5364548e5f3cb11d501b79989419e3608c2562da Mon Sep 17 00:00:00 2001 From: zealotchen <92966734+zealotchen0@users.noreply.github.com> Date: Wed, 5 Jul 2023 21:04:34 +0800 Subject: [PATCH] fix(vue): fix rootview conditional statement (#3355) * fix(vue): fix rootview conditional statement * fix(test): fix js build test * fix(test): fix js build test * fix(test): fix js build test --- .github/workflows/frontend_build_tests.yml | 3 ++- driver/js/packages/hippy-vue/src/runtime/node-ops.js | 7 ------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/frontend_build_tests.yml b/.github/workflows/frontend_build_tests.yml index cddd7f913d2..b21a6b1064d 100644 --- a/.github/workflows/frontend_build_tests.yml +++ b/.github/workflows/frontend_build_tests.yml @@ -32,7 +32,8 @@ jobs: cache: 'npm' cache-dependency-path: driver/js/package-lock.json - name: install - run: npm ci && lerna bootstrap --no-ci + run: | + npm install && npx lerna bootstrap --no-ci - name: lint & build run: npm run lint & npm run build - name: test diff --git a/driver/js/packages/hippy-vue/src/runtime/node-ops.js b/driver/js/packages/hippy-vue/src/runtime/node-ops.js index 9937c6bbe6b..74c252cf007 100644 --- a/driver/js/packages/hippy-vue/src/runtime/node-ops.js +++ b/driver/js/packages/hippy-vue/src/runtime/node-ops.js @@ -20,7 +20,6 @@ import document from '../renderer/document-node'; import { unCacheNodeOnIdle } from '../util/node'; -import { getApp } from '../util'; import { setAttrs } from './modules/attrs'; import { setStyle } from './modules/style'; import { setClass } from './modules/class'; @@ -34,12 +33,6 @@ function setRootViewAttr(elm, vnode) { let isRootView = false; if (elm.nodeId === ROOT_VIEW_ID) { isRootView = true; - } else if (vnode && vnode.data && vnode.data.attrs && vnode.data.attrs.id) { - const app = getApp(); - if (app) { - const { $options: { rootView } } = app; - isRootView = vnode.data.attrs.id === rootView.slice(1 - rootView.length); - } } if (isRootView) { setAttrs(vnode, elm, { notToNative: true });