{"id":19297605,"url":"https://github.com/wormtql/element-dialog-helper","last_synced_at":"2026-03-02T10:32:01.651Z","repository":{"id":105486482,"uuid":"355500190","full_name":"wormtql/element-dialog-helper","owner":"wormtql","description":"ElementUI imperative dialog","archived":false,"fork":false,"pushed_at":"2021-04-07T10:23:07.000Z","size":121,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-24T01:12:08.598Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Vue","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/wormtql.png","metadata":{"files":{"readme":"README.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-07T10:17:02.000Z","updated_at":"2021-04-07T10:23:10.000Z","dependencies_parsed_at":"2023-03-07T11:15:55.354Z","dependency_job_id":null,"html_url":"https://github.com/wormtql/element-dialog-helper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wormtql/element-dialog-helper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wormtql%2Felement-dialog-helper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wormtql%2Felement-dialog-helper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wormtql%2Felement-dialog-helper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wormtql%2Felement-dialog-helper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wormtql","download_url":"https://codeload.github.com/wormtql/element-dialog-helper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wormtql%2Felement-dialog-helper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29998513,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-02T09:59:02.300Z","status":"ssl_error","status_checked_at":"2026-03-02T09:59:02.001Z","response_time":60,"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":[],"created_at":"2024-11-09T23:05:28.720Z","updated_at":"2026-03-02T10:32:01.629Z","avatar_url":"https://github.com/wormtql.png","language":"Vue","funding_links":[],"categories":[],"sub_categories":[],"readme":"# element-dialog-helper\nOpen/Close ElementUI dialogs in an imperative way\n```html\n\u003cdiv id=\"app\"\u003e\n    \u003cdialog-1 name=\"dialog-1-1\"\u003e\u003c/dialog-1\u003e\n    \u003cdialog-1 name=\"dialog-1-2\"\u003e\u003c/dialog-1\u003e\n    \u003cdialog-2\u003e\u003c/dialog-2\u003e\n    \u003cel-button @click=\"$dialog.open('dialog-1-1')\"\u003eOpen dialog-1-1\u003c/el-button\u003e\n    \u003cel-button @click=\"$dialog.open('dialog-1-2')\"\u003eOpen dialog-1-2\u003c/el-button\u003e\n    \u003cel-button @click=\"$dialog.open('dialog2')\"\u003eOpen dialog2\u003c/el-button\u003e\n\u003c/div\u003e\n```\n\n## Install\n```\nnpm install element-dialog-helper\n```\n\n## Use in Vue projects\nmake sure you have ElementUI installed\n```js\nimport Vue from \"vue\"\nimport ElementDialogHelper from \"element-dialog-helper\"\n\nVue.use(ElementDialogHelper);\n```\n\n## Usage\nIn file `Dialog1.vue`(this can be any of your custom dialog):\n```html\n\u003ctemplate\u003e\n    \u003cel-dialog-helper name=\"dialog1\" title=\"dialog1\"\u003e\n        \u003ctemplate #footer\u003e\n            \u003cel-button @click=\"$dialog.close('dialog1')\"\u003eClose\u003c/el-button\u003e\n        \u003c/template\u003e\n\n        Dialog1\n    \u003c/el-dialog-helper\u003e\n\u003c/template\u003e\n\n\u003cscript\u003e\nexport default {\n    name: \"Dialog1\",\n}\n\u003c/script\u003e\n```\n\nIn file `Dialog2.vue`(this can be any of your custom dialog):\n```html\n\u003ctemplate\u003e\n    \u003cel-dialog-helper name=\"dialog2\" title=\"dialog2\"\u003e\n        \u003ctemplate #footer\u003e\n            \u003cel-button @click=\"$dialog.close('dialog2')\"\u003eClose\u003c/el-button\u003e\n        \u003c/template\u003e\n\n        Dialog2\n    \u003c/el-dialog-helper\u003e\n\u003c/template\u003e\n\n\u003cscript\u003e\nexport default {\n    name: \"Dialog2\",\n}\n\u003c/script\u003e\n```\n\nIn file `MyComponent.vue`(the component where you have many dialogs):\n```html\n\u003ctemplate\u003e\n    \u003cdialog1\u003e\u003c/dialog1\u003e\n    \u003cdialog2\u003e\u003c/dialog2\u003e\n    \n    \u003cel-button @click=\"$dialog.open('dialog1')\"\u003eOpen Dialog1\u003c/el-button\u003e\n    \u003cel-button @click=\"$dialog.open('dialog2')\"\u003eOpen Dialog2\u003c/el-button\u003e\n\u003c/template\u003e\n\n\u003cscript\u003e\nimport Dialog1 from \"./components/Dialog1\"\nimport Dialog2 from \"./components/Dialog2\"\n\nexport default {\n    name: \"MyComponent\",\n    components: {\n        Dialog1, Dialog2,\n    },\n}\n\u003c/script\u003e\n```\n\n***If you wish to use a dialog multiple times, remember to provide a unique name to each of them***  \nFor example:\n```html\n\u003ctemplate\u003e\n    \u003cel-dialog-helper :name=\"name\" title=\"dialog1\"\u003e\n        \u003ctemplate #footer\u003e\n            \u003cel-button @click=\"$dialog.close('dialog1')\"\u003eClose\u003c/el-button\u003e\n        \u003c/template\u003e\n\n        Dialog1\n    \u003c/el-dialog-helper\u003e\n\u003c/template\u003e\n\n\u003cscript\u003e\nexport default {\n    name: \"Dialog1\",\n    props: [\"name\"],\n}\n```\n\n## API\n```js\n// in your Vue instance\n// remember, name is unique through the whole app lifetime\nthis.$dialog.open(\"dialog-name\");\nthis.$dialog.close(\"dialog-name\");\n```\nthe component `el-dialog-helper` is a wrap of `el-dialog`  \nso you can use any props/events/slots of `el-dialog`  \nfor example, you can use this:\n```html\n\u003cel-dialog-helper name=\"my-dialog\" title=\"dialog\" width=\"80%\"\u003e\n    content\n\u003c/el-dialog-helper\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwormtql%2Felement-dialog-helper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwormtql%2Felement-dialog-helper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwormtql%2Felement-dialog-helper/lists"}