其他分享
首页 > 其他分享> > Antd-Vue插槽内属性修改

Antd-Vue插槽内属性修改

作者:互联网

antd-vue table scopedSlots

scopedSlots插槽内属性修改

如下我想要根据状态来控制插槽内a标签点击与不可点击的切换

<span slot="operation"  slot-scope="text, record">
	<a @click="handleWarehousing(record)" v-has="'ewm:warehousing'" :disabled="toggleDisabled">入库</a>
</span>

最初是打算定义toggleDisabled临时参数来控制,但是没有生效
解决方法:利用record获取status来改变插槽内的属性

<span slot="operation"  slot-scope="text, record">
	<a @click="handleWarehousing(record)" v-has="'ewm:warehousing'" :disabled="record.status == '1' ? true:false">入库</a>
</span>
效果

image

标签:Vue,scopedSlots,插槽,修改,点击,Antd,入库,属性
来源: https://www.cnblogs.com/decent/p/16144035.html