feat: 视图表格组件,表头 表格支持行高修改

This commit is contained in:
junjie 2021-06-28 16:21:54 +08:00
parent a0565d96ee
commit 99fcfe29c1
6 changed files with 25 additions and 6 deletions

View File

@ -718,7 +718,9 @@ export default {
chartName: 'New Chart',
chart_show_error: 'can not show normal',
chart_error_tips: 'Please contact admin ',
title_cannot_empty: 'Title can not be empty'
title_cannot_empty: 'Title can not be empty',
table_title_height: 'Table header height',
table_item_height: 'Table row height'
},
dataset: {
sheet_warn: 'There are multiple sheet pages, and the first one is extracted by default',

View File

@ -760,7 +760,9 @@ export default {
chartName: '新建視圖',
chart_show_error: '無法正常顯示',
chart_error_tips: '如有疑問請聯系管理員',
title_cannot_empty: '標題不能為空'
title_cannot_empty: '標題不能為空',
table_title_height: '表頭行高',
table_item_height: '表格行高'
},
dataset: {
sheet_warn: '有多個sheet頁面默認抽取第一個',

View File

@ -718,7 +718,9 @@ export default {
chartName: '新建视图',
chart_show_error: '无法正常显示',
chart_error_tips: '如有疑问请联系管理员',
title_cannot_empty: '标题不能为空'
title_cannot_empty: '标题不能为空',
table_title_height: '表头行高',
table_item_height: '表格行高'
},
dataset: {
sheet_warn: '有多个 Sheet 页,默认抽取第一个',

View File

@ -27,6 +27,8 @@ export const DEFAULT_SIZE = {
radarShape: 'polygon',
tableTitleFontSize: 12,
tableItemFontSize: 12,
tableTitleHeight: 36,
tableItemHeight: 36,
gaugeMin: 0,
gaugeMax: 100,
gaugeStartAngle: 225,

View File

@ -97,6 +97,12 @@
<el-option v-for="option in fontSize" :key="option.value" :label="option.name" :value="option.value" />
</el-select>
</el-form-item>
<el-form-item :label="$t('chart.table_title_height')" class="form-item">
<el-slider v-model="sizeForm.tableTitleHeight" :min="36" :max="100" show-input :show-input-controls="false" input-size="mini" @change="changeBarSizeCase" />
</el-form-item>
<el-form-item :label="$t('chart.table_item_height')" class="form-item">
<el-slider v-model="sizeForm.tableItemHeight" :min="36" :max="100" show-input :show-input-controls="false" input-size="mini" @change="changeBarSizeCase" />
</el-form-item>
</el-form>
<el-form v-show="chart.type && chart.type.includes('gauge')" ref="sizeFormGauge" :model="sizeForm" label-width="100px" size="mini">

View File

@ -68,17 +68,20 @@ export default {
table_header_class: {
fontSize: '12px',
color: '#606266',
background: '#e8eaec'
background: '#e8eaec',
height: '36px'
},
table_item_class: {
fontSize: '12px',
color: '#606266',
background: '#ffffff'
background: '#ffffff',
height: '36px'
},
table_item_class_stripe: {
fontSize: '12px',
color: '#606266',
background: '#ffffff'
background: '#ffffff',
height: '36px'
},
title_show: true
}
@ -149,6 +152,8 @@ export default {
if (customAttr.size) {
this.table_header_class.fontSize = customAttr.size.tableTitleFontSize + 'px'
this.table_item_class.fontSize = customAttr.size.tableItemFontSize + 'px'
this.table_header_class.height = customAttr.size.tableTitleHeight + 'px'
this.table_item_class.height = customAttr.size.tableItemHeight + 'px'
}
this.table_item_class_stripe = JSON.parse(JSON.stringify(this.table_item_class))
//