update table
This commit is contained in:
@@ -23,11 +23,15 @@ export default {
|
||||
// add more...
|
||||
},
|
||||
colors: {
|
||||
delete: '#FF5454',
|
||||
// add more...
|
||||
},
|
||||
text: {
|
||||
// for i18n inject:
|
||||
add: '添加'
|
||||
edit: '编辑',
|
||||
detail: '详情',
|
||||
delete: '删除',
|
||||
viewAttr: '查看属性'
|
||||
// add more...
|
||||
}
|
||||
}
|
||||
@@ -38,7 +42,8 @@ export default {
|
||||
render: function (h) {
|
||||
let btns = []
|
||||
for (const optionStr of this.injectData.head?.options) {
|
||||
btns.push(h('el-button', { props: { type: this.btnTypes[optionStr] } }, optionStr))
|
||||
// btns.push(h('el-button', { props: { type: this.btnTypes[optionStr] } }, optionStr))
|
||||
btns.push(h('el-button', { props: { type: 'text' }, style: { color: this.colors[optionStr] || '#0b58ff' } }, this.text[optionStr]))
|
||||
}
|
||||
return h('span', null, btns)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user