调整表格配置
This commit is contained in:
parent
d93cbc4beb
commit
0ed3d83273
@ -191,7 +191,7 @@ export default class StateTable extends Group {
|
|||||||
y2: rowNum * model.rowHeight
|
y2: rowNum * model.rowHeight
|
||||||
},
|
},
|
||||||
style: {
|
style: {
|
||||||
stroke: '#FFF',
|
stroke: model.borderColor || '#FFF',
|
||||||
lineWidth: 2
|
lineWidth: 2
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -208,7 +208,7 @@ export default class StateTable extends Group {
|
|||||||
height: rowNum * model.rowHeight
|
height: rowNum * model.rowHeight
|
||||||
},
|
},
|
||||||
style: {
|
style: {
|
||||||
stroke: '#aFFF',
|
stroke: model.borderColor || '#aFFF',
|
||||||
fill: 'rgba(255, 255, 255, 0)',
|
fill: 'rgba(255, 255, 255, 0)',
|
||||||
lineWidth: 2
|
lineWidth: 2
|
||||||
}
|
}
|
||||||
@ -225,7 +225,7 @@ export default class StateTable extends Group {
|
|||||||
y2: i * model.rowHeight
|
y2: i * model.rowHeight
|
||||||
},
|
},
|
||||||
style: {
|
style: {
|
||||||
stroke: '#FFF',
|
stroke: model.borderColor || '#FFF',
|
||||||
lineWidth: 2
|
lineWidth: 2
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -244,7 +244,7 @@ export default class StateTable extends Group {
|
|||||||
fontSize: model.headerFontSize,
|
fontSize: model.headerFontSize,
|
||||||
fontFamily: 'consolas',
|
fontFamily: 'consolas',
|
||||||
text: model.headerContextList[0],
|
text: model.headerContextList[0],
|
||||||
textFill: '#FFF',
|
textFill: model.textColor || '#FFF',
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
textPosition: 'inside',
|
textPosition: 'inside',
|
||||||
textVerticalAlign: 'bottom',
|
textVerticalAlign: 'bottom',
|
||||||
@ -266,7 +266,7 @@ export default class StateTable extends Group {
|
|||||||
fontSize: model.headerFontSize,
|
fontSize: model.headerFontSize,
|
||||||
fontFamily: 'consolas',
|
fontFamily: 'consolas',
|
||||||
text: model.headerContextList[i],
|
text: model.headerContextList[i],
|
||||||
textFill: '#FFF',
|
textFill: model.textColor || '#FFF',
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
textPosition: 'inside',
|
textPosition: 'inside',
|
||||||
textVerticalAlign: 'bottom',
|
textVerticalAlign: 'bottom',
|
||||||
@ -310,7 +310,7 @@ export default class StateTable extends Group {
|
|||||||
fontSize: model.fontSize,
|
fontSize: model.fontSize,
|
||||||
fontFamily: 'consolas',
|
fontFamily: 'consolas',
|
||||||
text: stateMap[item['column' + (j + 1)]] ? stateMap[item['column' + (j + 1)]].default : item['column' + (j + 1)],
|
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',
|
textAlign: 'center',
|
||||||
textPosition: 'inside',
|
textPosition: 'inside',
|
||||||
textVerticalAlign: 'bottom',
|
textVerticalAlign: 'bottom',
|
||||||
@ -331,7 +331,7 @@ export default class StateTable extends Group {
|
|||||||
fontSize: model.fontSize,
|
fontSize: model.fontSize,
|
||||||
fontFamily: 'consolas',
|
fontFamily: 'consolas',
|
||||||
text: stateMap[item['column' + (j + 1)]] ? stateMap[item['column' + (j + 1)]].unit : '',
|
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',
|
textAlign: 'right',
|
||||||
textPosition: 'inside',
|
textPosition: 'inside',
|
||||||
textVerticalAlign: 'bottom',
|
textVerticalAlign: 'bottom',
|
||||||
|
@ -10,6 +10,12 @@
|
|||||||
<el-form-item label="y坐标:" prop="y">
|
<el-form-item label="y坐标:" prop="y">
|
||||||
<el-input-number v-model="addModel.y" controls-position="right" :min="1" size="small" />
|
<el-input-number v-model="addModel.y" controls-position="right" :min="1" size="small" />
|
||||||
</el-form-item>
|
</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-form-item label="列数:" prop="columnNum">
|
||||||
<el-input-number v-model="addModel.columnNum" controls-position="right" :min="1" size="small" @change="changeColumnNum" />
|
<el-input-number v-model="addModel.columnNum" controls-position="right" :min="1" size="small" @change="changeColumnNum" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -94,6 +100,8 @@ export default {
|
|||||||
columnNum: 2,
|
columnNum: 2,
|
||||||
rowNum: 2,
|
rowNum: 2,
|
||||||
columnWidthList: [50, 50],
|
columnWidthList: [50, 50],
|
||||||
|
textColor: '',
|
||||||
|
borderColor: '',
|
||||||
headerType: 'normal',
|
headerType: 'normal',
|
||||||
tableData: [{}],
|
tableData: [{}],
|
||||||
headerContextList: [],
|
headerContextList: [],
|
||||||
@ -173,6 +181,8 @@ export default {
|
|||||||
this.addModel.y = model.point.y;
|
this.addModel.y = model.point.y;
|
||||||
this.addModel.columnNum = model.columnNum;
|
this.addModel.columnNum = model.columnNum;
|
||||||
this.addModel.rowNum = model.rowNum;
|
this.addModel.rowNum = model.rowNum;
|
||||||
|
this.addModel.textColor = model.textColor;
|
||||||
|
this.addModel.borderColor = model.borderColor;
|
||||||
this.addModel.columnWidthList = model.columnWidthList;
|
this.addModel.columnWidthList = model.columnWidthList;
|
||||||
this.addModel.headerType = model.headerType;
|
this.addModel.headerType = model.headerType;
|
||||||
this.addModel.tableData = model.tableData;
|
this.addModel.tableData = model.tableData;
|
||||||
@ -205,6 +215,8 @@ export default {
|
|||||||
headerType: this.addModel.headerType,
|
headerType: this.addModel.headerType,
|
||||||
tableData: this.addModel.tableData,
|
tableData: this.addModel.tableData,
|
||||||
_type: 'StateTable',
|
_type: 'StateTable',
|
||||||
|
textColor: this.addModel.textColor,
|
||||||
|
borderColor: this.addModel.borderColor,
|
||||||
headerFontSize: this.addModel.headerFontSize,
|
headerFontSize: this.addModel.headerFontSize,
|
||||||
fontSize: this.addModel.fontSize,
|
fontSize: this.addModel.fontSize,
|
||||||
headerContextList: this.addModel.headerContextList,
|
headerContextList: this.addModel.headerContextList,
|
||||||
@ -247,6 +259,8 @@ export default {
|
|||||||
rowHeight: 25,
|
rowHeight: 25,
|
||||||
x: 10,
|
x: 10,
|
||||||
y: 10,
|
y: 10,
|
||||||
|
textColor: '',
|
||||||
|
borderColor: '',
|
||||||
columnNum: 2,
|
columnNum: 2,
|
||||||
rowNum: 2,
|
rowNum: 2,
|
||||||
columnWidthList: [50, 50],
|
columnWidthList: [50, 50],
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
<el-input-number v-model="form.y" controls-position="right" :min="1" size="small" />
|
<el-input-number v-model="form.y" controls-position="right" :min="1" size="small" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="背景颜色:">
|
<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>
|
||||||
<el-form-item label="背景描边颜色:">
|
<el-form-item label="背景描边颜色:">
|
||||||
<el-color-picker v-model="form.gbColorBorder" size="small" />
|
<el-color-picker v-model="form.gbColorBorder" size="small" />
|
||||||
|
Loading…
Reference in New Issue
Block a user