Procházet zdrojové kódy

feat:添加电池&修改摄像头

ananzhusen před 1 rokem
rodič
revize
a722cc5742
1 změnil soubory, kde provedl 57 přidání a 3 odebrání
  1. 57 3
      src/services/defaults.ts

+ 57 - 3
src/services/defaults.ts

@@ -1265,12 +1265,22 @@ export const formComponents = [
           height: 250,
           name: 'rtspPlayerDom',
           externElement: true,
-          webrtcUrl: '',
+          mse: true,
+          url: '',
           rtspUrl: '',
           props: {
             custom: [
               {
-                key: 'webrtcUrl',
+                key: 'mse',
+                label: '类型',
+                type: 'select',
+                options: [
+                  { label: 'Webrtc(低延迟,仅支持H264格式)', value: false },
+                  { label: 'MSE(支持H265格式,需最新chrome)', value: true },
+                ],
+              },
+              {
+                key: 'url',
                 label: '流服务',
                 type: 'string',
               },
@@ -1282,7 +1292,7 @@ export const formComponents = [
             ],
           },
         },
-      },
+      }
     ],
   },
   {
@@ -3550,6 +3560,50 @@ context.meta2d.translate(
           },
         },
       },
+      {
+        name: '电池',
+        icon: 'l-06',
+        data: {
+          name: 'battery',
+          disableAnchor: true,
+          width: 40,
+          height: 80,
+          rotate: 90,
+          progress:0.6,
+          color:'#4583FF',
+          background:'#4583FF33',
+          progressColor:'#58CC84',
+          props: {
+            custom: [
+              {
+                key: 'min',
+                label: '最小值',
+                type: 'number',
+                placeholder:'默认0'
+              },
+              {
+                key: 'max',
+                label: '最大值',
+                type: 'number',
+                placeholder:'默认1'
+              },
+              {
+                key: 'splitNumber',
+                label: '分段数',
+                type: 'number',
+              },
+              {
+                key: 'gap',
+                label: '间隔占比',
+                type: 'number',
+                min:0,
+                max:1,
+              },
+            ],
+            
+          },
+        },
+      },
     ],
   },
 ];