我想讓 el-button 中的 disabled 屬性根據(jù)scope中的數(shù)據(jù)動(dòng)態(tài)添加,應(yīng)該如何辦,雖然也可以使用 v-if 但是那樣需要?jiǎng)?chuàng)建兩個(gè) el-button 標(biāo)簽并做判斷, 所以如果標(biāo)簽中有其他標(biāo)簽且比較多,這樣代碼就會(huì)很多,有沒有其他辦法
2 回答

三國(guó)紛爭(zhēng)
TA貢獻(xiàn)1804條經(jīng)驗(yàn) 獲得超7個(gè)贊
<template> <el-button :disabled="scope.row.disabled"></el-button></template>
添加回答
舉報(bào)
0/150
提交
取消