Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在使用v-for的列表中,会在两端多出两个空文本节点 #13605

Closed
Cuixote opened this issue Apr 7, 2023 · 5 comments
Closed

在使用v-for的列表中,会在两端多出两个空文本节点 #13605

Cuixote opened this issue Apr 7, 2023 · 5 comments
Assignees
Labels
F-vue3 Framework - Vue 3 T-alipay Target - 编译到支付宝小程序 V-3 Version - 3.x

Comments

@Cuixote
Copy link

Cuixote commented Apr 7, 2023

相关平台

支付宝小程序

复现仓库

https://gitee.com/cuixote/taro-bug-issue.git
小程序基础库: 2.0
使用框架: Vue 3

复现步骤

  1. 代码
<template>
    <view>
      <view v-for="(item,index) in [2022,2023,2024]">{{ item }}</view>
    </view>
</template>
  1. 在小程序中展示
    DOM结构

  2. 在控制台中,可以看到列表的父元素有5个子节点,首尾是两个空的文本节点。

期望结果

不存在空文本节点

实际结果

存在

环境信息

  Taro CLI 3.6.4 environment info:
    System:
      OS: macOS 12.6.3
      Shell: 5.8.1 - /bin/zsh
    Binaries:
      Node: 18.6.0 - /usr/local/bin/node
      Yarn: 1.22.5 - ~/.yarn/bin/yarn
      npm: 8.13.2 - /usr/local/bin/npm
    npmPackages:
      @tarojs/cli: 3.6.4 => 3.6.4
      @tarojs/components: 3.6.4 => 3.6.4
      @tarojs/helper: 3.6.4 => 3.6.4
      @tarojs/plugin-framework-vue3: 3.6.4 => 3.6.4
      @tarojs/plugin-html: 3.6.4 => 3.6.4
      @tarojs/plugin-platform-alipay: 3.6.4 => 3.6.4
      @tarojs/plugin-platform-jd: 3.6.4 => 3.6.4
      @tarojs/plugin-platform-qq: 3.6.4 => 3.6.4
      @tarojs/plugin-platform-swan: 3.6.4 => 3.6.4
      @tarojs/plugin-platform-tt: 3.6.4 => 3.6.4
      @tarojs/plugin-platform-weapp: 3.6.4 => 3.6.4
      @tarojs/router: 3.6.4 => 3.6.4
      @tarojs/runtime: 3.6.4 => 3.6.4
      @tarojs/shared: 3.6.4 => 3.6.4
      @tarojs/taro: 3.6.4 => 3.6.4
      @tarojs/taro-h5: 3.6.4 => 3.6.4
      @tarojs/webpack5-runner: 3.6.4 => 3.6.4
      babel-preset-taro: 3.6.4 => 3.6.4
      eslint-config-taro: 3.6.4 => 3.6.4
    npmGlobalPackages:
      typescript: 4.6.4
@taro-bot2 taro-bot2 bot added F-vue3 Framework - Vue 3 T-alipay Target - 编译到支付宝小程序 V-3 Version - 3.x labels Apr 7, 2023
@xuanzebin
Copy link
Member

Duplicate of #14020

@xuanzebin xuanzebin marked this as a duplicate of #14020 Jun 15, 2023
@Cuixote
Copy link
Author

Cuixote commented Jun 15, 2023

大佬,你这写进周报两个月了,分配到人快一个月了。就做了一个issue合并。黄花菜都凉透了啊

@Chen-jj
Copy link
Contributor

Chen-jj commented Jun 15, 2023

大佬,你这写进周报两个月了,分配到人快一个月了。就做了一个issue合并。黄花菜都凉透了啊

问题是定位到了,但不太好处理,还需要再等等

@1045598742
Copy link

请问这个问题进展如何,3.6.15还是存在的 @Chen-jj

@we125182
Copy link

we125182 commented Dec 20, 2023

大佬,你这写进周报两个月了,分配到人快一个月了。就做了一个issue合并。黄花菜都凉透了啊

问题是定位到了,但不太好处理,还需要再等等

@Chen-jj 能贴下出问题的代码位置链接吗?我试着处理一下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-vue3 Framework - Vue 3 T-alipay Target - 编译到支付宝小程序 V-3 Version - 3.x
Projects
None yet
Development

No branches or pull requests

5 participants