Debian is linux adjustment after adjustment to the startup slowdown

2023-01-02   ES  


<vxe-toolbar>
          <template #buttons>
            <vxe-button @click="printEvent1">printing</vxe-button>
            <vxe-button @click="printSelectEvent">Print selection</vxe-button>
            <vxe-button @click="printEvent2">Advanced printing</vxe-button>
          </template>
        </vxe-toolbar>

        <vxe-table
          border
          show-footer
          ref="xTable"
          height="500"
          :print-config="tablePrint"
          :footer-method="footerMethod"
          :data="tableData">
          <vxe-table-column type="checkbox" width="60"></vxe-table-column>
          <vxe-table-column type="seq" width="60"></vxe-table-column>
          <vxe-table-colgroup title="Group1">
            <vxe-table-column field="name" title="Name"></vxe-table-column>
            <vxe-table-colgroup title="Group2">
              <vxe-table-column field="role" title="Role"></vxe-table-column>
              <vxe-table-column field="age" title="Age"></vxe-table-column>
            </vxe-table-colgroup>
            <vxe-table-column field="address" title="Address"></vxe-table-column>
          </vxe-table-colgroup>
        </vxe-table>
export default {
    
          data () {
    
            return {
    
              tableData: [
                {
     id: 10001, name: 'Test1', nickname: 'T1', role: 'Develop', sex: 'Man', age: 28, address: 'vxe-table from entry to giving up' },
                {
     id: 10002, name: 'Test2', nickname: 'T2', role: 'Test', sex: 'Women', age: 22, address: 'Guangzhou' },
                {
     id: 10003, name: 'Test3', nickname: 'T3', role: 'PM', sex: 'Man', age: 32, address: 'Shanghai' },
                {
     id: 10004, name: 'Test4', nickname: 'T4', role: 'Designer', sex: 'Women', age: 23, address: 'vxe-table from entry to giving up' },
                {
     id: 10005, name: 'Test5', nickname: 'T5', role: 'Develop', sex: 'Women', age: 30, address: 'Shanghai' },
                {
     id: 10006, name: 'Test6', nickname: 'T6', role: 'Designer', sex: 'Women', age: 21, address: 'vxe-table from entry to giving up' },
                {
     id: 10007, name: 'Test7', nickname: 'T7', role: 'Test', sex: 'Man', age: 29, address: 'vxe-table from entry to giving up' },
                {
     id: 10008, name: 'Test8', nickname: 'T8', role: 'Develop', sex: 'Man', age: 35, address: 'vxe-table from entry to giving up' }
              ],
              tablePrint: {
    
                // Custom print style example
                style: `.vxe-Table { 
                   color: #000000; // Modify the default color of the form 
                   font-size: 12px; // Modify the default font size of the form 
                   FONT-FAMILY: "Microsoft Yahei", Microsoft Yahei, "Microsoftjhenghei", Chinese fine black, stheiti, mingliu; // Modify the default font of the form 
                 } 
                 .vxe-table, 
                 .vxe-table thead th,, 
                 .vxe-table tbody td, 
                 .vxe-Table TFOOT TD { 
                   border-color: #000000; // Modify the frame color of the table border 
                 } 
                 .vxe-table thead th { 
                   color: Green; // Modify the color of the head font 
                   font-size: 14px; // Modify the default font size of the header 
                 } 
                 .vxe-Table TFOOT TD { 
                   Color: Red; // Modify the color of the font of the table 
                 }`
              }
            }
          },
          methods: {
    
            printEvent () {
    
              this.$refs.xTable.print()
            },
            printSelectEvent () {
    
              this.$refs.xTable.print({
    
                data: this.$refs.xTable.getCheckboxRecords()
              })
            },
            exportDataEvent () {
    
              this.$refs.xTable.openExport()
            },
            meanNum (list, field) {
    
              let count = 0
              list.forEach(item => {
    
                count += Number(item[field])
              })
              return count / list.length
            },
            sumNum (list, field) {
    
              let count = 0
              list.forEach(item => {
    
                count += Number(item[field])
              })
              return count
            },
            footerMethod ({
      columns, data }) {
    
              const footerData = [
                columns.map((column, columnIndex) => {
    
                  if (columnIndex === 0) {
    
                    return 'Average'
                  }
                  if (['age', 'rate'].includes(column.property)) {
    
                    return this.meanNum(data, column.property)
                  }
                  return null
                }),
                columns.map((column, columnIndex) => {
    
                  if (columnIndex === 0) {
    
                    return 'harmony'
                  }
                  if (['age', 'rate'].includes(column.property)) {
    
                    return this.sumNum(data, column.property)
                  }
                  return null
                })
              ]
              return footerData
            }
          }
        }

source

Related Posts

Windows64 -bit system enters the debug mode

TensorFlow Road to Learning-First Choice

Software construct LAB5 error use guide ()

[WPF] When the new window in Winfom is a new window, the controls such as Textbox cannot enter the problem solving method.

Debian is linux adjustment after adjustment to the startup slowdown

Random Posts

Record once Elastic-JOB Faber Query and Basic Concept understanding

Canvas Meteor Moon Star Galaxy

Bugku CTF Web (Question 10-15)

pyenv to build a multiple version of Python’s coexistence

Today I wrote a very mentally retarded bug!