alt 在mac 是option键。
方法块的注释:
1、vscode 里安装插件 Document This
2、将光标放置于function上面,快捷键是 Ctrl+Alt+D 加 Ctrl+Alt+D
/** *网络请求 * * @export * @class HttpUtil */ export default class HttpUtil { static get(url) { return new Promise((resolve,reject)=>{ fetch(url) .then(response=>response.json()) .then(result=>resolve(result)) .catch(erro=>reject(error)) }) } }
多行注释:[alt+shift+A]
/* export default class HttpUtil { static get(url) { return new Promise((resolve,reject)=>{ fetch(url) .then(response=>response.json()) .then(result=>resolve(result)) .catch(erro=>reject(error)) }) } } */
相关文章教程推荐:vscode教程
以上就是vscode怎样注释方法代码块的详细内容,更多请关注php中文网其它相关文章!
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号