提交 7c548f54 编写于 作者: D DCloud_LXH

fix(h5): v-if display error fixed #3225

上级 868c7087
import { VNode, Component, createTextVNode, createVNode } from 'vue'
import { VNode, Component, createTextVNode, createVNode, Comment } from 'vue'
import { defineBuiltInComponent } from '../../helpers/component'
import { DecodeOptions, parseText } from '../../helpers/text'
......@@ -23,7 +23,10 @@ export default /*#__PURE__*/ defineBuiltInComponent({
const children: VNode[] = []
if (slots.default) {
slots.default().forEach((vnode) => {
if (vnode.shapeFlag & 8 /* TEXT_CHILDREN */) {
if (
vnode.shapeFlag & 8 /* TEXT_CHILDREN */ &&
vnode.type !== Comment
) {
const lines = parseText(vnode.children as string, {
space: props.space as DecodeOptions['space'],
decode: props.decode as boolean,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册