Skip to content
This repository has been archived by the owner on Dec 6, 2021. It is now read-only.

class多级嵌套下,报错TypeError: insertionPoint.insertAdjacentHTML is not a function #111

Closed
wcx929 opened this issue Jun 23, 2021 · 3 comments

Comments

@wcx929
Copy link

wcx929 commented Jun 23, 2021

问题描述

多级嵌套下无法设置class属性

版本信息

taro3 vue3

涉及的平台

weapp

错误信息

[Vue warn]: Unhandled error during execution of scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/vue-next 
  at <SwiperDemo tid="pages/index/index?$taroTimestamp=1624461341677" > 


._node_modules_@vue_runtime-dom_dist_runtime-dom.esm-bundler.js:94 Uncaught (in promise) TypeError: insertionPoint.insertAdjacentHTML is not a function

代码

<view class="question">
    <view>每日一问</view>
    <view>平庸的过一生会遗憾吗?</view>
    <view class="question-content">
      <view class="question-content-process">
        <view class="question-content-process-left">
          
        </view >
        <view class="question-content-process-right">
          不能
        </view>
      </view>
    </view>
  </view>
@b2nil
Copy link
Owner

b2nil commented Jun 23, 2021

你使用的 vue 什么版本?

@b2nil
Copy link
Owner

b2nil commented Jun 23, 2021

看了一下 vue-next 的 changelog,这应该是 vue 3.1.2 对静态内容插入逻辑做了更改,引入了一个新的方法 insertAdjacentHtml。应该是 Taro 还没有实现这个方法,所以报这个错。 去 Taro 那边提 issue 吧。

@b2nil
Copy link
Owner

b2nil commented Jun 25, 2021

NervJS/taro#9596 可修复这个问题。

@b2nil b2nil closed this as completed Jun 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants