|
|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div class="tab">
|
|
|
- <div class="title">新建幻灯片</div>
|
|
|
+ <h1 class="title">新建幻灯片</h1>
|
|
|
<div class="sub-title">所属课程:</div>
|
|
|
<div class="select-wrapper">
|
|
|
<label>
|
|
|
@@ -14,10 +14,14 @@
|
|
|
</div>
|
|
|
<div class="sub-title">幻灯片名称:</div>
|
|
|
<c-input
|
|
|
- type="text"
|
|
|
v-model="userInput"
|
|
|
placeholder="请勿与同课程幻灯片重名"
|
|
|
/>
|
|
|
+ <div class="sub-title">幻灯片文件 <span class="tag">目前支持 PDF 格式</span></div>
|
|
|
+ <file-uploader
|
|
|
+ v-model="file"
|
|
|
+ placeholder="请勿与同课程幻灯片重名"
|
|
|
+ />
|
|
|
<c-button class="my-button" @click.native.prevent="handleSubmit">
|
|
|
添加
|
|
|
</c-button>
|
|
|
@@ -29,14 +33,16 @@ import { getTeacherCourse } from '@/server/course'
|
|
|
import { createSlide } from '@/server/slide'
|
|
|
import CInput from '@/components/CInput'
|
|
|
import CButton from '@/components/CButton'
|
|
|
+import FileUploader from '@/components/FileUploader'
|
|
|
|
|
|
export default {
|
|
|
- components: { CButton, CInput },
|
|
|
+ components: { FileUploader, CButton, CInput },
|
|
|
data () {
|
|
|
return {
|
|
|
courses: [],
|
|
|
selectedCourseId: '',
|
|
|
- userInput: ''
|
|
|
+ userInput: '',
|
|
|
+ file: null
|
|
|
}
|
|
|
},
|
|
|
mounted () {
|
|
|
@@ -56,16 +62,6 @@ export default {
|
|
|
<style lang="scss" scoped>
|
|
|
@import '~@/style/theme.scss';
|
|
|
|
|
|
-.title {
|
|
|
- margin-bottom: 32px;
|
|
|
-}
|
|
|
-
|
|
|
-.select-wrapper {
|
|
|
- width: 100%;
|
|
|
- height: 40px;
|
|
|
- margin-bottom: 36px;
|
|
|
-}
|
|
|
-
|
|
|
select {
|
|
|
box-sizing: border-box;
|
|
|
font-size: 16px;
|
|
|
@@ -84,9 +80,19 @@ select {
|
|
|
-webkit-appearance: none;
|
|
|
-moz-appearance: none;
|
|
|
//通过padding-left的值让文字居中
|
|
|
+
|
|
|
+ transition: .2s;
|
|
|
+
|
|
|
+ &:hover {
|
|
|
+ background: darken($input-background-color, 5);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.select-wrapper, .c-input {
|
|
|
+ margin-bottom: 16px;
|
|
|
}
|
|
|
|
|
|
.my-button {
|
|
|
- margin-top: 36px;
|
|
|
+ margin-top: 12px;
|
|
|
}
|
|
|
</style>
|