Bladeren bron

add_indicator

ananzhusen 1 jaar geleden
bovenliggende
commit
4a5ccc10c9
1 gewijzigde bestanden met toevoegingen van 44 en 20 verwijderingen
  1. 44 20
      src/services/defaults.ts

+ 44 - 20
src/services/defaults.ts

@@ -1321,8 +1321,32 @@ export const formComponents = [
         name: '业务指标',
         icon: 'l-pc',
         data: {
-          width: 200,
-          height: 200,
+          width: 115,
+          height: 25,
+          name: 'indicator',
+          data: [
+            {
+              type: 'text',
+              color: '',
+              x: 0,
+              text: '业务指标',
+            },
+            {
+              type: 'icon',
+              x: 0.5,
+              size: 0.5, //高度的倍数
+              color: '#ff0000',
+              background: '#f00',
+              path: 'M116.77950993 500.07050546c15.9195644 15.9195644 41.65144342 15.9195644 57.57100785 0L471.28500154 203.13602167 471.28500154 919.14998461c0 22.47467916 18.24031931 40.71499846 40.71499846 40.71499845s40.71499846-18.24031931 40.71499846-40.71499845l0-716.01396294 296.93448376 296.93448379c15.9195644 15.9195644 41.65144342 15.9195644 57.57100785 0s15.9195644-41.65144342 1e-8-57.57100783l-366.43498616-366.39427116c-3.74577985-3.78649485-8.26514469-6.75868973-13.27308951-8.83515464C522.5858996 65.19360688 517.29294978 64.13501693 512 64.13501694s-10.5858996 1.05858996-15.55312942 3.13505489c-5.00794479 2.07646491-9.48659464 5.0486598-13.27308948 8.83515464l-366.43498616 366.39427115C100.85994556 458.41906201 100.85994555 484.15094105 116.77950993 500.07050546z',
+            },
+            {
+              textColor: '#f00',
+              type: 'text',
+              color: '',
+              x: 0.6,
+              text: '20%',
+            },
+          ],
         },
       },
       {
@@ -1592,34 +1616,34 @@ export const formComponents = [
         name: '选项卡',
         icon: 'l-pc',
         data: {
-          name:'leTab',
+          name: 'leTab',
           width: 500,
           height: 50,
-          direction:'horizontal',
-          selectKey:'0',
-          data:[
-            {text:'场景一',key:'0',isForbidden:true},
-            {text:'场景二',key:'1'},
-            {text:'场景三',key:'2'},
-            {text:'场景四',key:'3'}
-          ]
+          direction: 'horizontal',
+          selectKey: '0',
+          data: [
+            { text: '场景一', key: '0', isForbidden: true },
+            { text: '场景二', key: '1' },
+            { text: '场景三', key: '2' },
+            { text: '场景四', key: '3' },
+          ],
         },
       },
       {
         name: '多选选项卡',
         icon: 'l-pc',
         data: {
-          name:'leTabs',
+          name: 'leTabs',
           width: 500,
           height: 50,
-          direction:'horizontal',
-          selectedKeys:['0'],
-          data:[
-            {text:'场景一',key:'0'},
-            {text:'场景二',key:'1',isForbidden:true},
-            {text:'场景三',key:'2'},
-            {text:'场景四',key:'3'}
-          ]
+          direction: 'horizontal',
+          selectedKeys: ['0'],
+          data: [
+            { text: '场景一', key: '0' },
+            { text: '场景二', key: '1', isForbidden: true },
+            { text: '场景三', key: '2' },
+            { text: '场景四', key: '3' },
+          ],
         },
       },
     ],