提交 9975287b authored 作者: junjie's avatar junjie

feat(frontend):表格合计样式fix

上级 91eef920
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
<div ref="tableContainer" :style="bg_class"> <div ref="tableContainer" :style="bg_class">
<p v-show="title_show" ref="title" :style="title_class">{{ chart.title }}</p> <p v-show="title_show" ref="title" :style="title_class">{{ chart.title }}</p>
<ux-grid <ux-grid
:id="chart.id"
ref="plxTable" ref="plxTable"
size="mini" size="mini"
style="width: 100%;" style="width: 100%;"
...@@ -12,6 +11,7 @@ ...@@ -12,6 +11,7 @@
:header-row-style="table_header_class" :header-row-style="table_header_class"
:row-style="getRowStyle" :row-style="getRowStyle"
class="table-class" class="table-class"
:class="chart.id"
show-summary show-summary
:summary-method="summaryMethod" :summary-method="summaryMethod"
> >
...@@ -169,16 +169,18 @@ export default { ...@@ -169,16 +169,18 @@ export default {
} }
} }
// 修改footer合计样式 // 修改footer合计样式
const table = document.getElementById(this.chart.id) const table = document.getElementsByClassName(this.chart.id)
const s_table = table.getElementsByClassName('elx-table--footer') for (let i = 0; i < table.length; i++) {
// console.log(s_table) const s_table = table[i].getElementsByClassName('elx-table--footer')
let s = '' // console.log(s_table)
for (const i in this.table_header_class) { let s = ''
s += (i === 'fontSize' ? 'font-size' : i) + ':' + this.table_header_class[i] + ';' for (const i in this.table_header_class) {
} s += (i === 'fontSize' ? 'font-size' : i) + ':' + this.table_header_class[i] + ';'
console.log(s_table) }
for (let i = 0; i < s_table.length; i++) { // console.log(s_table)
s_table[i].setAttribute('style', s) for (let i = 0; i < s_table.length; i++) {
s_table[i].setAttribute('style', s)
}
} }
}, },
getRowStyle({ row, rowIndex }) { getRowStyle({ row, rowIndex }) {
...@@ -223,6 +225,10 @@ export default { ...@@ -223,6 +225,10 @@ export default {
chartResize() { chartResize() {
// 指定图表的配置项和数据 // 指定图表的配置项和数据
this.calcHeight() this.calcHeight()
},
initClass() {
return this.chart.id
} }
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论