-
Notifications
You must be signed in to change notification settings - Fork 18
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
fix: 修复?.可选调用表达式获取自定义属性时不做转换问题,包含测试用例 #338
fix: 修复?.可选调用表达式获取自定义属性时不做转换问题,包含测试用例 #338
Conversation
test('当使用e.target.dataset时引入工具函数 getTarget', () => { | ||
const entryJSON = { 'pages': ['pages/index/index'] } | ||
// json:index.json的内容 path:index的根目录(文件路径) rootPath:小程序的根目录(文件路径) | ||
// script:index.js的内容 scriptPath:index.js的绝对路径 wxml:index.html的内容 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里用多行注释是不是会好一点,不要一行多个注释
<button data-tagName="WX1314" data-tagData="{{ tagInfo }}" bindtap="getMsg02">调用自身方法获取自定义信息</button> | ||
<button data-tagName="WX1314" data-tagData="{{ tagInfo }}" catchtap="convertGetDataset02">调用外部方法获取自定义信息</button> | ||
` | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里的测试用例内容是否过于复杂,自行判断,如果合适的话,可以忽略,如果过于复杂的话,要精简一些
} | ||
} | ||
}, | ||
OptionalMemberExpression (astPath) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
函数描述需要添加吗
//变量赋值 | ||
const tagName_ = e.currentTarget.dataset.tagName | ||
const tagData_ = e.currentTarget.dataset.tagData | ||
console.log('data-xxx-xxx格式的e.currentTarget.dataset.tagName',tagName_) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
console.log不要提交
console.log('data-xxxXxx格式的解构赋值tagname',tagname) | ||
console.log('data-xxxXxx格式的解构赋值tagdata',tagdata) | ||
}, | ||
convertGetDataset, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这;两行是啥
`, | ||
scriptPath:'', | ||
wxml:` | ||
测试data-xxx-xxx写法 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
加个view
/
这个 PR 做了什么? (简要描述所做更改)
修复?.可选调用表达式获取自定义属性时不做转换问题,包含测试用例
这个 PR 是什么类型? (至少选择一个)
这个 PR 涉及以下平台: