调整表格配置

This commit is contained in:
zyy 2020-09-22 18:45:20 +08:00
parent d93cbc4beb
commit 0ed3d83273
3 changed files with 22 additions and 8 deletions

View File

@ -191,7 +191,7 @@ export default class StateTable extends Group {
y2: rowNum * model.rowHeight
},
style: {
stroke: '#FFF',
stroke: model.borderColor || '#FFF',
lineWidth: 2
}
});
@ -208,7 +208,7 @@ export default class StateTable extends Group {
height: rowNum * model.rowHeight
},
style: {
stroke: '#aFFF',
stroke: model.borderColor || '#aFFF',
fill: 'rgba(255, 255, 255, 0)',
lineWidth: 2
}
@ -225,7 +225,7 @@ export default class StateTable extends Group {
y2: i * model.rowHeight
},
style: {
stroke: '#FFF',
stroke: model.borderColor || '#FFF',
lineWidth: 2
}
});
@ -244,7 +244,7 @@ export default class StateTable extends Group {
fontSize: model.headerFontSize,
fontFamily: 'consolas',
text: model.headerContextList[0],
textFill: '#FFF',
textFill: model.textColor || '#FFF',
textAlign: 'center',
textPosition: 'inside',
textVerticalAlign: 'bottom',
@ -266,7 +266,7 @@ export default class StateTable extends Group {
fontSize: model.headerFontSize,
fontFamily: 'consolas',
text: model.headerContextList[i],
textFill: '#FFF',
textFill: model.textColor || '#FFF',
textAlign: 'center',
textPosition: 'inside',
textVerticalAlign: 'bottom',
@ -310,7 +310,7 @@ export default class StateTable extends Group {
fontSize: model.fontSize,
fontFamily: 'consolas',
text: stateMap[item['column' + (j + 1)]] ? stateMap[item['column' + (j + 1)]].default : item['column' + (j + 1)],
textFill: stateMap[item['column' + (j + 1)]] ? stateMap[item['column' + (j + 1)]].color : '#4CCDE4',
textFill: stateMap[item['column' + (j + 1)]] ? stateMap[item['column' + (j + 1)]].color : this.model.textColor ? this.model.textColor : '#4CCDE4',
textAlign: 'center',
textPosition: 'inside',
textVerticalAlign: 'bottom',
@ -331,7 +331,7 @@ export default class StateTable extends Group {
fontSize: model.fontSize,
fontFamily: 'consolas',
text: stateMap[item['column' + (j + 1)]] ? stateMap[item['column' + (j + 1)]].unit : '',
textFill: stateMap[item['column' + (j + 1)]] ? stateMap[item['column' + (j + 1)]].unitColor : '#4CCDE4',
textFill: stateMap[item['column' + (j + 1)]] ? stateMap[item['column' + (j + 1)]].unitColor : this.model.textColor ? this.model.textColor : '#4CCDE4',
textAlign: 'right',
textPosition: 'inside',
textVerticalAlign: 'bottom',

View File

@ -10,6 +10,12 @@
<el-form-item label="y坐标:" prop="y">
<el-input-number v-model="addModel.y" controls-position="right" :min="1" size="small" />
</el-form-item>
<el-form-item label="文字颜色:">
<el-color-picker v-model="addModel.textColor" size="small" />
</el-form-item>
<el-form-item label="表格颜色:">
<el-color-picker v-model="addModel.borderColor" size="small" />
</el-form-item>
<el-form-item label="列数:" prop="columnNum">
<el-input-number v-model="addModel.columnNum" controls-position="right" :min="1" size="small" @change="changeColumnNum" />
</el-form-item>
@ -94,6 +100,8 @@ export default {
columnNum: 2,
rowNum: 2,
columnWidthList: [50, 50],
textColor: '',
borderColor: '',
headerType: 'normal',
tableData: [{}],
headerContextList: [],
@ -173,6 +181,8 @@ export default {
this.addModel.y = model.point.y;
this.addModel.columnNum = model.columnNum;
this.addModel.rowNum = model.rowNum;
this.addModel.textColor = model.textColor;
this.addModel.borderColor = model.borderColor;
this.addModel.columnWidthList = model.columnWidthList;
this.addModel.headerType = model.headerType;
this.addModel.tableData = model.tableData;
@ -205,6 +215,8 @@ export default {
headerType: this.addModel.headerType,
tableData: this.addModel.tableData,
_type: 'StateTable',
textColor: this.addModel.textColor,
borderColor: this.addModel.borderColor,
headerFontSize: this.addModel.headerFontSize,
fontSize: this.addModel.fontSize,
headerContextList: this.addModel.headerContextList,
@ -247,6 +259,8 @@ export default {
rowHeight: 25,
x: 10,
y: 10,
textColor: '',
borderColor: '',
columnNum: 2,
rowNum: 2,
columnWidthList: [50, 50],

View File

@ -20,7 +20,7 @@
<el-input-number v-model="form.y" controls-position="right" :min="1" size="small" />
</el-form-item>
<el-form-item label="背景颜色:">
<el-color-picker v-model="form.gbColor" size="small" />
<el-color-picker v-model="form.gbColor" show-alpha size="small" />
</el-form-item>
<el-form-item label="背景描边颜色:">
<el-color-picker v-model="form.gbColorBorder" size="small" />