【sgTopo】强哥古法炮制、纯手工打造简单拓扑图、流程图、思维导图组件(完善中ing)(二)

简介: 【sgTopo】强哥古法炮制、纯手工打造简单拓扑图、流程图、思维导图组件(完善中ing)

【sgTopo】强哥古法炮制、纯手工打造简单拓扑图、流程图、思维导图组件(完善中ing)(一)https://developer.aliyun.com/article/1476836


引用组件示例demo

<template>
  <div class="sg-body">
    <div style="padding: 30px; display: flex">
      <sg-topo :data="data1" style="margin-right: 25px" />
      <sg-topo :data="data2" style="margin-right: 25px" />
      <sg-topo :data="data3" style="margin-right: 25px" />
      <sg-topo :data="data4" style="margin-right: 25px" />
      <sg-topo :data="data5" style="margin-right: 25px" />
      <sg-topo :data="data6" style="margin-right: 25px" />
    </div>
  </div>
</template>
 
<script>
import sgTopo from "../components/sgTopo";
export default {
  components: {
    sgTopo,
  },
  data() {
    return {
      // 数据使用
      data1: {
        body: {
          arrowRight: true,
          title: {
            active: true, //交互开启
            text: "一级内容",
            style: {
              width: "150px",
              background: "#002766",
            },
          },
          style: {
            width: "300px",
          },
          data: [
            {
              type: 1,
              title: {
                active: true, //交互开启
                text: "二级内容",
              },
            },
            {
              type: 1,
              title: {
                text: "二级内容",
              },
            },
            {
              type: 1,
              title: {
                text: "二级内容",
              },
            },
            {
              type: 1,
              title: {
                text: "二级内容",
              },
              children: [
                {
                  title: {
                    text: "三级标题",
                  },
                  data: [
                    {
                      title: {
                        active: true, //交互开启
                        text: "三级内容",
                      },
                    },
                    {
                      title: {
                        text: "三级内容",
                      },
                    },
                    {
                      title: {
                        text: "三级内容",
                      },
                    },
                    {
                      title: {
                        text: "三级内容",
                      },
                    },
                  ],
                },
                {
                  title: {
                    text: "三级标题",
                  },
                  data: [
                    {
                      title: {
                        text: "三级内容",
                      },
                    },
                    {
                      title: {
                        text: "三级内容",
                      },
                    },
                    {
                      title: {
                        text: "三级内容",
                      },
                    },
                    {
                      title: {
                        text: "三级内容",
                      },
                    },
                  ],
                },
              ],
            },
          ],
        },
      },
 
      data2: {
        body: {
          arrowRight: true,
          title: {
            text: "一级内容",
            style: {
              width: "150px",
              background: "#002766",
            },
          },
          style: {
            width: "230px",
          },
          data: [
            {
              type: 1,
              title: {
                active: true, //交互开启
                text: "二级内容",
              },
            },
            {
              type: 1,
              title: {
                active: true, //交互开启
                text: "二级内容",
                style: {
                  background: "#0050B3",
                },
              },
            },
            {
              type: 1,
              title: {
                text: "二级内容",
              },
            },
            {
              type: 1,
              title: {
                text: "二级内容",
                style: {
                  background: "#0050B3",
                },
              },
            },
            {
              type: 1,
              title: {
                text: "二级内容",
              },
            },
 
            {
              type: 1,
              title: {
                text: "二级内容",
              },
            },
          ],
        },
      },
 
      data3: {
        body: {
          arrowRight: true,
          title: {
            text: "一级内容",
            style: {
              width: "150px",
              background: "#002766",
            },
          },
          style: {
            width: "230px",
          },
          data: [
            {
              type: 2,
              title: {
                text: "二级内容",
              },
              children: [
                {
                  title: {
                    text: "三级内容",
                  },
                  /*   children: [
                    {
                      title: {
                        text: "三级内容",
                      },
                    },
                    {
                      title: {
                        text: "三级内容",
                      },
                    },
                    {
                      title: {
                        text: "三级内容",
                      },
                    },
                  ], */
                },
                {
                  title: {
                    text: "三级内容",
                  },
                  data: [
                    {
                      title: {
                        text: "三级内容",
                      },
                    },
                    {
                      title: {
                        text: "三级内容",
                      },
                    },
                    {
                      title: {
                        text: "三级内容",
                      },
                    },
                  ],
                },
                {
                  title: {
                    text: "三级内容",
                  },
                },
              ],
            },
            {
              type: 2,
              title: {
                text: "二级内容",
              },
              children: [
                {
                  title: {
                    text: "三级内容",
                  },
                  /*   children: [
                    {
                      title: {
                        text: "三级内容",
                      },
                    },
                    {
                      title: {
                        text: "三级内容",
                      },
                    },
                    {
                      title: {
                        text: "三级内容",
                      },
                    },
                  ], */
                },
                {
                  title: {
                    text: "三级内容",
                  },
                  data: [
                    {
                      title: {
                        text: "三级内容",
                      },
                    },
                    {
                      title: {
                        text: "三级内容",
                      },
                    },
                    {
                      title: {
                        text: "三级内容",
                      },
                    },
                  ],
                },
                {
                  title: {
                    text: "三级内容",
                  },
                },
              ],
            },
          ],
        },
      },
 
      data4: {
        body: {
          arrowRight: true,
          title: {
            text: "一级内容",
            style: {
              width: "150px",
              background: "#002766",
            },
          },
          style: {
            width: "280px",
          },
          container: {
            style: {
              display: "flex",
              "flex-wrap": "wrap",
              "justify-content": "space-between",
            },
          },
          data: [
            {
              type: 2,
              title: {
                text: "二级内容",
              },
              children: [
                {
                  title: {
                    text: "三级内容",
                  },
                  children: [
                    {
                      title: {
                        text: "三级内容",
                      },
                    },
                    {
                      title: {
                        text: "三级内容",
                      },
                    },
                    {
                      title: {
                        text: "三级内容",
                      },
                    },
                  ],
                },
                {
                  title: {
                    text: "三级内容",
                  },
                  data: [
                    {
                      title: {
                        text: "三级内容",
                      },
                    },
                    {
                      title: {
                        text: "三级内容",
                      },
                    },
                    {
                      title: {
                        text: "三级内容",
                      },
                    },
                  ],
                },
                {
                  title: {
                    text: "三级内容",
                  },
                },
              ],
            },
            {
              type: 2,
              title: {
                text: "二级内容",
              },
              children: [
                {
                  title: {
                    text: "三级内容",
                  },
                  /*   children: [
                    {
                      title: {
                        text: "三级内容",
                      },
                    },
                    {
                      title: {
                        text: "三级内容",
                      },
                    },
                    {
                      title: {
                        text: "三级内容",
                      },
                    },
                  ], */
                },
                {
                  title: {
                    text: "三级内容",
                  },
                  data: [
                    {
                      title: {
                        text: "三级内容",
                      },
                    },
                    {
                      title: {
                        text: "三级内容",
                      },
                    },
                    {
                      title: {
                        text: "三级内容",
                      },
                    },
                  ],
                },
                {
                  title: {
                    text: "三级内容",
                  },
                },
              ],
            },
          ],
        },
      },
 
      data5: {
        body: {
          arrowRight: true,
          title: {
            text: "一级内容",
            style: {
              width: "150px",
              color: "#002766",
              background: "#f0f2f5",
            },
          },
          style: {
            width: "250px",
          },
          container: {
            style: {
              display: "flex",
              "flex-wrap": "wrap",
            },
          },
          data: [
            {
              type: 2,
              title: {
                text: "标签",
                style: {
                  "margin-right": "10px",
                },
              },
            },
            {
              type: 2,
              title: {
                text: "标签",
                style: {
                  "margin-right": "10px",
                  background: "#0050b3",
                },
              },
            },
            {
              type: 2,
              title: {
                text: "标签",
                style: {
                  "margin-right": "10px",
                  background: "#0050b3",
                },
              },
            },
            {
              type: 2,
              title: {
                text: "标签1234567",
                style: {
                  "margin-right": "10px",
                  background: "#0050b3",
                },
              },
            },
            {
              type: 2,
              title: {
                text: "标签1237",
                style: {
                  "margin-right": "10px",
                },
              },
            },
            {
              type: 2,
              title: {
                text: "标签127",
                style: {
                  "margin-right": "10px",
                },
              },
            },
            {
              type: 2,
              title: {
                text: "标签12347",
                style: {
                  "margin-right": "10px",
                },
              },
            },
            {
              type: 2,
              title: {
                text: "标签67",
                style: {
                  "margin-right": "10px",
                },
              },
            },
            {
              type: 2,
              title: {
                text: "标签1247",
                style: {
                  "margin-right": "10px",
                  background: "#0050b3",
                },
              },
            },
            {
              type: 2,
              title: {
                text: "标签1234567",
                style: {
                  "margin-right": "10px",
                },
              },
            },
            {
              type: 2,
              title: {
                text: "标签7",
                style: {
                  "margin-right": "10px",
                },
              },
            },
            {
              type: 2,
              title: {
                text: "标签147",
                style: {
                  "margin-right": "10px",
                },
              },
            },
            {
              type: 2,
              title: {
                text: "标签1567",
                style: {
                  "margin-right": "10px",
                  background: "#0050b3",
                },
              },
            },
          ],
        },
      },
 
      data6: {
        body: {
          // arrowRight: true,
          title: {
            text: "一级内容",
            style: {
              width: "190px",
              color: "#002766",
              background: "#f0f2f5",
            },
          },
          style: {
            width: "440px",
          },
          container: {
            style: {
              display: "flex",
              "flex-wrap": "wrap",
            },
          },
          data: [
            {
              type: 2,
              title: {
                text: "区块链硬件",
              },
              children: [
                {
                  title: {
                    text: "三级内容",
                    style: {
                      color: "#ffffff",
                      background: "#40a9ff",
                    },
                  },
                  children: [
                    {
                      title: {
                        text: "三级内容",
                      },
                    },
                    {
                      title: {
                        text: "三级内容",
                      },
                      children: [
                        {
                          title: {
                            text: "四级内容",
                          },
                        },
                        {
                          title: {
                            text: "四级内容",
                          },
                        },
                        {
                          title: {
                            text: "四级内容",
                          },
                        },
                        {
                          title: {
                            text: "四级内容",
                          },
                        },
                      ],
                    },
                    {
                      title: {
                        text: "三级内容",
                      },
                    },
                  ],
                },
                {
                  title: {
                    text: "三级内容",
                    style: {
                      color: "#ffffff",
                      background: "#40a9ff",
                    },
                  },
                  children: [
                    {
                      title: {
                        text: "三级内容",
                      },
                    },
                    {
                      title: {
                        text: "三级内容",
                      },
                    },
                    {
                      title: {
                        text: "三级内容",
                      },
                    },
                  ],
                },
                {
                  title: {
                    text: "三级内容",
                    style: {
                      color: "#ffffff",
                      background: "#40a9ff",
                    },
                  },
                  children: [
                    {
                      title: {
                        text: "三级内容",
                      },
                    },
                  ],
                },
                {
                  title: {
                    text: "三级内容",
                    style: {
                      color: "#ffffff",
                      background: "#40a9ff",
                    },
                  },
                },
              ],
            },
          ],
        },
      },
    };
  },
};
</script>


相关文章
|
NoSQL 算法 Java
面试官:网关如何实现限流?
面试官:网关如何实现限流?
1785 2
面试官:网关如何实现限流?
|
3月前
|
人工智能 数据挖掘 调度
新版 阿里云百炼 Token Plan 功能介绍,助力 AI 生产力,全模型通用节省计划直省 55%
随着AI大模型从试用探索走向规模化商用落地,个人开发者、自媒体创作者、政企研发团队普遍面临**多模型计费混乱、按量账单不可控、高峰算力溢价高、批量调用成本暴涨**等痛点。传统大模型按量计费模式下,不同模型单价差异大、多工具调用对账繁琐、高频量产算力成本居高不下,极大制约AI自动化工作流、智能体长效挂机、多媒体内容量产、工程级代码迭代的规模化落地。
296 0
|
7月前
|
存储 人工智能 Shell
【从零手写 ClaudeCode:learn-claude-code 项目实战笔记】(3)TodoWrite (待办写入)
本章详解 s03 版本 TodoWrite 机制:通过 `todo` 工具+`TodoManager` 实现显式任务状态管理(pending/in_progress/completed),强制单任务聚焦;并引入“nag 提醒”——连续3轮未更新待办时自动注入提醒,解决大模型长链路任务健忘问题。代码精简可运行。
1178 3
|
7月前
|
SQL 中间件 API
PythonWeb基础-FastAPI使用
FastAPI是一个基于Python的高性能Web框架,专为构建API接口服务设计。摘要涵盖以下核心内容:1)基础使用包括项目创建、路由定义和参数处理(路径/查询/请求体参数);2)请求响应机制支持JSON、HTML等多种格式;3)中间件和依赖注入实现通用逻辑复用;4)ORM数据库操作完整流程,包含模型定义、CRUD操作和复杂查询(条件/聚合/分页)。框架特性包括异步支持、自动数据验证、类型提示和交互式文档,显著提升开发效率和API性能。
|
8月前
|
数据采集 JSON JavaScript
Python 抖音爬虫从 0 到 1 实战:环境配置与数据爬取全教程
Python 抖音爬虫从 0 到 1 实战:环境配置与数据爬取全教程
|
9月前
|
数据采集 人工智能 前端开发
爬虫与反爬技术深度解析:攻防博弈中的技术演进
本文系统解析爬虫与反爬技术的动态博弈,涵盖技术原理(静态采集→动态渲染)、反爬矩阵(基础防护→智能风控)及反反爬演进(规则对抗→AI赋能),并探讨联邦学习、大模型、隐私计算等未来趋势,强调合规生态构建。(239字)
|
10月前
|
测试技术
金丝雀发布
金丝雀发布(Canary)是一种渐进式发布策略,类似灰度发布。不同于蓝绿部署需两套完整环境切换,金丝雀是在一套系统中逐步替换旧版本,适用于大规模服务器场景。例如,线上有一万台Web服务器时,可先更新10台并观察,确认无误后逐步推广。通过流量切分控制新版本请求比例,降低发布风险。而单台服务器场景则适合蓝绿部署,不适用金丝雀。两种策略各有适用场景,需根据实际架构选择。
|
Web App开发 安全 CDN
WebRTC溯源的几个实战利用场景
WebRTC溯源的几个实战利用场景
1083 0
|
JavaScript 前端开发
VUE技术栈-Vue的基本使用
尹正杰在其博客中介绍了Vue.js框架,它是一个渐进式JavaScript框架,由尤雨溪开发,结合了AngularJS的模板语法和数据绑定以及React的组件化和虚拟DOM技术,适合构建高效、轻量化的用户界面。
405 4

热门文章

最新文章