From cffa49d4c7a906f75f4be1c6e7337bc46de76409 Mon Sep 17 00:00:00 2001 From: stasson Date: Mon, 16 Jul 2018 06:50:39 +0200 Subject: [PATCH] feat(select): update select as per MDCWeb 0.37.0 Also add support for outlined select --- components/select/README.md | 14 +- components/select/demo.vue | 74 +++++----- components/select/mdc-select-label.vue | 43 ++++++ components/select/mdc-select-line-ripple.vue | 48 +++++++ .../select/mdc-select-notched-outline.vue | 57 ++++++++ components/select/mdc-select.vue | 136 +++++++++--------- 6 files changed, 258 insertions(+), 114 deletions(-) create mode 100644 components/select/mdc-select-label.vue create mode 100644 components/select/mdc-select-line-ripple.vue create mode 100644 components/select/mdc-select-notched-outline.vue diff --git a/components/select/README.md b/components/select/README.md index f3974385..2e6c65f8 100644 --- a/components/select/README.md +++ b/components/select/README.md @@ -13,19 +13,21 @@ var vm = new Vue({ data() { return { - selected: '', - }; - }, -}); + selected: '' + } + } +}) ``` ### mdc-select | props | Type | Default | Description | | ---------- | --------------- | ------- | -------------------------------------------- | -| `disabled` | Boolean | false | whether this select is disabled | | `label` | String | | the selection label (placeholder) | | `value` | [String, Array] | | bind with v-model (update on `change` event) | +| `disabled` | Boolean | false | whether this select is disabled | +| `box` | Boolean | false | box style | +| `outlined` | Boolean | false | outlined style | | event | Description | | -------- | ----------------------- | @@ -47,4 +49,4 @@ var vm = new Vue({ ### Reference -* +- diff --git a/components/select/demo.vue b/components/select/demo.vue index 7de42409..7410beac 100644 --- a/components/select/demo.vue +++ b/components/select/demo.vue @@ -1,45 +1,47 @@ - + + diff --git a/components/select/mdc-select-line-ripple.vue b/components/select/mdc-select-line-ripple.vue new file mode 100644 index 00000000..91a5a45b --- /dev/null +++ b/components/select/mdc-select-line-ripple.vue @@ -0,0 +1,48 @@ + + + diff --git a/components/select/mdc-select-notched-outline.vue b/components/select/mdc-select-notched-outline.vue new file mode 100644 index 00000000..a5e0ff10 --- /dev/null +++ b/components/select/mdc-select-notched-outline.vue @@ -0,0 +1,57 @@ + + + diff --git a/components/select/mdc-select.vue b/components/select/mdc-select.vue index 37751128..a7766d5f 100644 --- a/components/select/mdc-select.vue +++ b/components/select/mdc-select.vue @@ -17,26 +17,37 @@ selected/> -
{{ label }}
-
+ + {{ label }} + + + +