Explorar o código

feat:data-预制style

ananzhusen hai 11 meses
pai
achega
396fc0b482
Modificáronse 3 ficheiros con 73 adicións e 1 borrados
  1. BIN=BIN
      public/down.cur
  2. BIN=BIN
      public/right.cur
  3. 73 1
      src/views/components/Data.vue

BIN=BIN
public/down.cur


BIN=BIN
public/right.cur


+ 73 - 1
src/views/components/Data.vue

@@ -1318,12 +1318,48 @@ const onAddShape = (e, _data) => {
     }
     data = [];
     checked.forEach((item) => {
+      if(globalThis.style1){
+        data.push(
+        ...[
+          {
+            text: item.label,
+            width: 150,
+            height: 20,
+            name: 'text',
+            dataset: true,
+            textAlign: 'right',
+          },
+          {
+            text: item.mock||0,
+            width: 58,
+            height: 28,
+            name: 'rectangle',
+            dataset: true,
+            // textAlign: 'left',
+            color:"#478BFFFF",
+            textColor: "#A9C9FFFF",
+            background: "#478BFF1F",
+            fontWeight: "bold",
+            borderRadius:0.1,
+            lineWidth:1,
+            realTimes: [
+              {
+                label: '文字',
+                key: 'text',
+                type: 'string',
+                bind: deepClone(item),
+              },
+            ],
+          },
+        ]
+      );
+      }else{
       data.push(
         ...[
           {
             text: item.label + ':',
             width: 150,
-            height: 20,
+            height: 28,
             name: 'text',
             dataset: true,
             textAlign: 'right',
@@ -1346,8 +1382,43 @@ const onAddShape = (e, _data) => {
           },
         ]
       );
+        }
     });
   } else {
+    if(globalThis.style1){
+      data = [
+      {
+        text: _data.label,
+        width: 150,
+        height: 28,
+        name: 'text',
+        dataset: true,
+        textAlign: 'right',
+      },
+      {
+        text: _data.mock||0,
+        width: 58,
+        height: 28,
+        name: 'rectangle',
+        dataset: true,
+        // textAlign: 'left',
+        color:"#478BFFFF",
+        textColor: "#A9C9FFFF",
+        background: "#478BFF1F",
+        fontWeight: "bold",
+        borderRadius:0.1,
+        lineWidth:1,
+        realTimes: [
+          {
+            label: '文字',
+            key: 'text',
+            type: 'string',
+            bind: deepClone(_data),
+          },
+        ],
+      },
+    ];
+    }else{
     data = [
       {
         text: _data.label + ':',
@@ -1374,6 +1445,7 @@ const onAddShape = (e, _data) => {
         ],
       },
     ];
+    }
   }
   meta2d.canvas.addCaches = deepClone(data);
 };