【发布时间】:2020-04-13 03:33:24
【问题描述】:
我的 html 代码格式如下:
<a href="#step-1" id="accountInfoTab" role="tab" aria-controls="accountInfo"
:aria-expanded="activeSection == 'step-1' ? 'true': 'false'" @click="triggerActiveSection('step-1')">
<span class="step-no hidden-sm hidden-xs"
v-html="$options.filters.i18n('registration-form-label-tab-step-1')"></span>
<span class="hidden-sm hidden-xs">{{ "registration-form-label-tab-account-info" | i18n }}</span>
</a>
我想将我的代码重新格式化为以下格式:
<a
href="#step-1"
id="accountInfoTab"
role="tab"
aria-controls="accountInfo"
:aria-expanded="activeSection == 'step-1' ? 'true': 'false'"
@click="triggerActiveSection('step-1')">
<span class="step-no hidden-sm hidden-xs" v-html="$options.filters.i18n('registration-form-label-tab-step-1')"></span>
<span class="hidden-sm hidden-xs">{{ "registration-form-label-tab-account-info" | i18n }}</span>
</a>
在 VScode 或任何其他工具中是否有键盘快捷键或任何其他方式(除了手动间隔代码,因为它需要很长时间)?
【问题讨论】:
标签: html visual-studio-code formatting