cloud-web-corejs 1.0.54-dev.266 → 1.0.54-dev.267
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
@@ -272,7 +272,21 @@
|
|
272
272
|
></el-button>
|
273
273
|
</template>
|
274
274
|
</el-table-column>
|
275
|
-
|
275
|
+
<el-table-column
|
276
|
+
:label="i18nt('显示名称颜色')"
|
277
|
+
width="100"
|
278
|
+
prop="fixed"
|
279
|
+
>
|
280
|
+
<template #default="scope">
|
281
|
+
<el-select v-model="scope.row.labelColor" clearable>
|
282
|
+
<el-option value="#e6a23c" label="橙"></el-option>
|
283
|
+
<el-option value="#2a6494" label="蓝"></el-option>
|
284
|
+
<el-option value="#30b08f" label="绿"></el-option>
|
285
|
+
<el-option value="#909399" label="灰"></el-option>
|
286
|
+
<el-option value="#ea5353" label="红"></el-option>
|
287
|
+
</el-select>
|
288
|
+
</template>
|
289
|
+
</el-table-column>
|
276
290
|
|
277
291
|
<el-table-column label="操作" width="150" fixed="right">
|
278
292
|
<template slot="header">
|
@@ -967,7 +981,8 @@ export default {
|
|
967
981
|
exportType: null,
|
968
982
|
footerDataType: null,
|
969
983
|
footerMethodConfg: null,
|
970
|
-
widgetList: []
|
984
|
+
widgetList: [],
|
985
|
+
labelColor:null
|
971
986
|
// treeNode: false,
|
972
987
|
};
|
973
988
|
return row;
|
@@ -873,6 +873,30 @@ modules = {
|
|
873
873
|
if (this.widget.options.hideGridCheckBox) {
|
874
874
|
otherConfig.checkBoxRequired = false;
|
875
875
|
}
|
876
|
+
|
877
|
+
//标题颜色
|
878
|
+
let headerCellStyle = null
|
879
|
+
let tableColumns = this.widget.options.tableColumns;
|
880
|
+
let colorMap = {}
|
881
|
+
let flag = 0
|
882
|
+
tableColumns.forEach(item=>{
|
883
|
+
if(item.labelColor){
|
884
|
+
flag = 1;
|
885
|
+
colorMap[item.columnId] = item.labelColor
|
886
|
+
}
|
887
|
+
})
|
888
|
+
if(flag){
|
889
|
+
headerCellStyle = (rowParam)=>{
|
890
|
+
let columnId = rowParam.column?.params?.columnId;
|
891
|
+
if(columnId){
|
892
|
+
let color = colorMap[rowParam.column.params.columnId]
|
893
|
+
if(color){
|
894
|
+
return `color:${color};`
|
895
|
+
}
|
896
|
+
}
|
897
|
+
}
|
898
|
+
}
|
899
|
+
|
876
900
|
let tableOption = {
|
877
901
|
// vue: this,
|
878
902
|
tableRef: tableRef,
|
@@ -886,6 +910,7 @@ modules = {
|
|
886
910
|
showFooter,
|
887
911
|
pagerConfig,
|
888
912
|
treeConfig,
|
913
|
+
headerCellStyle,
|
889
914
|
...editOpts,
|
890
915
|
...dataTableConfig.config,
|
891
916
|
/*rowConfig:{
|