Wot UI 版本号
1.14.0
平台
微信小程序
复现Demo地址(如不提供,将被直接关闭)
111
重现步骤
wd-avatar 中用了 ?? 导致 let count = parent.children?.length ?? 0 错误
真机调试 Error: 非法的文件,错误信息:invalid file: node-modules/wot-design-uni/components/wd-avatar/wd-avatar.js, 1:1615, SyntaxError: Unexpected token ?"use strict";const e=require("../../../../common/vendor.js");Math||(t+o)();const o=()=>"../wd-icon/wd-icon.js",t=()=>"../wd-img/wd-img.js",a=e.defineComponent({name:"wd-avatar",options:{addGlobalClass:!0,virtualHost:!0,styleIsolation:"shared"},props:e.avatarProps,emits:["error","click"],setup(o,{emit:t}){const a=o,s=t,r=e.useSlots(),{parent:n,index:i}=a._internal?{parent:null,index... [20260316 09:43:37][wxc67a0d1fb8824a7d] [1.06.2504030][win32-x64]``
期望的结果是什么?
我现在改成了
let count = parent.children?.length !== undefined ? parent.children?.length : 0``
实际的结果是什么?
修复问题,可以真机调试
环境信息
No response
其他补充信息
No response
Wot UI 版本号
1.14.0
平台
微信小程序
复现Demo地址(如不提供,将被直接关闭)
111
重现步骤
wd-avatar 中用了 ?? 导致 let count = parent.children?.length ?? 0 错误
真机调试 Error: 非法的文件,错误信息:invalid file: node-modules/wot-design-uni/components/wd-avatar/wd-avatar.js, 1:1615, SyntaxError: Unexpected token ?"use strict";const e=require("../../../../common/vendor.js");Math||(t+o)();const o=()=>"../wd-icon/wd-icon.js",t=()=>"../wd-img/wd-img.js",a=e.defineComponent({name:"wd-avatar",options:{addGlobalClass:!0,virtualHost:!0,styleIsolation:"shared"},props:e.avatarProps,emits:["error","click"],setup(o,{emit:t}){const a=o,s=t,r=e.useSlots(),{parent:n,index:i}=a._internal?{parent:null,index... [20260316 09:43:37][wxc67a0d1fb8824a7d][1.06.2504030][win32-x64]``期望的结果是什么?
我现在改成了
let count = parent.children?.length !== undefined ? parent.children?.length :0``实际的结果是什么?
修复问题,可以真机调试
环境信息
No response
其他补充信息
No response