{"id":24625084,"url":"https://github.com/glibwild/glibline","last_synced_at":"2026-02-11T07:31:26.225Z","repository":{"id":273839310,"uuid":"920500943","full_name":"GlibWild/glibline","owner":"GlibWild","description":"基于vue3的原生时间轴组件","archived":false,"fork":false,"pushed_at":"2025-02-13T03:41:54.000Z","size":73,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-03T15:39:50.547Z","etag":null,"topics":["timeline","ts","typescript","vue3"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GlibWild.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-01-22T09:09:02.000Z","updated_at":"2025-02-13T03:41:58.000Z","dependencies_parsed_at":"2025-01-23T09:32:25.749Z","dependency_job_id":"51763d4e-4cdc-46ee-915b-7ce990cc5eb8","html_url":"https://github.com/GlibWild/glibline","commit_stats":null,"previous_names":["glibwild/glibline"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/GlibWild/glibline","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GlibWild%2Fglibline","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GlibWild%2Fglibline/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GlibWild%2Fglibline/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GlibWild%2Fglibline/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GlibWild","download_url":"https://codeload.github.com/GlibWild/glibline/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GlibWild%2Fglibline/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29329493,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T06:13:03.264Z","status":"ssl_error","status_checked_at":"2026-02-11T06:12:55.843Z","response_time":97,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["timeline","ts","typescript","vue3"],"created_at":"2025-01-25T04:12:58.355Z","updated_at":"2026-02-11T07:31:26.207Z","avatar_url":"https://github.com/GlibWild.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- [![license](https://img.shields.io/github/license/anncwb/vue-vben-admin.svg)](LICENSE) --\u003e\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/GlibWild/glibline/blob/master/LICENSE)\n\n### 安装\n~~~\nnpm install glibline\n~~~\n\n### 提醒\n##### 1. 选中菜单支持图片类型路径，以及fontawesome等样式，但是需要调用本组件项目已经完成对fontawesome的样式支持，否则无法展示\n##### 2. 当为图片类型路径时，iconColor无效\n\n### 使用\n定义容器\n~~~\n\u003cdiv id=\"container\" style=\"width: 100%; height: 300px\"\u003e\u003c/div\u003e\n~~~\n初始化对象。LineOption参考引入：import {LineOption} from \"glibline\"\n~~~\nimport GlibLine,{LineOption,GroupOption} from 'glibline'\nconst gline = new GlibLine(\n    \"container\",\n    new Date(2025, 0, 1),\n    new Date(2025, 0, 4, 23, 59, 59),\n    {\n      textWidth: 100,\n      tipBackground: \"#cccccc7f\",\n      menus: [\n        {\n          text: \"\",\n          icon: VueIcon,\n          textSize: 12,\n          clickEvent: (e: MouseEvent, startTime: Date, endTime: Date) =\u003e {\n            console.log(e, startTime, endTime);\n          },\n        },\n        {\n          text: \"测试\",\n          icon: VueIcon,\n          textSize: 12,\n          clickEvent: (e: MouseEvent, startTime: Date, endTime: Date) =\u003e {\n            console.log(e, startTime, endTime);\n          },\n        },\n      ],\n      dblClickEvent: (e: MouseEvent, curTime: Date, item) =\u003e {\n        console.log(\"double click\", curTime, item);\n      },\n    } as LineOption\n  );\n~~~\n设置组对象。GroupOption参考引入：import {GroupOption} from \"glibline\"\n~~~\nconst groups = [\n    new Group(1, \"Group 1\", [\n      new Item(\n        1,\n        \"Item 1\",\n        new Date(2025, 0, 1, 9, 0, 0),\n        new Date(2025, 0, 1, 12, 0, 0)\n      ),\n      new Item(\n        2,\n        \"Item 2\",\n        new Date(2025, 0, 2, 0, 0, 0),\n        new Date(2025, 0, 2, 3, 0, 0)\n      ),\n    ]),\n\n    new Group(\n      2,\n      \"Group 2\",\n\n      [\n        new Item(\n          3,\n          \"Item 3\",\n          new Date(2025, 0, 1, 3, 0, 0),\n          new Date(2025, 0, 1, 6, 0, 0)\n        ),\n        new Item(\n          4,\n          \"Item 4\",\n          new Date(2025, 0, 2, 0, 0, 0),\n          new Date(2025, 0, 2, 3, 0, 0)\n        ),\n      ],\n      {\n        textColor: \"#ff0000\",\n        backgroundColor: \"#000000\",\n        textSize: 13,\n      } as GroupOption\n    ),\n  ];\n  gline.setData(groups);\n~~~","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglibwild%2Fglibline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglibwild%2Fglibline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglibwild%2Fglibline/lists"}