right slide deletion of mint-ui fails
mint-uinavbar
.
.
<mt-navbar v-model="selected">
<mt-tab-item id="1"></mt-tab-item>
<mt-tab-item id="2"></mt-tab-item>
<mt-tab-item id="3"></mt-tab-item>
</mt-navbar>
<mt-tab-container v-model="selected">
<mt-tab-container-item id="1">
<div class="order-wrapper">
<div class="content" v-for="(item,index) in order" :key="index" @click="pushToDetali">
<mt-cell-swipe
:right="[
{
content: "",
style: { background: "-sharpff0000", color: "-sharpfff"},
handler: () => deleteSection(index)
}
]">
</mt-cell-swipe>
</div>
</div>
</mt-tab-container-item>
<mt-tab-container-item id="2">
<order-list></order-list>
</mt-tab-container-item>
<mt-tab-container-item id="3">
<order-list></order-list>
</mt-tab-container-item>
</mt-tab-container>
later, it is found that it is related to the initialized selected value. If the selected, bound by mt-navbar is 1, then 1 is normal, and 2 selected, 3 is out of order, but the selected, selected value of watch changes when the content area is switched. Is this component not initialized?
ask the boss for help and advice, thank you
< hr > < H2 > I also tried to write the content area into components, three content areas into three files. Used for display. It still doesn"t work. At this time, I have replaced mint-ui "s navbar with my own handwritten, which can rule out the problem of navbar. < / H2 >No, no, no. If you look for a lot of bug.. on the Internet, it will be a little bit more or less.