Kaynağa Gözat

feat:新增水箱

ananzhusen 9 ay önce
ebeveyn
işleme
4780621db6
2 değiştirilmiş dosya ile 58 ekleme ve 2 silme
  1. 56 1
      src/services/defaults.ts
  2. 2 1
      src/services/download.ts

+ 56 - 1
src/services/defaults.ts

@@ -4187,6 +4187,7 @@ context.meta2d.translate(
           // maxText: 'max',
           // minText: 'min',
           scaleShow: false,
+          distance:10, 
           props: {
             look:true,
             custom: [
@@ -4219,11 +4220,65 @@ context.meta2d.translate(
                 key: 'scaleShow',
                 label: '刻度显示',
                 type: 'bool',
-              }
+              },
+              {
+                key: 'wAmplitude',
+                label: '宽幅,推荐值0-10',
+                type: 'number',
+                placeholder:'默认2'
+              },
+              {
+                key: 'hAmplitude',
+                label: '高幅,推荐值1-10',
+                type: 'number',
+                placeholder:'默认5'
+              },
+              {
+                key: 'distance',
+                label: '液边距',
+                type: 'number',
+              },
             ]
           }
         },
       },
+      {
+        name: '水箱',
+        icon: 'l-pool',
+        data: {
+          name: 'tank',
+          width: 350,
+          height: 120,
+          disableAnchor: true,
+          background: '#4583FF',
+          borderRadius: 0.1,
+          progress:0.5,
+          maxBackground: '#f5222d',
+          minBackground: '#52c41a',
+          props: {
+            look:true,
+            custom: [
+              {
+                key: 'wAmplitude',
+                label: '宽幅,推荐值0-10',
+                type: 'number',
+                placeholder:'默认2'
+              },
+              {
+                key: 'hAmplitude',
+                label: '高幅,推荐值1-10',
+                type: 'number',
+                placeholder:'默认5'
+              },
+              {
+                key: 'distance',
+                label: '液边距',
+                type: 'number',
+              },
+            ]
+          }
+        }
+      },
       {
         name: '指示灯',
         icon: 'l-zhishideng',

+ 2 - 1
src/services/download.ts

@@ -50,7 +50,8 @@ const components = [
   'thermometer1',
   'airSwitch',
   'waterTank',
-  'tablePlus'
+  'tablePlus',
+  'tank'
 ];
 
 export const getDownloadList = (meta2dData: any, path: string = 'v') => {