From 1371d6c690c33a82af4645b1ee29125f4f8c1c31 Mon Sep 17 00:00:00 2001 From: Monisan Fu Date: Mon, 8 May 2017 06:35:07 +0800 Subject: [PATCH 1/3] Add CDNJS version badge in README.md (#718) This badge will show the version on CDNJS! --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 1707e24..7a46d57 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,10 @@ Version + + Version + + License From 4bcb6870ce374c025b38c92d8cd1142c6647cf4d Mon Sep 17 00:00:00 2001 From: Pablo Henrique Date: Sun, 7 May 2017 19:41:21 -0300 Subject: [PATCH 2/3] Issue#544 (#674) * chips autocomplete * criando autocomplete * base solida * fixing issue #544 * removing old files * reduced debounce time --- docs/src/pages/components/Input.vue | 12 ++++++++++++ src/components/mdInputContainer/common.js | 22 ++++++++++++++++++++-- 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/docs/src/pages/components/Input.vue b/docs/src/pages/components/Input.vue index 8bc3c70..f3e3d97 100644 --- a/docs/src/pages/components/Input.vue +++ b/docs/src/pages/components/Input.vue @@ -71,6 +71,12 @@ Sets the type. Default text + + debounce + Number + Debounce the change and input events emission. Default 300ms + + disabled Boolean @@ -115,6 +121,12 @@ A required model object to bind the value. + + debounce + Number + Debounce the change and input events emission. Default 300ms + + disabled Boolean diff --git a/src/components/mdInputContainer/common.js b/src/components/mdInputContainer/common.js index 4cf4800..c82fe60 100644 --- a/src/components/mdInputContainer/common.js +++ b/src/components/mdInputContainer/common.js @@ -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(value) { this.setParentValue(value); @@ -29,6 +39,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); }, @@ -58,8 +77,7 @@ export default { }, onInput() { this.updateValues(); - this.$emit('change', this.$el.value); - this.$emit('input', this.$el.value); + this.lazyEventEmitter(); } } }; From 369f3f0e392dd4fcc2c4e26e80a2e36d6dcf54cd Mon Sep 17 00:00:00 2001 From: supersun Date: Mon, 8 May 2017 06:45:43 +0800 Subject: [PATCH 3/3] fixed when npm install extract-text-webpack-plugin@beta not found error ( #665 ) (#666) * Update package.json * Update mdSpinner.vue --- package.json | 2 +- src/components/mdSpinner/mdSpinner.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 36dbfa2..5d5a5e2 100644 --- a/package.json +++ b/package.json @@ -69,7 +69,7 @@ "eslint-plugin-html": "^2.0.0", "eventsource-polyfill": "^0.9.6", "express": "^4.14.1", - "extract-text-webpack-plugin": "beta", + "extract-text-webpack-plugin": "^2.1.0", "file-loader": "^0.10.0", "friendly-errors-webpack-plugin": "^1.1.3", "highlight.js": "^9.9.0", diff --git a/src/components/mdSpinner/mdSpinner.vue b/src/components/mdSpinner/mdSpinner.vue index 0262f40..629e366 100644 --- a/src/components/mdSpinner/mdSpinner.vue +++ b/src/components/mdSpinner/mdSpinner.vue @@ -2,7 +2,7 @@
- +