Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
pespantelis committed Mar 4, 2017
1 parent b10bab9 commit b0cd3ae
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 7 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ Otherwise, the `mixins` way also works.

<!-- the list -->
<ul v-show="hasItems">
<li v-for="item in items" :class="activeClass($index)" @mousedown="hit" @mousemove="setActive($index)">
<!-- for [email protected] use: ($item, item) -->
<li v-for="(item, $item) in items" :class="activeClass($item)" @mousedown="hit" @mousemove="setActive($item)">
<span v-text="item.name"></span>
</li>
</ul>
Expand Down
2 changes: 1 addition & 1 deletion demo/Typeahead.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
@input="update"/>

<ul v-show="hasItems">
<li v-for="item in items" :class="activeClass($index)" @mousedown="hit" @mousemove="setActive($index)">
<li v-for="(item, $item) in items" :class="activeClass($item)" @mousedown="hit" @mousemove="setActive($item)">
<span class="name" v-text="item.name"></span>
<span class="screen-name" v-text="item.screen_name"></span>
</li>
Expand Down
2 changes: 1 addition & 1 deletion demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<link rel="stylesheet" href="assets/style.css">
</head>
<body>
<div class="container">
<div id="demo" class="container">
<h1>Typeahead</h1>
<h4>Vue.js component</h4>
<a href="https://github.com/pespantelis/vue-typeahead" class="button">Source on GitHub</a>
Expand Down
2 changes: 1 addition & 1 deletion demo/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Typeahead from './Typeahead.vue'
Vue.prototype.$http = Axios

new Vue({
el: 'body',
el: '#demo',
components: {
Typeahead
}
Expand Down
10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules",
"dist": "babel src/main.js --out-file dist/vue-typeahead.common.js"
},
"peerDependencies": {
"vue": "^1.0.21 || ^2.x.x"
},
"dependencies": {
"babel-runtime": "^6.0.0",
"vue": "^1.0.21"
"babel-runtime": "^6.0.0"
},
"devDependencies": {
"axios": "^0.15.3",
Expand All @@ -36,10 +38,12 @@
"css-loader": "^0.23.0",
"eslint": "^2.13.1",
"eslint-config-vue": "^1.0.3",
"eslint-plugin-html": "^1.5.5",
"vue-hot-reload-api": "^1.2.0",
"vue-html-loader": "^1.0.0",
"vue-loader": "^8.3.0",
"vue-loader": "^11.1.4",
"vue-style-loader": "^1.0.0",
"vue-template-compiler": "^2.2.1",
"webpack": "^1.12.2",
"webpack-dev-server": "^1.12.0"
}
Expand Down
5 changes: 5 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ module.exports = {
publicPath: '/build/',
filename: 'build.js'
},
resolve: {
alias: {
'vue': 'vue/dist/vue.common'
}
},
module: {
loaders: [
{
Expand Down

0 comments on commit b0cd3ae

Please sign in to comment.