10
10
<editor-input-field-pickable
11
11
v-model =" videoSearchWord"
12
12
selector =" video"
13
- :title ="
14
- $t('components.editing_screen.labels.video_keyword', {
15
- source: '',
16
- })
17
- "
13
+ :title =" $t('components.editing_screen.labels.video_keyword')"
18
14
:placeholder =" $t('components.editing_screen.placeholder.video_keyword')"
19
15
icon-name =" mdi-magnify"
20
16
:button-text =" $t('components.editing_screen.search_videos.search')"
24
20
25
21
<div v-if =" videoSearchResult.length > 0" class =" SearchResult" >
26
22
<h3 class =" SearchResultTitle" >
27
- {{
28
- $t('components.editing_screen.search_videos.search_result', {
29
- source: '',
30
- })
31
- }}
23
+ {{ $t('components.editing_screen.search_videos.search_result') }}
32
24
</h3 >
33
25
<ul class =" SearchResultList" >
34
26
<li v-for =" (v, i) in displayLists" :key =" i" class =" SearchResultItem" >
83
75
<script lang="ts">
84
76
import { Vue , Component , Prop , Emit , Watch } from ' vue-property-decorator'
85
77
import EditorInputFieldPickable from ' ~/components/EditorInputFieldPickable.vue'
78
+ import { MovieListItem , Movie } from ' ~/types/movies'
86
79
87
- let movies: any [] = []
80
+ let movies: Movie [] = []
88
81
89
82
export type formData = {
90
83
videoUrl: string | null
91
84
videoTitle: string
85
+ videoSubTitle: string | null
86
+ videoDescription: string | null
87
+ videoPlayTime: string | null
92
88
videoThumbnailUrl: string | null
93
89
}
94
90
@@ -101,6 +97,9 @@ export default class EditLessonScreenInner3 extends Vue {
101
97
tempFormData = {
102
98
videoUrl: this .form .videoUrl ,
103
99
videoTitle: this .form .videoTitle ,
100
+ videoSubTitle: this .form .videoSubTitle ,
101
+ videoDescription: this .form .videoDescription ,
102
+ videoPlayTime: this .form .videoPlayTime ,
104
103
videoThumbnailUrl:
105
104
this .form .videoThumbnailUrl !== ' ' ? this .form .videoThumbnailUrl : null ,
106
105
}
@@ -111,18 +110,21 @@ export default class EditLessonScreenInner3 extends Vue {
111
110
default : () => ({
112
111
videoUrl: null ,
113
112
videoTitle: ' ' ,
113
+ videoSubTitle: ' ' ,
114
+ videoDescription: ' ' ,
115
+ videoPlayTime: ' ' ,
114
116
videoThumbnailUrl: ' ' ,
115
117
}),
116
118
})
117
119
public value! : formData
118
120
119
121
videoSourceType: string = ' '
120
122
videoSearchWord: string = ' '
121
- videoSearchResult: formData [] = []
123
+ videoSearchResult: ( formData | undefined ) [] = []
122
124
page: number = 1
123
125
pageSize: number = 5
124
126
length: number = 0
125
- displayLists: formData [] = []
127
+ displayLists: ( formData | undefined ) [] = []
126
128
127
129
mounted() {
128
130
// fetch('/data/movies.json')
@@ -150,7 +152,7 @@ export default class EditLessonScreenInner3 extends Vue {
150
152
this .tempFormData = this .value
151
153
}
152
154
153
- private handleChangeMovie(selected ) {
155
+ private handleChangeMovie(selected : MovieListItem ) {
154
156
this .videoSourceType = selected .sourceType
155
157
fetch (` /data/${selected .dataFile } ` )
156
158
.then ((res ) => res .json ())
@@ -199,7 +201,7 @@ export default class EditLessonScreenInner3 extends Vue {
199
201
)
200
202
}
201
203
202
- private mapNhk(v ) {
204
+ private mapNhk(v : Movie ) : formData {
203
205
const videoId = v .inherentProperties .教材_ID
204
206
const videoType = parseInt (videoId .slice (5 , 6 ))
205
207
const nfsMovieUrl = ' https://www2.nhk.or.jp/school/movie/'
@@ -229,7 +231,7 @@ export default class EditLessonScreenInner3 extends Vue {
229
231
}
230
232
}
231
233
232
- private mapJunyiacademy(v ) {
234
+ private mapJunyiacademy(v : Movie ) : formData {
233
235
return {
234
236
videoUrl: v .inherentProperties .url ,
235
237
videoTitle: v .title ,
0 commit comments