{"id":19111805,"url":"https://github.com/milk-ui/milkui-popup","last_synced_at":"2026-07-16T09:31:07.714Z","repository":{"id":57297135,"uuid":"91937302","full_name":"milk-ui/milkui-popup","owner":"milk-ui","description":"Popup for milk ui.","archived":false,"fork":false,"pushed_at":"2017-08-21T15:54:14.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-12T15:09:34.323Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/milk-ui.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-21T06:21:07.000Z","updated_at":"2017-07-30T02:49:06.000Z","dependencies_parsed_at":"2022-09-01T08:41:27.189Z","dependency_job_id":null,"html_url":"https://github.com/milk-ui/milkui-popup","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milk-ui%2Fmilkui-popup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milk-ui%2Fmilkui-popup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milk-ui%2Fmilkui-popup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milk-ui%2Fmilkui-popup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/milk-ui","download_url":"https://codeload.github.com/milk-ui/milkui-popup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240169721,"owners_count":19759137,"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":[],"created_at":"2024-11-09T04:29:53.737Z","updated_at":"2025-10-25T13:45:16.052Z","avatar_url":"https://github.com/milk-ui.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# milkui-popup\n\n[![npm version](https://img.shields.io/npm/v/milkui-popup.svg?style=flat)](https://www.npmjs.com/package/milkui-popup) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](README.md)\n\n[![NPM](https://nodei.co/npm/milkui-popup.png?downloads=true\u0026downloadRank=true)](https://nodei.co/npm/milkui-popup/)\n\n\u003e 在点击控件或者某个区域后，浮出一个气泡菜单来做更多的操作。 如果设置了遮罩层，建议通过点击遮罩层的任一位置，进行退出。\n\n## Overview\n\n![image](https://user-images.githubusercontent.com/11053605/28750107-95a89c06-7511-11e7-8c21-a3a72af99b98.png)\n\n## Example\n\n```js\nimport Popup from 'milkui-popup';\n\n\u003cPopup\n  placement=\"bottomRight\"\n  content={popupContent}\n  offsetX={-20}\n  offsetY={10}\n\u003e\n  \u003cIcon className=\"demo__icon demo__bar__icon\" glyph={iconEllipsis} /\u003e\n\u003c/Popup\u003e\n\n// popupContent\n\u003cdiv className=\"demo__popup-content\"\u003e\n  \u003cdiv className=\"item\"\u003e\n    \u003cIcon className=\"demo__icon item__icon\" glyph={iconScan} /\u003e\n    \u003cspan\u003e扫一扫\u003c/span\u003e\n  \u003c/div\u003e\n  \u003cdiv className=\"item\"\u003e\n    \u003cIcon className=\"demo__icon item__icon\" glyph={iconQrcode} /\u003e\n    \u003cspan\u003e我的二维码\u003c/span\u003e\n  \u003c/div\u003e\n  \u003cdiv className=\"item\"\u003e\n    \u003cIcon className=\"demo__icon item__icon\" glyph={iconHelp} /\u003e\n    \u003cspan\u003e帮助\u003c/span\u003e\n  \u003c/div\u003e\n\u003c/div\u003e\n```\n\n## Properties\n\n| Property | Type | Description | Default |\n| -- | -- | -- | -- |\n| placement | String | 显示位置 | 'bottomLeft' |\n| contentClassName | String | 自定义的 class 类名 | '' |\n| adjustable | Boolean | 定位是否自适应 | true |\n| maxWidth | Number | 显示内容的最大宽度 | 200 |\n| offsetX | Number | 内容区定位后的 x 轴的偏移量 | 0 |\n| offsetY | Number | 内容区定位后的 y 轴的偏移量 | 0 |\n| content | React node | 显示内容 | '' |\n| containerNode | React node | 显示内容的容器 | document.body |\n\n## Develop\n\n```bash\ncnpm i milk-dev -g    # dev tool\n\ncnpm install\n\nnpm start\n```\n\n## Links\n\n- [Issues](https://github.com/milk-ui/milkui-popup/issues)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmilk-ui%2Fmilkui-popup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmilk-ui%2Fmilkui-popup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmilk-ui%2Fmilkui-popup/lists"}