{"id":22283731,"url":"https://github.com/veaba/vue-multi-address","last_synced_at":"2025-03-25T19:51:31.318Z","repository":{"id":57159440,"uuid":"103656808","full_name":"veaba/vue-multi-address","owner":"veaba","description":"多功能自定义拓展地址库，支持 数组type 不同类型的三级联库","archived":false,"fork":false,"pushed_at":"2019-06-29T09:09:05.000Z","size":45,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-04-26T18:46:58.490Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/veaba.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2017-09-15T12:52:59.000Z","updated_at":"2019-06-29T09:09:07.000Z","dependencies_parsed_at":"2022-09-08T11:03:41.249Z","dependency_job_id":null,"html_url":"https://github.com/veaba/vue-multi-address","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/veaba%2Fvue-multi-address","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/veaba%2Fvue-multi-address/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/veaba%2Fvue-multi-address/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/veaba%2Fvue-multi-address/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/veaba","download_url":"https://codeload.github.com/veaba/vue-multi-address/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245535436,"owners_count":20631293,"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-12-03T16:41:56.233Z","updated_at":"2025-03-25T19:51:31.281Z","avatar_url":"https://github.com/veaba.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vue-multi-address\n- 多功能自定义拓展地址库，支持 数组type 不同类型的三级联库\n- 强依赖iview \n\n## BUG \n- 在iview modal tabs 中出现显示异常  -2017-9-18 fiex \n- 当重置prop 是，无法联动data的值变化 -2019年6月24日20:10:46 fix\n- 移除亢余代码 —— 2019年6月25日23:28:29\n- 补全省份全称 —— 2019年6月25日23:33:11\n\n## Tips非常重要\n- 这个项目强依赖 于 https://github.com/iview/iview ，不然css 会Boooooooom啊\n- 参考类型项目  https://github.com/G-Veigar/vue-address-picker\n\n## install\n\n~~`npm install --save vue-multi-address`~~\n\n```shell\n临时使用\nnpm install --save @china5a/vue-multi-address\n```\n\n## 父组件中\n\n\n```js\n\u003ctemplate\u003e\n  \u003caddress-picker v-model=\"location\" :level=\"3\" :type='[\"unit\",\"address\"]' @on-change=\"getChangeValue\"\u003e\u003c/address-picker\u003e\n\u003c/template\u003e\n\n```\n## event 子组件返回值 地区的对象 {province,city,district}\n\n- @on-change return{Object}\n```js\n\nmethods:{\n  getChangeValue(location)  {\n    console.info(location);\n  }\n}\n\n```\n## props\n\n- level {number}\n```vue\n\tlevel 分为三级 1 2 3，\n\tlevel 1 则只会出现一个级联\n\tlevel 2 则只会出现两个级联\n\tlevel 3 则只会出现三个级联\n\t\n```\n- type {array}\n```vue\n\t:type='[\"unit\",\"address\"]'\n\t\n\t目前只支持 两个类型库，需要的话，自己在源码里面增加以适应不同的场合\n\t如果空数组则default : address\n```\n- value {Object} (双向绑定)\n支持value 传入默认值\n```vue\n\t\u003caddress-picker :value=\"location\" :level=\"3\" :type='[\"unit\",\"address\"]' @on-change=\"getChangeValue\" \u003e\u003c/address-picker\u003e\n\n```\n此时 在js 里面这样赋予默认值\n```js\ndata(){\n      return {\n        location: {\n          province: \"浙江\",\n          city: \"\",\n          district: \"\"\n        }\n      }\n    }\n```\n\n\n## lib 库 格式 纯js文件\n```js\n\nmodule.exports={\n\t{ \"name\": \"北京\", \"city\": [{ \"name\": \"北京\", \"area\": [\"东城区\", \"西城区\", \"崇文区\", \"宣武区\", \"朝阳区\", \"丰台区\", \"石景山区\", \"海淀区\", \"门头沟区\", \"房山区\", \"通州区\", \"顺义区\", \"昌平区\", \"大兴区\", \"平谷区\", \"怀柔区\", \"密云县\", \"延庆县\"] }] },\n\t{ \"name\": \"天津\", \"city\": [{ \"name\": \"天津\", \"area\": [\"和平区\", \"河东区\", \"河西区\", \"南开区\", \"河北区\", \"红桥区\", \"塘沽区\", \"汉沽区\", \"大港区\", \"东丽区\", \"西青区\", \"津南区\", \"北辰区\", \"武清区\", \"宝坻区\", \"宁河县\", \"静海县\", \"蓟  县\"] }] }\n}\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fveaba%2Fvue-multi-address","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fveaba%2Fvue-multi-address","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fveaba%2Fvue-multi-address/lists"}