ananzhusen 1 год назад
Родитель
Сommit
7c8b5c8c47
1 измененных файлов с 117 добавлено и 3 удалено
  1. 117 3
      src/services/defaults.ts

+ 117 - 3
src/services/defaults.ts

@@ -3518,7 +3518,7 @@ context.meta2d.translate(
           background: '#4583FF33',
           color: '#4583FF',
           hiddenText: true,
-          onColor: '#58CC84',
+          // onColor: '#58CC84',
           animations:[
             {
                 name: "动画1",
@@ -3534,8 +3534,8 @@ context.meta2d.translate(
                       visible: true,
                     },
                     {
-                      background: '#4583FF33',
-                      color: '#4583FF',
+                      background: '#58CC8433',
+                      color: '#58CC84',
                       bkType: 0,
                       duration: 200,
                       strokeType: 0,
@@ -3602,6 +3602,30 @@ context.meta2d.translate(
           background: '#4583FF33',
           offShadowColor: '#FF5D3C',
           onShadowColor: '#58CC84',
+          props: {
+            custom: [
+              {
+                key: 'onColor',
+                label: '开时颜色',
+                type: 'color',
+              },
+              {
+                key: 'offColor',
+                label: '关时颜色',
+                type: 'color',
+              },
+              {
+                key: 'onShadowColor',
+                label: '开时阴影颜色',
+                type: 'color',
+              },
+              {
+                key: 'offShadowColor',
+                label: '关时阴影颜色',
+                type: 'color',
+              },
+            ]
+          }
         },
       },
       {
@@ -3618,6 +3642,30 @@ context.meta2d.translate(
           background: '#4583FF33',
           offShadowColor: '#FF5D3C',
           onShadowColor: '#58CC84',
+          props: {
+            custom: [
+              {
+                key: 'onColor',
+                label: '开时颜色',
+                type: 'color',
+              },
+              {
+                key: 'offColor',
+                label: '关时颜色',
+                type: 'color',
+              },
+              {
+                key: 'onShadowColor',
+                label: '开时阴影颜色',
+                type: 'color',
+              },
+              {
+                key: 'offShadowColor',
+                label: '关时阴影颜色',
+                type: 'color',
+              },
+            ]
+          }
         },
       },
       {
@@ -3635,6 +3683,30 @@ context.meta2d.translate(
           background: '#4583FF33',
           offShadowColor: '#FF5D3C',
           onShadowColor: '#58CC84',
+          props: {
+            custom: [
+              {
+                key: 'onColor',
+                label: '开时颜色',
+                type: 'color',
+              },
+              {
+                key: 'offColor',
+                label: '关时颜色',
+                type: 'color',
+              },
+              {
+                key: 'onShadowColor',
+                label: '开时阴影颜色',
+                type: 'color',
+              },
+              {
+                key: 'offShadowColor',
+                label: '关时阴影颜色',
+                type: 'color',
+              },
+            ]
+          }
         },
       },
       {
@@ -3649,6 +3721,20 @@ context.meta2d.translate(
           background: '#4583FF33',
           offColor: '#FF5D3C',
           onColor: '#58CC84',
+          props: {
+            custom: [
+              {
+                key: 'onColor',
+                label: '开时颜色',
+                type: 'color',
+              },
+              {
+                key: 'offColor',
+                label: '关时颜色',
+                type: 'color',
+              },
+            ]
+          }
           // events: [
           //   {
           //     action: 5,
@@ -3671,6 +3757,20 @@ context.meta2d.translate(
           background: '#4583FF33',
           offColor: '#FF5D3C',
           onColor: '#58CC84',
+          props: {
+            custom: [
+              {
+                key: 'onColor',
+                label: '开时颜色',
+                type: 'color',
+              },
+              {
+                key: 'offColor',
+                label: '关时颜色',
+                type: 'color',
+              },
+            ]
+          }
           // events: [
           //   {
           //     action: 5,
@@ -3694,6 +3794,20 @@ context.meta2d.translate(
           offColor: '#FF5D3C',
           onColor: '#58CC84',
           disableInput: true,
+          props: {
+            custom: [
+              {
+                key: 'onColor',
+                label: '开时颜色',
+                type: 'color',
+              },
+              {
+                key: 'offColor',
+                label: '关时颜色',
+                type: 'color',
+              },
+            ]
+          }
         },
       },
       {