|
| 1 | +<template> |
| 2 | + <bottom-sheet-layer title="クラス一覧" title-en="CLASS LIST" fullscreen> |
| 3 | + <template v-slot:LayerContents> |
| 4 | + <v-list> |
| 5 | + <v-radio-group v-model="selectedItem"> |
| 6 | + <v-list-item |
| 7 | + v-for="(item, index) in items" |
| 8 | + :key="index" |
| 9 | + class="ClassList-Item" |
| 10 | + > |
| 11 | + <v-radio :value="item.num"> |
| 12 | + <template v-slot:label> |
| 13 | + <span class="ClassList-Label">{{ item.name }}</span> |
| 14 | + </template> |
| 15 | + </v-radio> |
| 16 | + </v-list-item> |
| 17 | + </v-radio-group> |
| 18 | + </v-list> |
| 19 | + </template> |
| 20 | + <template v-slot:LayerFooter> |
| 21 | + <action-button |
| 22 | + theme="primary" |
| 23 | + text="選択クラスでログインする" |
| 24 | + class="ClassList-Button" |
| 25 | + /> |
| 26 | + <action-button theme="secondary" text="クラスを登録する" /> |
| 27 | + </template> |
| 28 | + </bottom-sheet-layer> |
| 29 | +</template> |
| 30 | + |
| 31 | +<script lang="ts"> |
| 32 | +import Vue from 'vue' |
| 33 | +import BottomSheetLayer from '@/components/BottomSheetLayer.vue' |
| 34 | +import ActionButton from '@/components/ActionButton.vue' |
| 35 | +
|
| 36 | +type DataType = { |
| 37 | + items: Object[] |
| 38 | + selectedItem: number |
| 39 | +} |
| 40 | +
|
| 41 | +export default Vue.extend({ |
| 42 | + components: { BottomSheetLayer, ActionButton }, |
| 43 | + layout: 'background', |
| 44 | + data(): DataType { |
| 45 | + return { |
| 46 | + items: [ |
| 47 | + { name: 'ほげほげ学校1年2組', num: 1 }, |
| 48 | + { name: 'ほげほげ学校1年2組', num: 2 }, |
| 49 | + { name: 'ほげほげ学校1年2組', num: 3 }, |
| 50 | + { name: 'ほげほげ学校1年2組', num: 4 }, |
| 51 | + { name: 'ほげほげ学校1年2組', num: 5 }, |
| 52 | + { name: 'ほげほげ学校1年2組', num: 6 }, |
| 53 | + { name: 'ほげほげ学校1年2組', num: 7 }, |
| 54 | + { name: 'ほげほげ学校1年2組', num: 8 }, |
| 55 | + { name: 'ほげほげ学校1年2組', num: 9 } |
| 56 | + ], |
| 57 | + selectedItem: 1 |
| 58 | + } |
| 59 | + } |
| 60 | +}) |
| 61 | +</script> |
| 62 | + |
| 63 | +<style lang="scss" scoped> |
| 64 | +.ClassList-Item { |
| 65 | + &:nth-child(2n) { |
| 66 | + background-color: $color-back-gray; |
| 67 | + } |
| 68 | +} |
| 69 | +.ClassList-Label { |
| 70 | + color: $color-gray; |
| 71 | +} |
| 72 | +.ClassList-Button { |
| 73 | + margin-bottom: 16px; |
| 74 | +} |
| 75 | +</style> |
0 commit comments