Skip to content

Commit 6b0bc92

Browse files
committed
Editorを閉じた際に直前に行った編集データが残ってしまっている問題の修正
1 parent 16b43b7 commit 6b0bc92

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

src/pages/edit/index.vue

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
<editing-screen
3535
:value="editPageValue"
3636
:expanded="!isExpandedButton"
37-
@closeExpand="handler"
37+
@closeExpand="closeToReset"
3838
/>
3939
</div>
4040
</template>
@@ -106,6 +106,35 @@ export default Vue.extend({
106106
handler(): void {
107107
this.isExpandedButton = !this.isExpandedButton
108108
},
109+
closeToReset(): void {
110+
this.handler()
111+
this.editPageValue = {
112+
isHidden: false,
113+
lessonId: '',
114+
firstPageData: {
115+
date: '',
116+
startTime: '',
117+
endTime: '',
118+
title: '',
119+
subjectName: '',
120+
subjectColor: '#BAC8FF'
121+
},
122+
secondPageData: {
123+
goal: '',
124+
description: ''
125+
},
126+
thirdPageData: {
127+
videoUrl: '',
128+
videoTitle: '',
129+
videoThumbnailUrl: ''
130+
},
131+
fourthPageData: {
132+
pages: '',
133+
materialsTitle: '',
134+
materialsUrl: ''
135+
}
136+
}
137+
},
109138
doEdit(value: classData.LessonWithId): void {
110139
const videoUrl = value.videos.length === 0 ? '' : value.videos[0].url
111140
const videoTitle = value.videos.length === 0 ? '' : value.videos[0].title

0 commit comments

Comments
 (0)