update table样式 - 推广至全局
This commit is contained in:
16
src/components/noTemplateComponents/operationComponent.css
Normal file
16
src/components/noTemplateComponents/operationComponent.css
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
|
||||
.operate--btn {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
|
||||
.operate--btn:not(:last-child)::after {
|
||||
position: absolute;
|
||||
content: "";
|
||||
width: 1px;
|
||||
background: #ccc;
|
||||
right: -6px;
|
||||
top: 15%;
|
||||
height: 70%;
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
// import i18n from '@/i18n'
|
||||
|
||||
import './operationComponent.css'
|
||||
|
||||
export default {
|
||||
name: "TableOperations",
|
||||
props: {
|
||||
@@ -100,14 +102,18 @@ export default {
|
||||
props: {
|
||||
type: opt.type ?? "text",
|
||||
icon: opt.icon ? `el-icon-${opt.icon}` : "",
|
||||
title: opt.label ?? opt.name,
|
||||
disabled: shouldDisabled,
|
||||
},
|
||||
style: { color: !shouldDisabled && (opt.color || this.colors[opt.name] || "#0b58ff") },
|
||||
domProps: {
|
||||
title: opt.label ?? opt.name,
|
||||
},
|
||||
style: { color: !shouldDisabled && (opt.color || this.colors[opt.name] || "#0b58ff"), padding: '5px 0' },
|
||||
class: ['operate--btn'],
|
||||
on: { click: this.emit.bind(null, opt) },
|
||||
},
|
||||
opt.icon ? (opt.showText ? this.text[opt.name] ?? opt.label : "") : opt.label ?? this.text[opt.name]
|
||||
)
|
||||
|
||||
);
|
||||
}
|
||||
} else {
|
||||
@@ -117,7 +123,11 @@ export default {
|
||||
"el-button",
|
||||
{
|
||||
props: { type: "text" },
|
||||
style: { color: this.colors[opt] || "#0b58ff" },
|
||||
domProps: {
|
||||
title: opt.label ?? opt.name,
|
||||
},
|
||||
style: { color: this.colors[opt] || "#0b58ff", padding: 0 },
|
||||
class: ['operate--btn'],
|
||||
on: { click: this.emit.bind(null, opt) },
|
||||
},
|
||||
this.text[opt] ?? opt
|
||||
@@ -125,6 +135,6 @@ export default {
|
||||
);
|
||||
}
|
||||
}
|
||||
return h("span", null, btns);
|
||||
return h("div", null, btns);
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user