Browse Source

添加滚动表格

ananzhusen 1 năm trước cách đây
mục cha
commit
db5e47239b
1 tập tin đã thay đổi với 232 bổ sung1 xóa
  1. 232 1
      src/services/defaults.ts

+ 232 - 1
src/services/defaults.ts

@@ -1753,7 +1753,7 @@ export const formComponents = [
               },
               {
                 key: 'hasHeader',
-                label: '有无头',
+                label: '有无头',
                 type: 'bool',
               },
               {
@@ -1841,6 +1841,237 @@ export const formComponents = [
           ],
         },
       },
+      {
+        name: '滚动表格',
+        icon: 'l-biaoge',
+        data: {
+          name: 'table2',
+          width: 0,
+          height: 0,
+          disableAnchor: true,
+          colWidth: 90,
+          rowHeight: 32,
+          bordered: false,
+          vLine: false,
+          hLine: true,
+          // stripe: true,
+          swiper:true,
+          disableSize:true,
+          // stripeColor: '#407FFF1F', //'#15181c',
+          hasHeader:true,
+          textColor: '#FFFFFF',
+          maxNum:5,
+          data: [
+            [
+                "序号",
+                "时间",
+                "事件内容",
+                "处理状态"
+            ],
+            [
+                {
+                    "text": "1"
+                },
+                "2023-06-17 13:50",
+                "事件内容",
+                {
+                    "text": "处理中",
+                    "textColor": "#05CFF9FF"
+                }
+            ],
+            [
+                {
+                    "text": "2"
+                },
+                "2023-06-17 13:51",
+                "事件内容",
+                {
+                    "text": "已完成",
+                    "textColor": "#B3D1FFFF"
+                }
+            ],
+            [
+                {
+                    "text": "3"
+                },
+                "2023-06-17 13:52",
+                "事件内容",
+                {
+                    "text": "待处理",
+                    "textColor": "#E6A82EFF"
+                }
+            ],
+            [
+                {
+                    "text": "4"
+                },
+                "2023-06-17 13:53",
+                "事件内容",
+                {
+                    "text": "已完成",
+                    "textColor": "#B3D1FFFF"
+                }
+            ],
+            [
+                {
+                    "text": "5"
+                },
+                "2023-06-17 13:54",
+                "事件内容",
+                {
+                    "text": "处理中",
+                    "textColor": "#05CFF9FF"
+                }
+            ],
+            [
+                {
+                    "text": "6"
+                },
+                "2023-06-17 13:55",
+                "事件内容",
+                {
+                    "text": "处理中",
+                    "textColor": "#05CFF9FF"
+                }
+            ],
+            [
+                {
+                    "text": "7"
+                },
+                "2023-06-17 13:57",
+                "事件内容",
+                {
+                    "text": "处理中",
+                    "textColor": "#05CFF9FF"
+                }
+            ],
+            [
+                {
+                    "text": "8"
+                },
+                "2023-06-17 13:58",
+                "事件内容",
+                {
+                    "text": "处理中",
+                    "textColor": "#05CFF9FF"
+                }
+            ],
+            [
+                {
+                    "text": "9"
+                },
+                "2023-06-17 13:59",
+                "事件内容",
+                {
+                    "text": "处理中",
+                    "textColor": "#05CFF9FF"
+                }
+            ],
+            [
+                {
+                    "text": "10"
+                },
+                "2023-06-17 14:00",
+                "事件内容",
+                {
+                    "text": "处理中",
+                    "textColor": "#05CFF9FF"
+                }
+            ],
+            [
+                {
+                    "text": "11"
+                },
+                "2023-06-17 14:01",
+                "事件内容",
+                {
+                    "text": "处理中",
+                    "textColor": "#05CFF9FF"
+                }
+            ],
+            [
+                {
+                    "text": "12"
+                },
+                "2023-06-17 13:02",
+                "事件内容",
+                {
+                    "text": "处理中",
+                    "textColor": "#05CFF9FF"
+                }
+            ]
+        ],
+          styles: [
+            {
+                "col": 1,
+                "width": 112
+            },
+            {
+                "col": 2,
+                "width": 112
+            },
+            {
+                "col": 3,
+                "pens": [
+                    {
+                        "disableAnchor": true,
+                        "fontSize": 0.6,
+                        "height": 20,
+                        "lineWidth": 0,
+                        "name": "rectangle",
+                        "textColor": "#05CFF9FF",
+                        "width": 56
+                    }
+                ],
+                "width": 70
+            },
+            {
+                "col": 0,
+                "pens": [
+                    {
+                        "background": "#4583FF33",
+                        "disableAnchor": true,
+                        "height": 20,
+                        "isBottom": false,
+                        "lineWidth": 0,
+                        "name": "rectangle",
+                        "width": 20
+                    }
+                ],
+                "width": 40
+            }
+        ],
+          props: {
+            custom: [
+              {
+                key: 'hasHeader',
+                label: '有无表头',
+                type: 'bool',
+              },
+              {
+                key: 'swiper',
+                label: '是否轮播',
+                type: 'bool',
+              },
+              {
+                key: 'maxNum',
+                label: '最大展示数',
+                type: 'number',
+              },
+              {
+                key: 'data',
+                label: '数据',
+                type: 'code',
+              },
+              {
+                key: 'styles',
+                label: '样式',
+                type: 'code',
+              },
+            ],
+          },
+        },
+      },
       {
         name: '树',
         icon: 'l-shu', //l-shu