diff --git a/package.json b/package.json
index eddca6f1..9e936620 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "vue-strap",
- "version": "2.0.2",
+ "version": "2.0.6",
"description": "Bootstrap components built with Vue.js",
"main": "dist/vue-strap.js",
"typings": "types/index.d.ts",
@@ -14,7 +14,7 @@
},
"dependencies": {
"bootstrap": "^3.3.7",
- "vue": "^2.1.0",
+ "vue": "^2.6.10",
"vue-template-compiler": "^2.1.0",
"vue-resource": "^1.0.3"
},
diff --git a/src/Input.vue b/src/Input.vue
index 92b9ce04..fd8ff242 100644
--- a/src/Input.vue
+++ b/src/Input.vue
@@ -17,9 +17,10 @@
:rows="rows"
:step="step"
:title="attr(title)"
+ :autofocus="autofocus"
:type="type=='textarea'?null:type"
- v-model="val"
- @blur="emit" @focus="emit" @input="emit"
+ :value="val" @input="emit"
+ @blur="emit" @focus="emit"
@keyup.enter="type!='textarea'&&enterSubmit&&submit()"
>
@@ -45,9 +46,10 @@
:rows="rows"
:step="step"
:title="attr(title)"
+ :autofocus="autofocus"
:type="type=='textarea'?null:type"
- v-model="val"
- @blur="emit" @focus="emit" @input="emit"
+ :value="val" @input="emit"
+ @blur="emit" @focus="emit"
@keyup.enter="type!='textarea'&&enterSubmit&&submit()"
>
×
@@ -73,6 +75,7 @@ export default {
cols: {type: Number, default: null},
datalist: {type: Array, default: null},
disabled: {type: Boolean, default: false},
+ autofocus: {type: Boolean, default: false},
enterSubmit: {type: Boolean, default: false},
error: {type: String, default: null},
help: {type: String, default: null},
@@ -190,7 +193,9 @@ export default {
}, this.validationDelay)
}
},
- focus () { this.input.focus() },
+ focus () {
+ setTimeout(()=>this.$refs.input && this.$refs.input.focus(), 100)
+ },
submit () {
if (this.$parent._formValidator) {
return this.$parent.validate()
diff --git a/src/Tooltip.vue b/src/Tooltip.vue
index 0eeaafb4..16e5c578 100644
--- a/src/Tooltip.vue
+++ b/src/Tooltip.vue
@@ -2,7 +2,7 @@
-