Gitea v1.21.1 中文文档时,才将函数标记为 async 。 不建议使用 async 事件监听器,这可能会导致问题。 原因是 await 后的代码在事件分发之外执行。 参 考:https://github.com/github/eslint-plugin-github/blob/main/docs/rules/async- preventdefault.md 如果一个事件监听器必须是 async ,应在任何 await await 之前使用 e.preventDefault() , 建议将其放在函数的开头。 如果我们想在非异步上下文中调用 async 函数, 建议使用 const _promise = asyncFoo() 来告诉读者 这是有意为之 的,我们想调用异步函数并忽略Promise。 一些 lint 规则和 IDE 也会在未处理返回的 Promise 时发出警告。 禁止使用 dataset 不应使用 node.dataset ,而应使用 node.getAttribute 。 不要将任何用户数据绑定到 DOM 节点上,使用合适的设计模式描述节点和数据之间的关系。 框架使用 async 函数 HTML 属性和 dataset 前端开发指南 - 288 - 本文档使用 书栈网 · BookStack.CN 构建 推荐在Vue组件中使用 v-if 和 v-show 来显示/隐藏元素。0 码力 | 303 页 | 3.88 MB | 1 年前3
 Pro Git 2nd Edition 2.1.413As you can see, the gmtime_r routine is called from both the match_multi_number and match_digit functions in the date.c file (the third match displayed represents just the string appearing in a comment) these lines to your ~/.zshrc file: autoload -Uz vcs_info precmd_vcs_info() { vcs_info } precmd_functions+=( precmd_vcs_info ) setopt prompt_subst RPROMPT='${vcs_info_msg_0_}' # PROMPT='${vcs_info_msg_0_}%#0 码力 | 731 页 | 21.49 MB | 1 年前3
 Pro Git 2nd Edition 2.1.413As you can see, the gmtime_r routine is called from both the match_multi_number and match_digit functions in the date.c file (the third match displayed represents just the string appearing in a comment) these lines to your ~/.zshrc file: autoload -Uz vcs_info precmd_vcs_info() { vcs_info } precmd_functions+=( precmd_vcs_info ) setopt prompt_subst RPROMPT='${vcs_info_msg_0_}' # PROMPT='${vcs_info_msg_0_}%#0 码力 | 501 页 | 17.96 MB | 1 年前3
 Pro Git 2nd Edition 2.1.413 As you can see, the gmtime_r routine is called from both the match_multi_number and match_digit functions in the date.c file (the third match displayed represents just the string appearing in a comment) these lines to your ~/.zshrc file: autoload -Uz vcs_info precmd_vcs_info() { vcs_info } precmd_functions+=( precmd_vcs_info ) setopt prompt_subst RPROMPT='${vcs_info_msg_0_}' # PROMPT='${vcs_info_msg_0_}%#0 码力 | 691 页 | 13.35 MB | 1 年前3
 Pro Git 中文版 第2版 2.1.66把如下代码添加至你的 ~/.zshrc 文件 中,就可以在右侧显示分支名称: 463 autoload -Uz vcs_info precmd_vcs_info() { vcs_info } precmd_functions+=( precmd_vcs_info ) setopt prompt_subst RPROMPT=\$vcs_info_msg_0_ # PROMPT=\$vcs_info_msg_0_'%#0 码力 | 501 页 | 19.30 MB | 1 年前3
 Pro Git 中文版 第2版 2.1.66代码添加至你的 ~/.zshrc 文件中,就可以在右侧显示分支名称: autoload -Uz vcs_info precmd_vcs_info() { vcs_info } precmd_functions+=( precmd_vcs_info ) setopt prompt_subst RPROMPT=\$vcs_info_msg_0_ # PROMPT=\$vcs_info_msg_0_'%#0 码力 | 670 页 | 13.59 MB | 1 年前3
共 6 条
- 1
 













