update table

This commit is contained in:
lb
2022-08-08 13:47:56 +08:00
parent 06193447c8
commit 56bbc2497a
28 changed files with 195 additions and 156 deletions

View File

@@ -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)
}