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