From aa1c5b71f716711420c798ba4e8b4be8c70ab327 Mon Sep 17 00:00:00 2001 From: Marcos Moura Date: Wed, 7 Sep 2016 17:08:38 -0300 Subject: [PATCH] Init upgrade of select --- .../mdInputContainer/mdInputContainer.vue | 11 ++++--- src/components/mdSelect/mdOption.vue | 12 +------ src/components/mdSelect/mdSelect.vue | 33 +++++++------------ src/docs/pages/Select.vue | 8 ++--- 4 files changed, 23 insertions(+), 41 deletions(-) diff --git a/src/components/mdInputContainer/mdInputContainer.vue b/src/components/mdInputContainer/mdInputContainer.vue index 897b941..a997995 100644 --- a/src/components/mdInputContainer/mdInputContainer.vue +++ b/src/components/mdInputContainer/mdInputContainer.vue @@ -24,12 +24,14 @@ return { 'md-input-inline': this.mdInline, 'md-has-password': this.mdHasPassword, - 'md-has-select': this.mdHasSelect + 'md-has-select': this.mdHasSelect, + 'md-has-value': Boolean(this.value) }; } }, data() { return { + value: null, input: false, inputType: false, showPassword: false, @@ -54,6 +56,9 @@ this.input.focus(); } + }, + setValue(value) { + this.value = value; } }, mounted() { @@ -66,10 +71,6 @@ } this.inputType = this.input.type; - - if (this.$el.querySelector('select')) { - this.mdHasSelect = true; - } } }; diff --git a/src/components/mdSelect/mdOption.vue b/src/components/mdSelect/mdOption.vue index 8931e08..43a2de1 100644 --- a/src/components/mdSelect/mdOption.vue +++ b/src/components/mdSelect/mdOption.vue @@ -9,15 +9,7 @@ diff --git a/src/docs/pages/Select.vue b/src/docs/pages/Select.vue index b2cff83..b6f9d4c 100644 --- a/src/docs/pages/Select.vue +++ b/src/docs/pages/Select.vue @@ -5,7 +5,7 @@
- + Fight Club Godfather II Godfather III @@ -18,7 +18,7 @@ - + Australia Brazil Japan @@ -28,7 +28,7 @@ - + Arial Calibri Cambria @@ -49,7 +49,7 @@ - + Apples Bananas