{"id":15381611,"url":"https://github.com/guojikun/preview-image","last_synced_at":"2025-09-13T21:42:42.616Z","repository":{"id":43868594,"uuid":"280993363","full_name":"GuoJikun/preview-image","owner":"GuoJikun","description":"vue 组件-图片预览插件","archived":false,"fork":false,"pushed_at":"2025-04-11T15:28:44.000Z","size":1765,"stargazers_count":6,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-15T19:17:19.727Z","etag":null,"topics":["component","image","preview","preview-image","vue"],"latest_commit_sha":null,"homepage":"https://docs.jikun.dev/components/preview-image.html","language":"Vue","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/GuoJikun.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}},"created_at":"2020-07-20T02:27:48.000Z","updated_at":"2025-04-01T00:43:15.000Z","dependencies_parsed_at":"2024-01-16T05:03:02.947Z","dependency_job_id":"edc1ca65-4766-4773-9c1c-1213986d0425","html_url":"https://github.com/GuoJikun/preview-image","commit_stats":{"total_commits":66,"total_committers":3,"mean_commits":22.0,"dds":0.06060606060606055,"last_synced_commit":"d0dec4b7d102fb28ecf10716c6122823d7cf910b"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GuoJikun%2Fpreview-image","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GuoJikun%2Fpreview-image/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GuoJikun%2Fpreview-image/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GuoJikun%2Fpreview-image/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GuoJikun","download_url":"https://codeload.github.com/GuoJikun/preview-image/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249135832,"owners_count":21218365,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","image","preview","preview-image","vue"],"created_at":"2024-10-01T14:28:12.722Z","updated_at":"2025-04-15T19:17:27.811Z","avatar_url":"https://github.com/GuoJikun.png","language":"Vue","funding_links":[],"categories":[],"sub_categories":[],"readme":"# preview-image\n\nVue 图片预览组件\n\n\u003e vue2.x 请使用 @1.x 版本\n\n[Github](https://github.com/GuoJikun/preview-image)\n[New issue](https://github.com/GuoJikun/preview-image/issues/new)\n\n## 安装\n\n```bash\nnpm i fox-preview-image\n# or\nyarn add fox-preview-image\n# or\npnpm add fox-preview-image\n```\n\n## 引入组件\n\n```js\nimport foxPreviewImage from 'fox-preview-image'\nimport 'fox-preview-image/lib/style.css'\nVue.use(foxPreviewImage)\n```\n\n## 基础使用\n\n```html\n\u003cfox-preview-image v-model=\"visiable\" :src=\"imageSrc\" z-index=\"9000\"\u003e\u003c/fox-preview-image\u003e\n```\n\n## 演示地址\n\n[文档以及 demo 地址](https://docs.jikun.dev/components/preview-image.html)\n\n## API\n\n| 属性               | 说明                         | 参数类型          | 默认值  |\n| ------------------ | :--------------------------- | :---------------- | :------ |\n| src                | 预览图片的地址               | `string/string[]` | -       |\n| modelValue/v-model | 是否显示预览窗口             | `boolean`         | `false` |\n| initial-index      | 默认显示图片的下标           | `number`          | `0`     |\n| z-index            | 预览窗口的层级-css 的 zIndex | `number`          | `9000`  |\n| showToolbar        | 控制 toolbar 的显示和隐藏    | `boolean`         | `true`  |\n| append-to        | 控制弹窗的插入位置    | `HtmlElement/string`         | -  |\n| enable-teleport     | 启用 teleport 功能     | `boolean`         | `false`  |\n| layout | 工具栏的布局 | `string` | `zoomOut,zoomIn,scale,position,rotateLeft,rotateRight,download`|\n\n## 更新日志\n\n### v3.2.0\n\n功能：\n\n-   增加底部工具栏的可配置化\n\n### v3.1.0\n\n升级了依赖，没有功能更新\n\n### v2.9.0\n\nFeat：\n\n-   增加 `showToolbar` 属性，用于控制工具栏的显示和隐藏\n-   移除了容器的圆角属性\n\nRefactor:\n\n-   重构了代码，将重复代码替换为函数\n-   移除了 console 语句\n\n### v2.8.0\n\nFeat：\n\n-   更改打包后文件的格式,es 格式文件后缀改为 `.mjs`\n\n### v2.6.0\n\nFeat:\n\n-   增加下载功能\n-   统一 icon\n\n### v2.4.1\n\nFix:\n\n-   修复 css 导入错误\n\n### v2.4.0\n\nFeat:\n\n-   增加默认显示第几张图片的功能\n\n### v2.3.0\n\nFeat:\n\n-   增加显示当前图片下标的功能(仅在多图下显示)\n\n### v2.0.0\n\nFeat:\n\n-   增加 vue3 支持（安装：npm i fox-preview-image@next）\n\n### v1.1.3\n\nRefactor:\n\n-   删除冗余代码\n\n### v1.1.2\n\nFix：\n\n-   修复火狐浏览器拖拽失效的问题\n\n### v1.1.1\n\nFeat：\n\n-   支持鼠标滚轮放大缩小\n\n### v1.1.0\n\nfeat：\n\n-   增加缩放倍数显示\n\n### v1.0.2\n\nFix:\n\n-   修复当预览的图片为 1 张时扔显示左右切换按钮的问题\n\n### v1.0.1\n\nFix:\n\n-   修复拖拽时图片未完全跟随鼠标的 bug\n\n### v1.0.0\n\nFeat:\n\n-   旋转\n-   放大，缩小（0.5-2）\n-   多张图片可以传数组 eg：['http://xxxx.com/a.png','http://xxxx.com/b.png']\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguojikun%2Fpreview-image","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguojikun%2Fpreview-image","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguojikun%2Fpreview-image/lists"}