no message
Former-commit-id: 1b2f1baeae33e808752807c3a81a1c223f1d6977 Former-commit-id: ad497bd41f2cc3e768dfe3ac26f93d6f14f966db Former-commit-id: b02a77a0a87900942921eab8f587c9b6409ab1b7
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="small">编辑</el-button>
|
||||
<el-button v-bind="editButtonSettingMaker(scope)">编辑</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -66,7 +66,7 @@ export default {
|
||||
name,
|
||||
address1,
|
||||
address2,
|
||||
__edit: true // 在这里可以添加额外的判断逻辑
|
||||
__edit: false // 在这里可以添加额外的判断逻辑
|
||||
})
|
||||
return val.map(e => rowFilter(e))
|
||||
},
|
||||
@@ -95,6 +95,13 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
// 返回编辑按钮需要的参数
|
||||
editButtonSettingMaker (scope) {
|
||||
const isEdit = scope.row.__edit
|
||||
return {
|
||||
size: 'small'
|
||||
}
|
||||
},
|
||||
// 测试
|
||||
log (scope) {
|
||||
console.log(scope)
|
||||
|
||||
Reference in New Issue
Block a user