Переглянути джерело

Merge branch 'main' of github.com:le5le-com/visualization-design

Alsmile 1 рік тому
батько
коміт
0e1473884c
1 змінених файлів з 92 додано та 19 видалено
  1. 92 19
      src/services/defaults.ts

+ 92 - 19
src/services/defaults.ts

@@ -1505,6 +1505,7 @@ export const formComponents = [
           textLeft: 30,
           shadow: false,
           textColor: 'rgba(0, 0, 0, 1)',
+          hoverTextColor: 'rgba(0, 0, 0, 1)',
           shadowColor: 'rgba(250, 247, 247, 0.5)',
           shadowOffsetX: 6,
           shadowOffsetY: 6,
@@ -1515,8 +1516,35 @@ export const formComponents = [
         name: '通知',
         icon: 'l-tongzhi',
         data: {
-          width: 200,
-          height: 200,
+          width: 360,
+          height: 178,
+          text: '通知具体内容;通知具体内容;通知具体内容;通知具体内容;通知具体内容;通知具体内容;通知具体内容;通知具体内容;通知具体内容;',
+          borderRadius: 6,
+          name: 'notification',
+          icon: '\ue6e4',
+          iconFamily: 'l-icon',
+          iconColor: '#4583ff',
+          iconSize: 17.5,
+          iconAlign: 'left-top',
+          iconLeft: 8,
+          iconTop: 8,
+          textAlign: 'left',
+          textBaseline: 'top',
+          textLeft: 30,
+          textTop: 30,
+          color: 'rgba(235, 235, 235, 1)',
+          background: 'rgba(255, 255, 255, 1)',
+          shadow: false,
+          textColor: '#666666',
+          hoverTextColor: '#666666',
+          shadowColor: 'rgba(250, 247, 247, 0.5)',
+          shadowOffsetX: 6,
+          shadowOffsetY: 6,
+          shadowBlur: 20,
+          heading: '标题名称',
+          headingColor: '#000',
+          headingSize: 16,
+          // headingWeight: 'bold',
         },
       },
       // {
@@ -1662,18 +1690,63 @@ export const formComponents = [
       },
       {
         name: '锚点',
-        icon: 'l-pc', //l-anchor
+        icon: 'l-anchor',
         data: {
-          width: 200,
-          height: 200,
+          width: 40,
+          height: 40,
+          name: 'image',
+          icon: '\uea7b',
+          iconFamily: 'l-icon',
+          events: [
+            {
+              action: 5,
+              name: 'click',
+              params: 'pen.id/tag',
+              value:
+                'let pens = context.meta2d.find(params);\r\nif (!pens.length) {\r\n    pens = [pen]\r\n}\r\ncontext.meta2d.active(pens, true);\r\ncontext.meta2d.gotoView(pens[0]);\r\ncontext.meta2d.resize();\r\ncontext.meta2d.render();',
+              where: { type: null },
+            },
+          ],
         },
       },
       {
         name: '回到顶部',
-        icon: 'l-pc', //l-huidaodingbu
+        icon: 'l-huidaodingbu',
         data: {
-          width: 200,
-          height: 200,
+          width: 64,
+          height: 64,
+          name: 'rectangle',
+          activeBackground: '#eee',
+          background: 'rgba(255, 255, 255, 1)',
+          borderRadius: 0.1,
+          color: '#eee',
+          hoverBackground: '#eee',
+          hoverColor: '#eee',
+          hoverTextColor: '#c5c5c5',
+          iconAlign: 'top',
+          iconColor: 'rgba(0, 0, 0, 1)',
+          iconSize: 20,
+          iconTop: 10,
+          text: 'TOP',
+          textBaseline: 'bottom',
+          textColor: '#c5c5c5',
+          textTop: -2,
+          icon: '\ue6a6',
+          iconFamily: 'l-icon',
+          events: [
+            {
+              action: 5,
+              name: 'click',
+              // params: 'pen.id/tag',
+              value: `
+              const { scale, origin, y: dataY } = context.meta2d.store.data;
+              context.meta2d.translate(
+                0,
+                ((parseInt(params)||32) * context.meta2d.store.data.scale - origin.y) / scale - dataY / scale
+              );`,
+              where: { type: null },
+            },
+          ],
         },
       },
       {
@@ -1817,30 +1890,30 @@ export const formComponents = [
           direction: 'horizontal',
           labelAlign: '', //left/right/alternate/top/bottom
           mode: 'alternate', //alternate
+          current: 2,
           data: [
             {
-              label: '2022-01-01',
-              content: '事件一',
+              label: '已完成的步骤',
+              content: '内容',
               // path: 'M71.3,61.9v2.21L56.66,66V63.82l3.27-.43.25-1-2.39.31V60.84l2.84-.37.21-.87-3.4.44V57.85l13.08-1.73v2.2l-6.85.9-.21.88,6-.79-.15,2.85ZM58.11,66.56,69.86,65v5.63L58.11,72.19Zm2.59,3.09,6.44-.84V67.52l-6.44.85ZM62.78,63l3.87-.51.07-.95L63,62.05Z',
             },
             {
-              label: '2022-01-01',
-              content: '事件一',
+              label: '已完成的步骤',
+              content: '内容',
             },
             {
-              label: '2022-02-01',
-              content: '事件二',
+              label: '进行中的步骤',
+              content: '内容',
             },
             {
-              label: '2022-03-01',
-              content: '事件三',
+              label: '未进行中的步骤',
+              content: '内容',
             },
             {
-              label: '2022-04-01',
-              content: '事件四',
+              label: '未进行中的步骤',
+              content: '内容',
             },
           ],
-          text: '时间轴',
         },
       },
       {