添加了类型声明文件

This commit is contained in:
luyuan 2020-10-09 10:53:07 +08:00
parent 9237c995b5
commit b58d0638c4
Signed by: theluyuan
GPG Key ID: A7972FD973317FF3
2 changed files with 4 additions and 3 deletions

View File

@ -17,4 +17,5 @@ export interface FromSend {
export interface VideoInfo {
type: string;
name: string;
uid: string;
}

View File

@ -53,7 +53,7 @@ import { defineComponent, reactive, Ref, ref } from 'vue';
import { PlaySquareOutlined, PlusOutlined } from '@ant-design/icons-vue';
import NavBottom from '@/components/NavBottom.vue';
import { previewCover } from '@/static/js/common';
import { ImgInfo } from '@/types';
import { FromSend, ImgInfo, VideoInfo } from '@/types';
export default defineComponent({
name: 'ReleaseWebcast',
@ -117,7 +117,7 @@ export default defineComponent({
* 上传文件之前的钩子
* @param file 上传的文件
*/
const beforeVideoUpload = (file: any): boolean => {
const beforeVideoUpload = (file: VideoInfo): boolean => {
console.log(file);
if(file.type != '') {
// handleRemove(file);
@ -128,7 +128,7 @@ export default defineComponent({
/**
* 表单提交
*/
const onSubmit = (e: any) => {
const onSubmit = (e: FromSend) => {
e.preventDefault();
};