|
| 1 | +<template> |
| 2 | + <v-bottom-sheet v-model="screen" persistent scrollable> |
| 3 | + <v-card class="EditingScreen"> |
| 4 | + <v-card-title class="EditingScreen-CardElements"> |
| 5 | + <v-container class="EditingScreen-Container"> |
| 6 | + <div class="EditingScreen-Header"> |
| 7 | + <span class="En">CREATE TIMETABLE</span> |
| 8 | + <h2 class="Title">時間割作成</h2> |
| 9 | + </div> |
| 10 | + </v-container> |
| 11 | + </v-card-title> |
| 12 | + <v-card-text class="EditingScreen-CardText"> |
| 13 | + <v-container class="EditingScreen-FormContainer"> |
| 14 | + <editing-screen1 v-show="page === 1" /> |
| 15 | + <editing-screen2 v-show="page === 2" /> |
| 16 | + <editing-screen3 v-show="page === 3" /> |
| 17 | + <editing-screen4 v-show="page === 4" /> |
| 18 | + </v-container> |
| 19 | + </v-card-text> |
| 20 | + <v-card-actions class="EditingScreen-CardElements"> |
| 21 | + <v-container class="EditingScreen-Container"> |
| 22 | + <div class="EditingScreen-Footer"> |
| 23 | + <div class="EditingScreen-Paging"> |
| 24 | + <v-btn color="white" fab :disabled="isDisabled" @click="goBack"> |
| 25 | + <v-icon color="#0071c2" large>mdi-chevron-left</v-icon> |
| 26 | + </v-btn> |
| 27 | + <span class="PagingNumber">{{ page }}/4</span> |
| 28 | + <v-btn |
| 29 | + color="white" |
| 30 | + fab |
| 31 | + :disabled="isDisabled" |
| 32 | + @click="goForward" |
| 33 | + > |
| 34 | + <v-icon color="#0071c2" large>mdi-chevron-right</v-icon> |
| 35 | + </v-btn> |
| 36 | + </div> |
| 37 | + <div class="EditingScreen-ActionButtons"> |
| 38 | + <action-button |
| 39 | + class="Button" |
| 40 | + theme="transparent" |
| 41 | + text="キャンセル" |
| 42 | + /> |
| 43 | + <action-button |
| 44 | + class="Button" |
| 45 | + theme="primary" |
| 46 | + text="保存する" |
| 47 | + :is-disabled="isDisabled" |
| 48 | + /> |
| 49 | + </div> |
| 50 | + </div> |
| 51 | + </v-container> |
| 52 | + </v-card-actions> |
| 53 | + </v-card> |
| 54 | + </v-bottom-sheet> |
| 55 | +</template> |
| 56 | + |
| 57 | +<script lang="ts"> |
| 58 | +import Vue from 'vue' |
| 59 | +import ActionButton from '@/components/ActionButton.vue' |
| 60 | +import EditingScreen1 from '@/components/EditingScreen1.vue' |
| 61 | +import EditingScreen2 from '@/components/EditingScreen2.vue' |
| 62 | +import EditingScreen3 from '@/components/EditingScreen3.vue' |
| 63 | +import EditingScreen4 from '@/components/EditingScreen4.vue' |
| 64 | +
|
| 65 | +type DataType = { |
| 66 | + screen: boolean |
| 67 | + isDisabled: boolean |
| 68 | + page: number |
| 69 | +} |
| 70 | +
|
| 71 | +export default Vue.extend({ |
| 72 | + components: { |
| 73 | + ActionButton, |
| 74 | + EditingScreen1, |
| 75 | + EditingScreen2, |
| 76 | + EditingScreen3, |
| 77 | + EditingScreen4 |
| 78 | + }, |
| 79 | + props: { |
| 80 | + expanded: { |
| 81 | + type: Boolean, |
| 82 | + required: false, |
| 83 | + default: false |
| 84 | + } |
| 85 | + }, |
| 86 | + data(): DataType { |
| 87 | + return { |
| 88 | + screen: this.expanded, |
| 89 | + isDisabled: false, |
| 90 | + page: 1 |
| 91 | + } |
| 92 | + }, |
| 93 | + watch: { |
| 94 | + expanded(newValue) { |
| 95 | + this.screen = newValue |
| 96 | + } |
| 97 | + }, |
| 98 | + methods: { |
| 99 | + goForward(): Number { |
| 100 | + return this.page < 4 ? (this.page += 1) : 4 |
| 101 | + }, |
| 102 | + goBack(): Number { |
| 103 | + return this.page > 1 ? (this.page -= 1) : 1 |
| 104 | + } |
| 105 | + } |
| 106 | +}) |
| 107 | +</script> |
| 108 | + |
| 109 | +<style lang="scss" scoped> |
| 110 | +.EditingScreen { |
| 111 | + background-color: $color-base-color-07; |
| 112 | + border-radius: 24px 24px 0 0 !important; |
| 113 | + padding: 16px; |
| 114 | + margin-top: -40px; |
| 115 | +} |
| 116 | +.EditingScreen-CardElements { |
| 117 | + padding: 0 !important; |
| 118 | +} |
| 119 | +.EditingScreen-CardText { |
| 120 | + padding: 16px 8px 0 0 !important; |
| 121 | +} |
| 122 | +.EditingScreen-FormContainer { |
| 123 | + padding: 0 !important; |
| 124 | +} |
| 125 | +.EditingScreen-Container { |
| 126 | + padding: 0; |
| 127 | +} |
| 128 | +.EditingScreen-Header { |
| 129 | + display: flex; |
| 130 | + flex-direction: column; |
| 131 | + align-items: center; |
| 132 | + color: $color-white; |
| 133 | + border-bottom: 1px solid $color-base-color-01; |
| 134 | + padding: 0 0 4px !important; |
| 135 | +
|
| 136 | + .En { |
| 137 | + font-size: 12px; |
| 138 | + font-weight: bold; |
| 139 | + } |
| 140 | +
|
| 141 | + .Title { |
| 142 | + font-size: 20px; |
| 143 | + } |
| 144 | +} |
| 145 | +.EditingScreen-Paging { |
| 146 | + display: flex; |
| 147 | + justify-content: space-between; |
| 148 | + align-items: center; |
| 149 | + margin: 16px 0; |
| 150 | +
|
| 151 | + .PagingNumber { |
| 152 | + font-size: 18px; |
| 153 | + color: $color-white; |
| 154 | + } |
| 155 | +} |
| 156 | +.EditingScreen-Form { |
| 157 | + padding: 16px 16px 0 0 !important; |
| 158 | +} |
| 159 | +.EditingScreen-Footer { |
| 160 | + border-top: 1px solid $color-base-color-01; |
| 161 | +} |
| 162 | +.EditingScreen-ActionButtons { |
| 163 | + display: flex; |
| 164 | + justify-content: space-between; |
| 165 | +
|
| 166 | + .Button { |
| 167 | + flex: 0 1 48%; |
| 168 | + } |
| 169 | +} |
| 170 | +</style> |
0 commit comments