Skip to content

Commit

Permalink
Release 2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
simplesmiler committed Nov 14, 2016
1 parent 7fdf625 commit c462224
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 7 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## [2.1.0] - 2016-10-20

## Added
- `.lazy` modifier to mimic v1 behavior

## [2.0.0] - 2016-10-20

No changes from 2.0.0-rc2
Expand Down Expand Up @@ -48,3 +53,4 @@ Initial release
[2.0.0-rc1]: https://github.com/simplesmiler/vue-focus/compare/1.0.0...2.0.0-rc1
[2.0.0-rc2]: https://github.com/simplesmiler/vue-focus/compare/2.0.0-rc1...2.0.0-rc2
[2.0.0]: https://github.com/simplesmiler/vue-focus/compare/2.0.0-rc2...2.0.0
[2.1.0]: https://github.com/simplesmiler/vue-focus/compare/2.0.0...2.1.0
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ $ npm install vue-focus --save
From CDN:

``` html
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue-focus/2.0.0/vue-focus.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue-focus/2.1.0/vue-focus.js"></script>
<!-- OR -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue-focus/2.0.0/vue-focus.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue-focus/2.1.0/vue-focus.min.js"></script>
```

## API
Expand Down
8 changes: 7 additions & 1 deletion dist/vue-focus.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
var Vue = require('vue');
Vue = 'default' in Vue ? Vue['default'] : Vue;

var version = '2.0.0';
var version = '2.1.0';

var compatible = (/^2\./).test(Vue.version);
if (!compatible) {
Expand All @@ -17,6 +17,12 @@ var focus = {
},

componentUpdated: function(el, binding) {
if (binding.modifiers.lazy) {
if (Boolean(binding.value) === Boolean(binding.oldValue)) {
return;
}
}

if (binding.value) el.focus();
else el.blur();
},
Expand Down
8 changes: 7 additions & 1 deletion dist/vue-focus.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Vue = 'default' in Vue ? Vue['default'] : Vue;

var version = '2.0.0';
var version = '2.1.0';

var compatible = (/^2\./).test(Vue.version);
if (!compatible) {
Expand All @@ -16,6 +16,12 @@
},

componentUpdated: function(el, binding) {
if (binding.modifiers.lazy) {
if (Boolean(binding.value) === Boolean(binding.oldValue)) {
return;
}
}

if (binding.value) el.focus();
else el.blur();
},
Expand Down
2 changes: 1 addition & 1 deletion dist/vue-focus.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Vue from 'vue';

export var version = '2.0.0';
export var version = '2.1.0';

var compatible = (/^2\./).test(Vue.version);
if (!compatible) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vue-focus",
"description": "A set of reusable focus directives for reusable Vue.js components",
"version": "2.0.0",
"version": "2.1.0",
"author": "Denis Karabaza <[email protected]>",
"browserify": {
"transform": [
Expand Down

0 comments on commit c462224

Please sign in to comment.