{"id":28311243,"url":"https://github.com/meitianyitan/zant","last_synced_at":"2026-05-06T17:33:20.978Z","repository":{"id":57405195,"uuid":"127996151","full_name":"meitianyitan/zant","owner":"meitianyitan","description":"A Vue.js 2.0 UI Toolkit for Web","archived":false,"fork":false,"pushed_at":"2018-06-15T02:54:53.000Z","size":513,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-05-05T09:33:10.725Z","etag":null,"topics":["component","components","framework","ui","vue","vuejs","zant"],"latest_commit_sha":null,"homepage":"http://t.zantb.com/","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/meitianyitan.png","metadata":{"files":{"readme":"README-zh_CN.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-04T02:33:29.000Z","updated_at":"2018-06-15T02:54:55.000Z","dependencies_parsed_at":"2022-09-16T18:41:13.028Z","dependency_job_id":null,"html_url":"https://github.com/meitianyitan/zant","commit_stats":null,"previous_names":["zilean/zant"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/meitianyitan/zant","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meitianyitan%2Fzant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meitianyitan%2Fzant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meitianyitan%2Fzant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meitianyitan%2Fzant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meitianyitan","download_url":"https://codeload.github.com/meitianyitan/zant/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meitianyitan%2Fzant/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32704382,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-06T08:33:17.875Z","status":"ssl_error","status_checked_at":"2026-05-06T08:33:17.221Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["component","components","framework","ui","vue","vuejs","zant"],"created_at":"2025-05-24T12:10:52.275Z","updated_at":"2026-05-06T17:33:20.947Z","avatar_url":"https://github.com/meitianyitan.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zant\n\nzant 是一套基于 Vue.js 的开源 UI 组件库，主要服务于 PC 界面的中后台产品。\n\n[README in English](./README.md)\n\n## 安装\n\n```bash\nnpm install zant --save\n```\n\n## 全局引入\n\n一般在 webpack 入口页面 main.js 中如下配置：\n\n```js\nimport Vue from 'vue';\nimport VueRouter from 'vue-router';\nimport App from 'components/app.vue';\nimport Routers from './router.js';\nimport Zant from 'zant'; // 全局引入 zant 核心库\nimport 'zant/dist/zant.css'; // 全局引入需要单独导入样式\n\nVue.use(VueRouter);\nVue.use(Zant);\n\n// 路由配置\nconst RouterConfig = {\n  routes: Routers\n};\n\nconst router = new VueRouter(RouterConfig);\n\nnew Vue({\n  el: '#app',\n  router: router,\n  render: h =\u003e h(App)\n});\n```\n\n## 按需加载\n\n借助插件[babel-plugin-import](https://github.com/ant-design/babel-plugin-import)可以实现按需加载组件，以便减少文件体积。首先安装babel-plugin-import：\n\n```bash\nnpm install babel-plugin-import --save-dev\n```\n\n然后在 .babelrc 文件中配置如下代码：\n\n```bash\n{\n  \"plugins\": [\n    [\"import\", { \"libraryName\": \"zant\", \"libraryDirectory\": \"src/components\", \"style\": true }]\n  ]\n}\n```\n\n由于组件样式是基于less编写的，所以还需安装less和less-loader：\n\n```bash\nnpm install less less-loader --save-dev\n```\n\n最后只需从 zant 引入模块即可，无需单独引入样式：\n\n```js\n// babel-plugin-import 会帮助你加载 JS 和 CSS\nimport { Affix } from 'zant';\n```\n\n上面的方式等同于下面手动引入的方式：\n\n```js\nimport Affix from 'zant/src/components/affix';  // 加载 JS\nimport 'zant/src/components/affix/style';        // 加载 LESS\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeitianyitan%2Fzant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeitianyitan%2Fzant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeitianyitan%2Fzant/lists"}