b2nil / taro-ui-vue3

采用 Vue 3.0 重写的 Taro UI 组件库
https://b2nil.github.io/taro-ui-vue3/
MIT License
160 stars 51 forks source link

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

Closed wcx929 closed 3 years ago

wcx929 commented 3 years ago

问题描述

多级嵌套下无法设置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 commented 3 years ago

你使用的 vue 什么版本?

b2nil commented 3 years ago

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

b2nil commented 3 years ago

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