|
1 | 1 | <template>
|
2 | 2 | <div class="full-control">
|
3 |
| - <md-list> |
4 |
| - <md-list-item md-expand :md-expanded.sync="expandNews"> |
5 |
| - <md-icon>whatshot</md-icon> |
6 |
| - <span class="md-list-item-text">News</span> |
| 3 | + <div class="list"> |
| 4 | + <md-list :md-expand-single="expandSingle"> |
| 5 | + <md-list-item md-expand :md-expanded.sync="expandNews"> |
| 6 | + <md-icon>whatshot</md-icon> |
| 7 | + <span class="md-list-item-text">News</span> |
7 | 8 |
|
8 |
| - <md-list slot="md-expand"> |
9 |
| - <md-list-item class="md-inset">World</md-list-item> |
10 |
| - <md-list-item class="md-inset">Europe</md-list-item> |
11 |
| - <md-list-item class="md-inset">South America</md-list-item> |
12 |
| - </md-list> |
13 |
| - </md-list-item> |
| 9 | + <md-list slot="md-expand"> |
| 10 | + <md-list-item class="md-inset">World</md-list-item> |
| 11 | + <md-list-item class="md-inset">Europe</md-list-item> |
| 12 | + <md-list-item class="md-inset">South America</md-list-item> |
| 13 | + </md-list> |
| 14 | + </md-list-item> |
14 | 15 |
|
15 |
| - <md-list-item md-expand> |
16 |
| - <md-icon>videogame_asset</md-icon> |
17 |
| - <span class="md-list-item-text">Games</span> |
| 16 | + <md-list-item md-expand> |
| 17 | + <md-icon>videogame_asset</md-icon> |
| 18 | + <span class="md-list-item-text">Games</span> |
18 | 19 |
|
19 |
| - <md-list slot="md-expand"> |
20 |
| - <md-list-item class="md-inset">Console</md-list-item> |
21 |
| - <md-list-item class="md-inset">PC</md-list-item> |
22 |
| - <md-list-item class="md-inset">Phone</md-list-item> |
23 |
| - </md-list> |
24 |
| - </md-list-item> |
| 20 | + <md-list slot="md-expand"> |
| 21 | + <md-list-item class="md-inset">Console</md-list-item> |
| 22 | + <md-list-item class="md-inset">PC</md-list-item> |
| 23 | + <md-list-item class="md-inset">Phone</md-list-item> |
| 24 | + </md-list> |
| 25 | + </md-list-item> |
25 | 26 |
|
26 |
| - <md-list-item md-expand> |
27 |
| - <md-icon>video_library</md-icon> |
28 |
| - <span class="md-list-item-text">Video</span> |
| 27 | + <md-list-item md-expand> |
| 28 | + <md-icon>video_library</md-icon> |
| 29 | + <span class="md-list-item-text">Video</span> |
29 | 30 |
|
30 |
| - <md-list slot="md-expand"> |
31 |
| - <md-list-item class="md-inset">Humor</md-list-item> |
32 |
| - <md-list-item class="md-inset">Music</md-list-item> |
33 |
| - <md-list-item class="md-inset">Movies</md-list-item> |
34 |
| - <md-list-item class="md-inset">TV Shows</md-list-item> |
35 |
| - </md-list> |
36 |
| - </md-list-item> |
| 31 | + <md-list slot="md-expand"> |
| 32 | + <md-list-item class="md-inset">Humor</md-list-item> |
| 33 | + <md-list-item class="md-inset">Music</md-list-item> |
| 34 | + <md-list-item class="md-inset">Movies</md-list-item> |
| 35 | + <md-list-item class="md-inset">TV Shows</md-list-item> |
| 36 | + </md-list> |
| 37 | + </md-list-item> |
37 | 38 |
|
38 |
| - <md-list-item> |
39 |
| - <md-icon>shopping_basket</md-icon> |
40 |
| - <span class="md-list-item-text">Shop</span> |
41 |
| - </md-list-item> |
42 |
| - </md-list> |
43 |
| - <md-checkbox v-model="expandNews">Expand News</md-checkbox> |
| 39 | + <md-list-item> |
| 40 | + <md-icon>shopping_basket</md-icon> |
| 41 | + <span class="md-list-item-text">Shop</span> |
| 42 | + </md-list-item> |
| 43 | + </md-list> |
| 44 | + </div> |
| 45 | + <div class="control"> |
| 46 | + <md-switch v-model="expandSingle">Expand Only One</md-switch> |
| 47 | + <md-checkbox v-model="expandNews">Expand News</md-checkbox> |
| 48 | + </div> |
44 | 49 | </div>
|
45 | 50 | </template>
|
46 | 51 |
|
|
50 | 55 |
|
51 | 56 | data () {
|
52 | 57 | return {
|
53 |
| - expandNews: false |
| 58 | + expandNews: false, |
| 59 | + expandSingle: false |
54 | 60 | }
|
55 | 61 | }
|
56 | 62 | }
|
57 | 63 | </script>
|
58 | 64 |
|
59 | 65 | <style lang="scss" scoped>
|
| 66 | + $list-width: 320px; |
| 67 | +
|
| 68 | + .full-control { |
| 69 | + display: flex; |
| 70 | + flex-direction: row; |
| 71 | + flex-wrap: wrap-reverse; |
| 72 | + } |
| 73 | +
|
| 74 | + .list { |
| 75 | + width: $list-width; |
| 76 | + } |
| 77 | +
|
60 | 78 | .full-control > .md-list {
|
61 |
| - width: 320px; |
| 79 | + width: $list-width; |
62 | 80 | max-width: 100%;
|
63 | 81 | height: 400px;
|
64 | 82 | display: inline-block;
|
65 | 83 | overflow: auto;
|
66 | 84 | border: 1px solid rgba(#000, .12);
|
67 | 85 | vertical-align: top;
|
68 | 86 | }
|
| 87 | +
|
| 88 | + .control { |
| 89 | + min-width: 250px; |
| 90 | + display: flex; |
| 91 | + flex-direction: column; |
| 92 | + padding: 16px; |
| 93 | + } |
69 | 94 | </style>
|
0 commit comments