├── .babelrc ├── .gitignore ├── LICENSE ├── README.md ├── dist └── .gitkeep ├── index.html ├── package.json └── src ├── App.vue ├── Autocomplete.vue └── main.js /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["es2015", "stage-2"], 3 | "plugins": ["transform-runtime"] 4 | } 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | dist/build.js 4 | npm-debug.log 5 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Fareez Ahamed 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # autocomplete-vuejs 2 | 3 | Sample VueJs component to demonstrate the Autocomplete using Bootstrap 4 | 5 | ## Build Setup 6 | 7 | ``` bash 8 | # install dependencies 9 | npm install 10 | 11 | # serve with hot reload at localhost:8080 12 | npm run dev 13 | 14 | # build for production with minification 15 | npm run build 16 | ``` 17 | 18 | For more information see the [docs for vueify](https://github.com/vuejs/vueify). 19 | -------------------------------------------------------------------------------- /dist/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fareez-ahamed/autocomplete-vuejs/daa4506372b306c0c13ac858e11be84d444d22fb/dist/.gitkeep -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | autocomplete 7 | 8 | 9 |
10 | 11 |
12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "autocomplete", 3 | "description": "A Vue.js project", 4 | "author": "Fareez Ahamed ", 5 | "private": true, 6 | "scripts": { 7 | "watchify": "watchify -vd -p browserify-hmr -e src/main.js -o dist/build.js", 8 | "serve": "http-server -c 1 -a localhost", 9 | "dev": "npm-run-all --parallel watchify serve", 10 | "build": "cross-env NODE_ENV=production browserify src/main.js | uglifyjs -c warnings=false -m > dist/build.js" 11 | }, 12 | "dependencies": { 13 | "vue": "^1.0.0" 14 | }, 15 | "devDependencies": { 16 | "babel-core": "^6.0.0", 17 | "babel-plugin-transform-runtime": "^6.0.0", 18 | "babel-preset-es2015": "^6.0.0", 19 | "babel-preset-stage-2": "^6.0.0", 20 | "babel-runtime": "^6.0.0", 21 | "cross-env": "^1.0.6", 22 | "babelify": "^7.2.0", 23 | "browserify": "^12.0.1", 24 | "browserify-hmr": "^0.3.1", 25 | "http-server": "^0.9.0", 26 | "npm-run-all": "^1.6.0", 27 | "uglify-js": "^2.5.0", 28 | "vueify": "^8.5.2", 29 | "watchify": "^3.4.0" 30 | }, 31 | "browserify": { 32 | "transform": [ 33 | "vueify", 34 | "babelify" 35 | ] 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 20 | 21 | 26 | -------------------------------------------------------------------------------- /src/Autocomplete.vue: -------------------------------------------------------------------------------- 1 | 75 | 93 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import Autocomplete from './Autocomplete.vue'; 3 | 4 | new Vue({ 5 | el: 'body', 6 | 7 | components: { Autocomplete }, 8 | 9 | data: { 10 | cities : [ 11 | 'Bangalore','Chennai','Cochin','Delhi','Kolkata','Mumbai' 12 | ], 13 | 14 | value: '' 15 | } 16 | 17 | }); 18 | --------------------------------------------------------------------------------