commit 1fa9959cdf33017e239f2794c9f550c4b8b6d63f Author: 会PS的小码农 <747357766@qq.com> Date: Sat Mar 26 16:21:52 2022 +0800 合并选择器和地址解析 diff --git a/.babelrc b/.babelrc new file mode 100644 index 0000000..7487ad4 --- /dev/null +++ b/.babelrc @@ -0,0 +1,6 @@ +{ + "presets": [ + ["@babel/preset-env"] + ], + "plugins": ["@babel/plugin-transform-runtime"] +} diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..9d08a1a --- /dev/null +++ b/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 2 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true diff --git a/.editorconfig copy b/.editorconfig copy new file mode 100644 index 0000000..ecd17e7 --- /dev/null +++ b/.editorconfig copy @@ -0,0 +1,14 @@ +# editorconfig.org +root = true + +[*] +indent_style = space +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.json] +indent_size = 2 +indent_style = space diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..3675648 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,2 @@ +node_modules/* +build/* diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..af57ce3 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,33 @@ +{ + "parser": "babel-eslint", + "env": { + "browser": true, + "commonjs": true, + "es6": true, + "node": true + }, + "parserOptions": { + "ecmaVersion": 8, + "sourceType": "module" + }, + "rules": { + "no-const-assign": "warn", + "no-this-before-super": "warn", + "no-undef": "warn", + "no-unreachable": "warn", + "no-unused-vars": "warn", + "constructor-super": "warn", + "valid-typeof": "warn", + "semi": [ + "warn", + "never" + ], + "quotes": [ + "warn", + "single" + ], + "arrow-parens": 0, + "generator-star-spacing": 0, + "space-before-function-paren": 0 + } +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..580ebce --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +.DS_Store +node_modules/ +npm-debug.log +yarn-error.log +.idea diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..ebf67ad --- /dev/null +++ b/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2018 Christoph von Gellhorn +Copyright (c) 2022 Edison Liu + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..747c2f9 --- /dev/null +++ b/README.md @@ -0,0 +1,75 @@ +
+
+
A flexible, highly available district selector for picking provinces, cities and districts of China.
+ +# V - Distpicker + +Here is [documents](http://distpicker.pigjian.com/) + +## Installation + +```javascript +npm install v-distpicker --save +``` + +Or + +```javascript +yarn add v-distpicker --save +``` + +## Usage + +**Register component** + +Registe global component: + +```javascript +import Distpicker from 'v-distpicker' + +Vue.component('v-distpicker', Distpicker) +``` + +Registe component: + +```javascript +import VDistpicker from 'v-distpicker' + +export default { + components: { VDistpicker } +} +``` + +**How to use** + +Basic: + +```javascript +