Javascript VS代码更改我的HTML的默认格式
我真的不明白为什么VS代码会改变我的HTML格式,我已经删除了prettify。知道如何保留我提取的代码的格式吗?因为当我单击“保存”时,格式会发生更改 这是我提取代码时的格式Javascript VS代码更改我的HTML的默认格式,javascript,html,visual-studio-code,prettier,Javascript,Html,Visual Studio Code,Prettier,我真的不明白为什么VS代码会改变我的HTML格式,我已经删除了prettify。知道如何保留我提取的代码的格式吗?因为当我单击“保存”时,格式会发生更改 这是我提取代码时的格式 <div> <ng-container *ngIf="formSnapshot"> <feedback-request-form-renderer [answers]="answers"
<div>
<ng-container *ngIf="formSnapshot">
<feedback-request-form-renderer [answers]="answers"
[canEditFeedbackForm]="canEditFeedbackForm"
[canEditFeedbackResponse]="canEditFeedbackResponse"
[formName]="templateNameDisplay()"
[sections]="formSnapshot"
(whenEditFeedbackResponse)="editFeedbackResponse($event)"
(whenEditNote)="editNote($event)"
(whenRemoveNote)="removeNote($event)"
(whenRemoveQuestion)="removeQuestion($event)"
(whenRephraseQuestion)="rephraseQuestion($event)"
>
</feedback-request-form-renderer>
<div fxLayout="row" fxLayoutGap="24px" *ngIf="hasReceivedResponse">
<div fxFlex fxLayout="row">
<mat-form-field appearance="outline" class="pr-4" fxFlex>
<mat-label>Employee's comments</mat-label>
<textarea
cdkTextareaAutosize
cdkAutosizeMinRows="3"
formControlName="comments"
matInput
>
</textarea>
</mat-form-field>
</div>
</div>
员工意见
但当我保存它时,格式变为
<div>
<ng-container *ngIf="formSnapshot">
<feedback-request-form-renderer [answers]="answers" [canEditFeedbackForm]="canEditFeedbackForm"
[canEditFeedbackResponse]="canEditFeedbackResponse" [formName]="templateNameDisplay()"
[sections]="formSnapshot" (whenEditFeedbackResponse)="editFeedbackResponse($event)"
(whenEditNote)="editNote($event)" (whenRemoveNote)="removeNote($event)"
(whenRemoveQuestion)="removeQuestion($event)" (whenRephraseQuestion)="rephraseQuestion($event)">
</feedback-request-form-renderer>
<div fxLayout="row" fxLayoutGap="24px" *ngIf="hasReceivedResponse">
<div fxFlex fxLayout="row">
<mat-form-field appearance="outline" class="pr-4" fxFlex>
<mat-label>Employee's comments</mat-label>
<textarea cdkTextareaAutosize cdkAutosizeMinRows="3" formControlName="comments" matInput>
</textarea>
</mat-form-field>
</div>
</div>
</ng-container>
</div>
员工意见
VS代码中的设置在哪里?我想遵循团队的代码格式,我不想更改它我很确定这是你的一个插件,我不认为VSCode自己能做到这一点
如果你认为你已经卸载了所有的插件(应该列在左边的一个选项下)。关闭应用程序并重新启动。单击左下角VS代码中的设置,然后在搜索栏中键入保存,取消选中
编辑器:保存时格式化
框,这样就可以了。如果您单击左下角的扩展选项卡,它应该会显示所需的内容enabled@ShrewdStyle,这是启用的扩展,我已添加图像请检查URL这是我已安装的扩展列表我已添加图像请检查URL这很可能是ESLint中的一个设置。