Sfoglia il codice sorgente

完善步骤条、下拉菜单、面包屑的配置

Wind-Breaker1 1 anno fa
parent
commit
bc7d29d2b6
1 ha cambiato i file con 130 aggiunte e 18 eliminazioni
  1. 130 18
      src/services/defaults.ts

+ 130 - 18
src/services/defaults.ts

@@ -2634,14 +2634,20 @@ context.meta2d.translate(
             {
               key: '1',
               title: '页面1',
+              to: `https://doc${rootDomain}/document/135787991`,
+              target: '_blank',
             },
             {
               key: '2',
               title: '页面2',
+              to: `https://2d${rootDomain}/?id=641d524a8df2c654ea652d7e`,
+              target: '_blank',
             },
             {
               key: '3',
               title: '页面3',
+              to: `https://2d${rootDomain}/?id=6357a9e2d44b9402de84d2e8`,
+              target: '_self',
             },
           ],
           props: {
@@ -2714,6 +2720,100 @@ context.meta2d.translate(
                 label: '数据',
                 type: 'code',
               },
+              {
+                key: "background",
+                label: "背景颜色",
+                type: "color"
+              },
+              {
+                key: "textColor",
+                label: "字体颜色",
+                type: "color"
+              },
+              {
+                key: "fontSize",
+                label: "字体大小",
+                type: "number"
+              },
+              {
+                key: "iconSize",
+                min: 12,
+                label: "图标大小",
+                type: "number"
+              },
+              {
+                key: "iconPosition",
+                label: "图标位置",
+                type: 'select',
+                options: [
+                  { label: '靠左', value: 'left' },
+                  { label: '靠下', value: 'bottom' },
+                ],
+              },
+              {
+                isNotString: true,
+                key: "marginRight",
+                label: "图标右间距",
+                type: "number"
+              },
+              {
+                isNotString: true,
+                key: "menuItemWidth",
+                min: 100,
+                label: "选项宽度",
+                type: "number"
+              },
+              {
+                isNotString: true,
+                key: "menuItemBgImg",
+                label: "选项背景图",
+                type: "text"
+              },
+              {
+                isNotString: true,
+                key: "menuItemHeight",
+                min: 0,
+                label: "选项高度",
+                type: "number"
+              },
+              {
+                key: "hoverBackground",
+                label: "hover背景色",
+                type: "color"
+              },
+              {
+                isNotString: true,
+                key: "hoverColor",
+                label: "hover字体颜色",
+                type: "color"
+              },
+              {
+                isNotString: true,
+                key: "activeBackground",
+                label: "选中背景色",
+                type: "color"
+              },
+              {
+                key: "activeColor",
+                label: "选中字体颜色",
+                type: "color"
+              },
+              {
+                key: "dropContentBgColor",
+                label: "下拉内容背景色",
+                type: "color"
+              },
+              {
+                isNotString: true,
+                key: "renderSubMenu",
+                label: "是否渲染二级菜单",
+                type: "switch"
+              },
+              {
+                key: 'iframe',
+                label: '关联Iframe',
+                type: 'text',
+              },
             ],
           },
         },
@@ -2827,19 +2927,15 @@ context.meta2d.translate(
         icon: 'l-buzhoutiao',
         data: {
           name: 'steps',
-          width: 500,
-          height: 40,
-          hiddenText: true,
+          width: 600,
+          height: 60,
           direction: 'horizontal', //horizontal/vertical
-          labelAlign: '', //left/right/alternate/top/bottom
-          // theme: 'dot', //dot
-          current: 2,
+          theme: 'default', //dot
           data: [
             {
               title: '已完成的步骤',
               content: '这里是提示文字',
               status: 'finish', //default/process/finish/error
-              // 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',
             },
             {
               title: '出错的步骤',
@@ -2857,6 +2953,28 @@ context.meta2d.translate(
               status: 'default', //default/process/finish/error
             },
           ],
+          statusColor:{
+            default: {
+              titleColor: '#FFFFFF66',
+              contentColor: '#FFFFFF66',
+              iconColor: '#FFFFFF66',
+            },
+            finish: {
+              titleColor: '#FFFFFFE6',
+              contentColor: '#FFFFFF99',
+              iconColor: '#4583FF',
+            },
+            process: {
+              titleColor: '#4583FF',
+              contentColor: '#FFFFFF99',
+              iconColor: '#4583FF ',
+            },
+            error: {
+              titleColor: '#FF5D3C',
+              contentColor: '#FFFFFF99',
+              iconColor: '#FF5D3C',
+            },
+          },
           props: {
             custom: [
               {
@@ -2864,6 +2982,11 @@ context.meta2d.translate(
                 label: '数据',
                 type: 'code',
               },
+              {
+                key: 'statusColor',
+                label: '各个状态颜色',
+                type: 'code',
+              },
               {
                 key: 'direction',
                 label: '方向',
@@ -2873,17 +2996,6 @@ context.meta2d.translate(
                   { label: '垂直', value: 'vertical' },
                 ],
               },
-              // {
-              //   key: 'labelAlign',
-              //   label: '对齐',
-              //   type: 'select',
-              //   options: [
-              //     { label: '上', value: 'top' },
-              //     { label: '下', value: 'bottom' },
-              //     { label: '左', value: 'left' },
-              //     { label: '右', value: 'right' },
-              //   ],
-              // },
             ],
           },
         },