Browse Source

Merge branch 'iteration_1.3.3' into dev

lex 2 years ago
parent
commit
5ec2ad1ecf

+ 4 - 0
src/components/col-upload/index.module.less

@@ -1,3 +1,7 @@
+.colUpload {
+  line-height: 0;
+}
+
 .uploadSection {
   width: 150px;
   height: 85px;

+ 15 - 1
src/views/role-auth/teacherAuth/components/base-info/index.tsx

@@ -1,3 +1,4 @@
+import ColCropper from '@/components/col-cropper'
 import ColUpload from '@/components/col-upload'
 import ColUploadVideo from '@/components/col-upload-video'
 import ColVideo from '@/components/col-video'
@@ -85,7 +86,20 @@ export default defineComponent({
                 prop={`styleVideo.${index}.cover`}
                 rules={[{ required: true, message: '请上传视频封面' }]}
               >
-                <ColUpload v-model:modelValue={item.cover} />
+                {/* <ColUpload v-model:modelValue={item.cover} /> */}
+                <ColCropper
+                  modelValue={item.cover}
+                  bucket="video-course"
+                  cropUploadSuccess={(data: any) => {
+                    item.cover = data
+                  }}
+                  options={{
+                    title: '视频封面',
+                    fixedNumber: [3.34, 2],
+                    autoCropWidth: 375,
+                    autoCropHeight: 212
+                  }}
+                />
               </ElFormItem>
             </ElCol>
           </ElRow>