<span @click="item.state == 1 && delData(item)" class="del-icon"><van-icon name="delete-o"/></span>
时间: 2023-12-20 11:07:45 浏览: 105
? item.state = 0 : item.state = 1">{{ item.state == 1 ? 'Active' : 'Inactive' }}</span>
This code creates a clickable span element that toggles between displaying "Active" and "Inactive" based on the value of the "state" property of the "item" object. When the span is clicked, the code checks if the "state" property is currently set to 1 (meaning active). If it is, it sets the "state" property to 0 (meaning inactive). If it isn't, it sets the "state" property to 1 (meaning active). The text displayed in the span is determined by whether the "state" property is currently set to 1 or 0.
阅读全文