agregar nueva clase de subtotal, se agregará en vcomponents, sub total de total fila
This commit is contained in:
parent
dba0d7970d
commit
33314359bf
@ -436,9 +436,7 @@ function makeRenderer() {
|
|||||||
null,
|
null,
|
||||||
rowKeysSub.map(function (rowKey, i) {
|
rowKeysSub.map(function (rowKey, i) {
|
||||||
var isSubTotal = rowKey.includes('[:sub-total:]');
|
var isSubTotal = rowKey.includes('[:sub-total:]');
|
||||||
var totalAggregator = isSubTotal ? { value: function value() {
|
var totalAggregator = getSubAggregator(rowKey, []);
|
||||||
return 0;
|
|
||||||
} } : pivotData.getAggregator(rowKey, []);
|
|
||||||
return _react2.default.createElement(
|
return _react2.default.createElement(
|
||||||
'tr',
|
'tr',
|
||||||
{ key: 'rowKeyRow' + i + ' ' + (isSubTotal ? ' bg-sky-50 ' : '') },
|
{ key: 'rowKeyRow' + i + ' ' + (isSubTotal ? ' bg-sky-50 ' : '') },
|
||||||
@ -464,7 +462,7 @@ function makeRenderer() {
|
|||||||
return _react2.default.createElement(
|
return _react2.default.createElement(
|
||||||
'td',
|
'td',
|
||||||
{
|
{
|
||||||
className: 'pvtVal ' + getValueClass(aggregator),
|
className: 'pvtVal ' + (isSubTotal ? 'pvtSubTotal' : ''),
|
||||||
key: 'pvtVal' + i + '-' + j,
|
key: 'pvtVal' + i + '-' + j,
|
||||||
onClick: getClickHandler && getClickHandler(aggregator.value(), rowKey, colKey),
|
onClick: getClickHandler && getClickHandler(aggregator.value(), rowKey, colKey),
|
||||||
style: valueCellColors(rowKey, colKey, aggregator.value())
|
style: valueCellColors(rowKey, colKey, aggregator.value())
|
||||||
@ -475,7 +473,7 @@ function makeRenderer() {
|
|||||||
_react2.default.createElement(
|
_react2.default.createElement(
|
||||||
'td',
|
'td',
|
||||||
{
|
{
|
||||||
className: 'pvtTotal',
|
className: ' pvtTotal ' + (isSubTotal ? 'pvtSubTotal' : '') + ' ',
|
||||||
onClick: getClickHandler && getClickHandler(totalAggregator.value(), rowKey, [null]),
|
onClick: getClickHandler && getClickHandler(totalAggregator.value(), rowKey, [null]),
|
||||||
style: colTotalColors(totalAggregator.value())
|
style: colTotalColors(totalAggregator.value())
|
||||||
},
|
},
|
||||||
|
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "v-react-pivottable",
|
"name": "v-react-pivottable",
|
||||||
"version": "0.11.57",
|
"version": "0.11.58",
|
||||||
"description": "A React-based pivot table",
|
"description": "A React-based pivot table",
|
||||||
"main": "PivotTableUI.js",
|
"main": "PivotTableUI.js",
|
||||||
"files": [
|
"files": [
|
||||||
|
Loading…
Reference in New Issue
Block a user