Browse Source

feat:添加注释

liu.shiyi 1 year ago
parent
commit
7b6001395c
1 changed files with 3 additions and 0 deletions
  1. 3 0
      data-room-ui/packages/BasicComponents/Tables/index.vue

+ 3 - 0
data-room-ui/packages/BasicComponents/Tables/index.vue

@@ -94,6 +94,7 @@ export default {
     this.chartInit()
   },
   methods: {
+    // 设置表格背景颜色
     cellStyle ({ row, column, rowIndex, columnIndex }) {
       const bodyBackgroundColor = {
         dark: '#141414',
@@ -106,6 +107,7 @@ export default {
         color: this.config.customize.bodyFontColor || initColor,
         fontSize: this.config.customize.bodyFontSize + 'px' || '14px'
       }
+      // 如果设置了奇偶行的背景颜色,则以奇偶行的背景颜色为主
       if (rowIndex % 2 && this.config.customize.evenRowBackgroundColor) {
         style.backgroundColor = this.config.customize.evenRowBackgroundColor
       } else if (!(rowIndex % 2) && this.config.customize.oddRowBackgroundColor) {
@@ -115,6 +117,7 @@ export default {
       }
       return style
     },
+    // 设置表格行颜色
     rowStyle ({ row, rowIndex }) {
       if (rowIndex % 2) {
         return {