所以我在一个主要使用 VSCode 进行前端工作的团队中工作,我自己使用 Intellij,因为这是我的习惯。 问题是,当我使用 Intellij 对代码进行格式化时,它会在<script>
和<style>
标签内为代码添加初始缩进,这不是世界上最大的问题 - 只是有点麻烦。
他们的代码如下所示:
<script lang="ts">
import { Component, Prop, Vue } from 'vue-property-decorator';
@Component
export default class CollapsibleSection extends Vue {
@Prop() public index: any;
@Prop() public value: any;
public isActive() {
return this.index === this.value;
}
}
</script>
我的代码看起来像这样:
<script lang="ts">
import {Component, Prop, Vue} from 'vue-property-decorator';
@Component
export default class CollapsibleSection extends Vue {
@Prop() public index: any;
@Prop() public value: any;
public isActive() {
return this.index === this.value;
}
}
</script>