The problem of indentation of Col tag child elements in VS Code

After < Row > < Col >
automatic formatting code is used in

VS Code, the child elements of the Col tag are flush with the Col

<Row>
    <Col>aaa</Col>
    <Col>
    <div class="box">bbb</div>
    </Col>
</Row>

div is not indented correctly
is supposed to be

<Row>
    <Col>aaa</Col>
    <Col>
        <div class="box">bbb</div>
    </Col>
</Row>

where should I make custom settings?

Jul.17,2022

clipboard.png



htmlcol
image.png
it is a special tag with no child elements, so whether it's eslint or prettier, the way this tag is handled is ambiguous.

to solve this problem, it is recommended to use iview-loader directly, and then template is all changed to < i-row > .
personal habits, jsx uses Row , template uses i-row

Menu