Merge branch 'master' of git://github.com/vuematerial/vue-material into develop

This commit is contained in:
Vincent Chavez 2017-05-18 14:53:34 -07:00
commit 5d61c76051
5 changed files with 52 additions and 2 deletions

View file

@ -10,9 +10,19 @@
<a href="https://www.npmjs.com/package/vue-material">
<img src="https://img.shields.io/npm/dt/vue-material.svg" alt="Downloads">
</a>
<<<<<<< HEAD
<a href="https://www.npmjs.com/package/vue-material">
<img src="https://img.shields.io/npm/v/vue-material.svg" alt="Version">
=======
<a href="https://www.npmjs.com/package/vue-material">
<img src="https://img.shields.io/npm/v/vue-material.svg" alt="Version">
</a>
<a href="https://cdnjs.com/libraries/vue-material">
<img src="https://img.shields.io/cdnjs/v/vue-material.svg" alt="Version">
>>>>>>> 369f3f0e392dd4fcc2c4e26e80a2e36d6dcf54cd
</a>
<a href="https://www.npmjs.com/package/vue-material">

View file

@ -77,6 +77,12 @@
<md-table-cell>Sets the type. Default <code>text</code></md-table-cell>
</md-table-row>
<md-table-row>
<md-table-cell>debounce</md-table-cell>
<md-table-cell><code>Number</code></md-table-cell>
<md-table-cell>Debounce the <code>change</code> and <code>input</code> events emission. Default <code>300</code>ms</md-table-cell>
</md-table-row>
<md-table-row>
<md-table-cell>disabled</md-table-cell>
<md-table-cell><code>Boolean</code></md-table-cell>
@ -121,6 +127,12 @@
<md-table-cell>A required model object to bind the value.</md-table-cell>
</md-table-row>
<md-table-row>
<md-table-cell>debounce</md-table-cell>
<md-table-cell><code>Number</code></md-table-cell>
<md-table-cell>Debounce the <code>change</code> and <code>input</code> events emission. Default <code>300</code>ms</md-table-cell>
</md-table-row>
<md-table-row>
<md-table-cell>disabled</md-table-cell>
<md-table-cell><code>Boolean</code></md-table-cell>

View file

@ -69,8 +69,14 @@
"eslint-plugin-html": "^2.0.1",
"eventsource-polyfill": "^0.9.6",
"express": "^4.14.1",
<<<<<<< HEAD
"extract-text-webpack-plugin": "beta",
"friendly-errors-webpack-plugin": "^1.3.1",
=======
"extract-text-webpack-plugin": "^2.1.0",
"file-loader": "^0.10.0",
"friendly-errors-webpack-plugin": "^1.1.3",
>>>>>>> 369f3f0e392dd4fcc2c4e26e80a2e36d6dcf54cd
"highlight.js": "^9.9.0",
"html-webpack-plugin": "^2.28.0",
"node-sass": "^4.5.0",

View file

@ -1,11 +1,21 @@
export default {
props: {
value: [String, Number],
debounce: {
type: Number,
default: 3E2
},
disabled: Boolean,
required: Boolean,
maxlength: [Number, String],
name: String,
placeholder: String
},
data() {
return {
timeout: 0
};
},
watch: {
value() {
this.updateValues();
@ -28,6 +38,15 @@ export default {
this.parentContainer.enableCounter = this.maxlength > 0;
this.parentContainer.counterLength = this.maxlength;
},
lazyEventEmitter() {
if (this.timeout) {
window.clearTimeout(this.timeout);
}
this.timeout = window.setTimeout(() => {
this.$emit('change', this.$el.value);
this.$emit('input', this.$el.value);
}, this.debounce);
},
setParentValue(value) {
this.parentContainer.setValue(value || this.$el.value);
},
@ -59,8 +78,7 @@ export default {
},
onInput() {
this.updateValues();
this.$emit('change', this.$el.value);
this.$emit('input', this.$el.value);
this.lazyEventEmitter();
}
}
};

View file

@ -2,7 +2,11 @@
<transition name="md-spinner" appear>
<div class="md-spinner" :class="[themeClass, classes]":style="styles">
<svg class="md-spinner-draw" viewBox="25 25 50 50">
<<<<<<< HEAD
<circle class="md-spinner-path" cx="50" cy="50" r="20" :stroke-width="mdStroke" :stroke-dasharray="dashProgress"></circle>
=======
<circle class="md-spinner-path" cx="50" cy="50" r="20" :stroke-width="mdStroke" :stroke-dasharray="dashProgress" />
>>>>>>> 369f3f0e392dd4fcc2c4e26e80a2e36d6dcf54cd
</svg>
</div>
</transition>