640 Star 4.1K Fork 806

GVPDCloud / uni-app

 / 详情

v-if条件 编译为微信小程序错误

待办的
创建于  
2022-05-10 18:06

问题描述

源码为
v-if="(['add','apply'].includes(item.type)&&apply[item.type+'List'].length) || !['add','apply'].includes(item.type)"
编译后为
var g0 = ["add", "apply"].includes(item.type) && _vm.apply[item.type + "List"].length
var g1 = item.g0 || !["add", "apply"].includes(item.type)

注意 “var g1 = item.g0 || !["add", "apply"].includes(item.type)” 此处 item.g0 是不对的 应该为 g0 || !["add", "apply"].includes(item.type)

ask地址(里面有复现demo)
https://ask.dcloud.net.cn/question/144808

评论 (0)

Innovation 创建了任务

登录 后才可以发表评论

状态
负责人
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
参与者(1)
JavaScript
1
https://gitee.com/dcloud/uni-app.git
git@gitee.com:dcloud/uni-app.git
dcloud
uni-app
uni-app

搜索帮助

344bd9b3 5694891 D2dac590 5694891