Oinone
Product
Oinone
Oinone Framework
100% Metadata-Driven Enterprise Low-Code Framework
Aino
Aino
AI Innovation, Now I Know — Enterprise AI Agent Platform
Use CasesPricingCommunity
Resources
📖
Documentation
Developer docs & API reference
💬
Support
Technical support
📄
Changelog
Product release notes
🏡
About
About Us
0571-88757863

Views:Table Column Footer Statistics


I. Overview

This feature can be implemented by extending TableWidget.ts.

II. Example Code

import {
  BaseElementWidget,
  DslDefinitionType,
  SPI,
  TableWidget,
  ViewType,
  Widget
} from '@oinone/kunlun-dependencies';

@SPI.ClassFactory(
  BaseElementWidget.Token({
    type: ViewType.Table,
    widget: 'table',
    model: 'resource.k2.Model0000000109',
    viewName: '移动端品牌_TABLE_0000000000021513'
  })
)
  export class FooterStatisticsTable extends TableWidget {
    public initialize(props) {
      if (props.template) {
        props.template?.widgets?.forEach((a) => {
          if (a.dslNodeType === DslDefinitionType.FIELD && this.statisticsFieldList.includes(a.name)) {
            a.statistics = true;
          }
        });
      }
      super.initialize(props);
      return this;
    }

    // Fields requiring footer statistics
    public statisticsFieldList = ['fansNum'];

    @Widget.Reactive()
    protected get showFooter(): boolean | undefined {
      return true;
    }
  }

III. Effect Preview

Edit this page
Last Updated:1/15/26, 4:02 AM
Prev
Views:Table Column Merging
Next
Views:Table Row Copy Functionality
默认页脚
Copyright © 2026 Mr.Hope