Weex cannot use last-child pseudo-elements. How can I get the last child element?

the recent development project with weex is a list page, in which each item is separated by a margin-bottom, so that the last item will also have a bottom margin. In order to look beautiful, I need to remove the margin-bottom of the last item, but weex cannot use pseudo classes such as last-child. How can I remove the margins of the last element? The code snippet of
is as follows:

// html:
<div class="wrap">
    <div class="item"><text></text></div>
    <div class="item"><text></text></div>
    <div class="item"><text></text></div>
    <div class="item"><text></text></div>
</div>

// css:
.item {
    margin-bottom: 30px;
}
// itemweex:last-child
.item:last-child {
    margin-bottom: 0px;
}
Jul.02,2022

if you have just been exposed to weex for a week, you can use v-for to judge by the value of index.


      </div>

but it's a little ugly to write this way, and the simple array syntax on vue documents can't be rendered on the end, so that's what I've written so far.

Menu