This commit is contained in:
lb
2023-03-08 16:04:30 +08:00
parent bbfd450c9f
commit 77eab26048
5 changed files with 99 additions and 83 deletions

View File

@@ -20,6 +20,11 @@ export default {
delete: '#FF5454',
preview: '#f09843',
design: '#99089f',
'destroy-order': '#FF5454',
'confirm-order': '#37d97f',
'end-order': '#f09843',
'move-to-top': '#8833ff',
'move-to-bottom': '#8833ff',
// 'view-trend': 'red'
// add more...
},
@@ -72,11 +77,11 @@ export default {
btns.push(
h('el-button',
{
props: { type: 'text' },
props: { type: opt.type ?? 'text', icon: opt.icon ? `el-icon-${opt.icon}` : '', title: opt.label ?? opt.name },
style: { color: this.colors[opt.name] || '#0b58ff' },
on: { click: this.emit.bind(null, opt) }
},
this.text[opt.name]
opt.icon ? opt.showText ? this.text[opt.name] ?? opt.label : '' : ''
)
)
}
@@ -89,7 +94,7 @@ export default {
style: { color: this.colors[opt] || '#0b58ff' },
on: { click: this.emit.bind(null, opt) }
},
this.text[opt]
this.text[opt] ?? opt
)
)
}