{"id":18293719,"url":"https://github.com/museui/muse-ui-message","last_synced_at":"2025-09-10T06:33:34.235Z","repository":{"id":128196388,"uuid":"137435176","full_name":"museui/muse-ui-message","owner":"museui","description":"message box plugin base on muse-ui","archived":false,"fork":false,"pushed_at":"2018-11-27T07:13:15.000Z","size":88,"stargazers_count":8,"open_issues_count":2,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-05T11:34:26.004Z","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/museui.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":"2018-06-15T03:08:23.000Z","updated_at":"2019-06-25T18:45:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"9f7f43eb-587b-4ef9-bd59-d0c1e8b1e2e6","html_url":"https://github.com/museui/muse-ui-message","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/museui/muse-ui-message","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/museui%2Fmuse-ui-message","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/museui%2Fmuse-ui-message/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/museui%2Fmuse-ui-message/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/museui%2Fmuse-ui-message/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/museui","download_url":"https://codeload.github.com/museui/muse-ui-message/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/museui%2Fmuse-ui-message/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274422211,"owners_count":25282123,"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","status":"online","status_checked_at":"2025-09-10T02:00:12.551Z","response_time":83,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-05T14:25:51.327Z","updated_at":"2025-09-10T06:33:34.214Z","avatar_url":"https://github.com/museui.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Muse-UI-Message\n\nMuse-UI plugin message dialog\n\n\u003ca href=\"https://travis-ci.org/museui/muse-ui-message\"\u003e\n  \u003cimg src=\"https://img.shields.io/travis/museui/muse-ui-message.svg\" alt=\"travis ci badge\"\u003e\n\u003c/a\u003e\n\u003ca href=\"https://www.npmjs.org/package/muse-ui-message\"\u003e\n  \u003cimg src=\"https://img.shields.io/npm/v/muse-ui-message.svg\" alt=\"Downloads\"\u003e\n\u003c/a\u003e\n\u003ca href=\"https://npmjs.org/package/muse-ui-message\"\u003e\n  \u003cimg src=\"https://img.shields.io/npm/dm/muse-ui-message.svg\" alt=\"Downloads\"\u003e\n\u003c/a\u003e\n\n## Installation\n\n```bash\nnpm install -S muse-ui-message\n// or\nyarn add muse-ui-message\n```\n\n## CDN\n\n```html\n\u003clink rel=\"stylesheet\" href=\"https://unpkg.com/muse-ui-message/dist/muse-ui-message.all.css\"/\u003e\n\u003cscript src=\"https://unpkg.com/muse-ui-message/dist/muse-ui-message.js\"\u003e\u003c/script\u003e\n```\n\n## Usage\n\n```javascript\nimport 'muse-ui-message/dist/muse-ui-message.css';\nimport Vue from 'vue';\nimport MuseUIMessage from 'muse-ui-message';\nVue.use(MuseUIMessage);\n\nnew Vue({\n  methods: {\n    open () {\n      this.$alert('Hello world');\n      this.$confirm('Hello world ?');\n      this.$prompt('Input Some I');\n    }\n  }\n})\n\n// or\nMuseUIMessage.alert('Hello world');\nMuseUIMessage.confirm('Hello world ?');\nMuseUIMessage.prompt('Input Some I');\n\n// use with router\n\nrouter.beforeEach(() =\u003e {\n  MuseUIMessage.close();\n});\n```\n\n\n## API\n\n### config\n\n```javascript\nexport default {\n  successIcon: 'check_circle',                    // success icon\n  infoIcon: 'info',                               // info icon\n  warningIcon: 'priority_high',                   // warning icon\n  errorIcon: 'warning',                           // error icon\n  iconSize: 24,                                   // icon size\n  width: 350,                                     // dialog width\n  maxWidth: '80%',                                // dialog max width\n  className: '',                                  // dialog class\n  okLabel: '确定',                                 // dialog ok label\n  cancelLabel: '取消',                             // dialog cancel label\n  transition: 'scale'                             // 'slide-top', 'slide-bottom', 'slide-left', 'slide-right', 'fade', 'scale'\n};\n```\n\n### config (config\u003cObject\u003e)\n\nChange default config, Will return new config.\n\n### Methods\n\n* $alerts(content, title, options) 或 $alerts(content, options)\n* $confirm(content, title, options) 或 $confirm(content, options)\n* $prompt(content, title, options) 或 $prompt(content, options)\n\nWill return Promise, ({ resule, value })\n\n```javascript\nthis.$confirm('confirm ?')\n  .then(({ result, value }) =\u003e {\n    // result:  true click ok Button, false click cancel button\n    // value: input value\n  })\n```\n\n### Options\n\n| Name | Description | Type | Accepted Values | Default |\n|------|-------------|------|-----------------|---------|\n| title | dialog title | String | — | — |\n| content | dialog content， support render function | String, Function | — | — |\n| mode | dialog mode | String | alert / confirm / prompt | alert |\n| type | dailog level type | String | success / info / error / warning | — |\n| icon | dialog icon | String | — | — |\n| iconSize | icon size | Number | — | 24 |\n| width | dialog width | Number / String | — | 350 |\n| maxWidth | max width | Number / String | — | 80% |\n| className | dialog class | String | — | — |\n| transition | transition animate | String | slide-top / slide-bottom / slide-left / slide-right / fade / scale | scale |\n| beforeClose | before close callback  (result, instance, done) | Function | — | — |\n| okLabel | ok button label | String | — | — |\n| cancelLabel | cancel button label | String | — | — |\n| inputType | input type | String | — | — |\n| inputPlaceholder | input placeholder | String | — | — |\n| inputValue | input default value | String | — | — |\n| validator | input validator function (val), will return { valid, message } | Function | — | — |\n\n## Dependencies Muse-UI\n\n* `mu-dialog`\n* `mu-icon`\n* `mu-text-field`\n* `mu-button`\n\n## Licence\n\nmuse-ui-message is open source and released under the MIT Licence.\n\nCopyright (c) 2018 myron\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuseui%2Fmuse-ui-message","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmuseui%2Fmuse-ui-message","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuseui%2Fmuse-ui-message/lists"}