no message

Former-commit-id: 1b2f1baeae33e808752807c3a81a1c223f1d6977
Former-commit-id: ad497bd41f2cc3e768dfe3ac26f93d6f14f966db
Former-commit-id: b02a77a0a87900942921eab8f587c9b6409ab1b7
This commit is contained in:
李杨
2018-03-28 16:41:47 +08:00
parent d423a80176
commit 757bf91e46
2 changed files with 10 additions and 2 deletions

View File

@@ -21,6 +21,7 @@
"github-markdown-css": "^2.10.0", "github-markdown-css": "^2.10.0",
"highlight.js": "^9.12.0", "highlight.js": "^9.12.0",
"js-cookie": "^2.2.0", "js-cookie": "^2.2.0",
"lodash.clonedeep": "^4.5.0",
"lodash.get": "^4.4.2", "lodash.get": "^4.4.2",
"marked": "^0.3.9", "marked": "^0.3.9",
"mockjs": "^1.0.1-beta3", "mockjs": "^1.0.1-beta3",

View File

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