update table样式 - 推广至全局
This commit is contained in:
parent
0771397f19
commit
ae780b7675
@ -39,8 +39,8 @@
|
|||||||
<script>
|
<script>
|
||||||
// window.SITE_CONFIG['apiURL'] = 'http://192.168.1.103:8080/pms-am';
|
// window.SITE_CONFIG['apiURL'] = 'http://192.168.1.103:8080/pms-am';
|
||||||
// window.SITE_CONFIG['apiURL'] = 'http://192.168.1.49:8080/pms-am'; // tengyun
|
// window.SITE_CONFIG['apiURL'] = 'http://192.168.1.49:8080/pms-am'; // tengyun
|
||||||
window.SITE_CONFIG['apiURL'] = 'http://192.168.1.62:8080/pms-am'; // tao
|
// window.SITE_CONFIG['apiURL'] = 'http://192.168.1.62:8080/pms-am'; // tao
|
||||||
// window.SITE_CONFIG['apiURL'] = 'http://192.168.1.21:8080/pms-am'; // xv
|
window.SITE_CONFIG['apiURL'] = 'http://192.168.1.21:8080/pms-am'; // xv
|
||||||
</script>
|
</script>
|
||||||
<% } %>
|
<% } %>
|
||||||
<!-- 集成测试环境 -->
|
<!-- 集成测试环境 -->
|
||||||
|
@ -9,7 +9,9 @@
|
|||||||
padding: '8px 0',
|
padding: '8px 0',
|
||||||
}"
|
}"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
>
|
:cell-style="{ padding: 0 }"
|
||||||
|
border
|
||||||
|
>
|
||||||
<!-- :cell-style="{ padding: 0 }" -->
|
<!-- :cell-style="{ padding: 0 }" -->
|
||||||
<!-- @cell-mouse-enter="(row, col, cell, event) => $emit('cell-mouse-enter', row, col, cell, event)"> -->
|
<!-- @cell-mouse-enter="(row, col, cell, event) => $emit('cell-mouse-enter', row, col, cell, event)"> -->
|
||||||
<!-- @cell-mouse-leave="(row, col, cell, event) => $emit('cell-mouse-leave', row, col, cell, event)"> -->
|
<!-- @cell-mouse-leave="(row, col, cell, event) => $emit('cell-mouse-leave', row, col, cell, event)"> -->
|
||||||
@ -125,4 +127,8 @@ export default {
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped></style>
|
<style scoped>
|
||||||
|
.cell button {
|
||||||
|
background: blue;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
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 i18n from '@/i18n'
|
||||||
|
|
||||||
|
import './operationComponent.css'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "TableOperations",
|
name: "TableOperations",
|
||||||
props: {
|
props: {
|
||||||
@ -100,14 +102,18 @@ export default {
|
|||||||
props: {
|
props: {
|
||||||
type: opt.type ?? "text",
|
type: opt.type ?? "text",
|
||||||
icon: opt.icon ? `el-icon-${opt.icon}` : "",
|
icon: opt.icon ? `el-icon-${opt.icon}` : "",
|
||||||
title: opt.label ?? opt.name,
|
|
||||||
disabled: shouldDisabled,
|
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) },
|
on: { click: this.emit.bind(null, opt) },
|
||||||
},
|
},
|
||||||
opt.icon ? (opt.showText ? this.text[opt.name] ?? opt.label : "") : opt.label ?? this.text[opt.name]
|
opt.icon ? (opt.showText ? this.text[opt.name] ?? opt.label : "") : opt.label ?? this.text[opt.name]
|
||||||
)
|
)
|
||||||
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -117,7 +123,11 @@ export default {
|
|||||||
"el-button",
|
"el-button",
|
||||||
{
|
{
|
||||||
props: { type: "text" },
|
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) },
|
on: { click: this.emit.bind(null, opt) },
|
||||||
},
|
},
|
||||||
this.text[opt] ?? opt
|
this.text[opt] ?? opt
|
||||||
@ -125,6 +135,6 @@ export default {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return h("span", null, btns);
|
return h("div", null, btns);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -35,9 +35,9 @@ export default function () {
|
|||||||
width: 180,
|
width: 180,
|
||||||
subcomponent: TableOperaionComponent,
|
subcomponent: TableOperaionComponent,
|
||||||
options: [
|
options: [
|
||||||
{ name: "edit", label: "编辑", emitFull: true },
|
{ name: "edit", label: "编辑", emitFull: true, icon: 'edit-outline' },
|
||||||
{ name: "view-batch", label: "查看批次", color: "#ff8000", toRouter: 'pms-blenderBatch' }, // 路由跳转至 pms-blenderBatch
|
{ name: "view-batch", label: "查看批次", color: "#ff8000", toRouter: 'pms-blenderBatch', icon: 'document-copy' }, // 路由跳转至 pms-blenderBatch
|
||||||
{ name: "detach", label: "下发", color: "#099" },
|
{ name: "detach", label: "下发", color: "#099", icon: 'bottom-right' },
|
||||||
], // , url: '/pms/trans/pressDeli' }]
|
], // , url: '/pms/trans/pressDeli' }]
|
||||||
// options: ["copy", "edit", { name: "delete", emitFull: true, permission: "pms:blenderStep:delete" }],
|
// options: ["copy", "edit", { name: "delete", emitFull: true, permission: "pms:blenderStep:delete" }],
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user