1 line
44 KiB
Plaintext
1 line
44 KiB
Plaintext
{"version":3,"sources":["webpack:///./src/views/mine/ReleaseVideo.vue","webpack:///./src/views/mine/ReleaseVideo.vue?53f1","webpack:///./src/views/mine/ReleaseVideo.vue?d0d0","webpack:///./node_modules/@ant-design/icons-svg/es/asn/PlusOutlined.js","webpack:///./node_modules/@ant-design/icons-vue/es/icons/PlusOutlined.js","webpack:///./node_modules/core-js/modules/es.array.splice.js","webpack:///./src/views/mine/ReleaseVideo.vue?efc7","webpack:///./node_modules/core-js/modules/es.array.slice.js"],"names":["class","style","label-col","labelCol","wrapper-col","wrapperCol","lan","$t","label","rules","size","value","form","title","placeholder","list-type","customRequest","uploadspic","beforeUpload","imgs","viewCover","img","length","src","uploadpicprogress","type","percent","width","uploads","video","fileurl","uploadprogress","ref","desc","autoSize","maxlength","onSubmit","name","components","PlaySquareOutlined","PlusOutlined","NavBottom","setup","issum","fileid","fileduration","query","id","previewImage","coverChange","info","file","then","url","beforeCoverUpload","message","error","cancelCover","removeFile","index","newFileList","slice","splice","videofile","videos","ifalowupload","jindu","toFixed","parseInt","res","beforeUploadpic","split","ifallowvideo","addEventListener","duration","fileId","beforeVideoUpload","routes","e","preventDefault","subdata","span","previewCover","render","__scopeId","_objectSpread","target","i","arguments","source","Object","ownKeys","keys","getOwnPropertySymbols","concat","filter","sym","getOwnPropertyDescriptor","enumerable","forEach","key","_defineProperty","obj","defineProperty","configurable","writable","props","context","p","attrs","AntdIcon","displayName","inheritAttrs","$","toAbsoluteIndex","toInteger","toLength","toObject","arraySpeciesCreate","createProperty","arrayMethodHasSpeciesSupport","arrayMethodUsesToLength","HAS_SPECIES_SUPPORT","USES_TO_LENGTH","ACCESSORS","0","1","max","Math","min","MAX_SAFE_INTEGER","MAXIMUM_ALLOWED_LENGTH_EXCEEDED","proto","forced","start","deleteCount","insertCount","actualDeleteCount","A","k","from","to","O","this","len","actualStart","argumentsLength","TypeError","isObject","isArray","toIndexedObject","wellKnownSymbol","SPECIES","n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SACnDG,EAAiBF,EAAwB,QAAS,CAAEG,WAAW,EAAMC,EAAG,EAAGC,EAAG,IAE9E0B,EAAUD,EAAgB,WAC1BE,EAAc,GAAG5F,MACjBkE,EAAMC,KAAKD,IAKfd,EAAE,CAAE3B,OAAQ,QAAS8C,OAAO,EAAMC,QAASX,IAAwBC,GAAkB,CACnF9D,MAAO,SAAeyE,EAAOoB,GAC3B,IAKIC,EAAaC,EAAQC,EALrBf,EAAIQ,EAAgBP,MACpBzH,EAAS8F,EAAS0B,EAAExH,QACpBqH,EAAIzB,EAAgBoB,EAAOhH,GAC3BwI,EAAM5C,OAAwB6C,IAARL,EAAoBpI,EAASoI,EAAKpI,GAG5D,GAAI+H,EAAQP,KACVa,EAAcb,EAAEkB,YAEU,mBAAfL,GAA8BA,IAAgBM,QAASZ,EAAQM,EAAYO,WAE3Ed,EAASO,KAClBA,EAAcA,EAAYH,GACN,OAAhBG,IAAsBA,OAAcI,IAHxCJ,OAAcI,EAKZJ,IAAgBM,YAAyBF,IAAhBJ,GAC3B,OAAOF,EAAYU,KAAKrB,EAAGH,EAAGmB,GAIlC,IADAF,EAAS,SAAqBG,IAAhBJ,EAA4BM,MAAQN,GAAa5B,EAAI+B,EAAMnB,EAAG,IACvEkB,EAAI,EAAGlB,EAAImB,EAAKnB,IAAKkB,IAASlB,KAAKG,GAAGvB,EAAeqC,EAAQC,EAAGf,EAAEH,IAEvE,OADAiB,EAAOtI,OAASuI,EACTD","file":"js/chunk-7da0eb18.b6282824.js","sourcesContent":["<template>\n <div class=\"upload-video\">\n <a-form :label-col=\"labelCol\" :wrapper-col=\"wrapperCol\">\n <div class=\"title\">{{ lan.$t(\"shangchuanshipint\") }}</div>\n <a-form-item :label=\"lan.$t('shipinbiaoti')\" :rules=\"{ required: true, message: 'Please input Activity name', trigger: 'blur'}\">\n <a-input\n size=\"small\"\n v-model:value=\"form.title\"\n :placeholder=\"lan.$t('shurushipinbiaoti')\"\n />\n </a-form-item>\n <a-form-item :label=\"lan.$t('shipinfengmian')\" class=\"video-cover\" :rules=\"{ required: true, message: 'Please input Activity name', trigger: 'blur'}\">\n <div style=\"display: flex\">\n <a-upload\n list-type=\"picture\"\n :customRequest=\"uploadspic\"\n :beforeUpload=\"imgs\"\n >\n <div\n class=\"upload-image\"\n v-if=\"!viewCover && form.img.length == 0\"\n >\n <PlusOutlined\n style=\"fontsize: 22px\"\n v-if=\"uploadpicprogress == 0\"\n />\n <a-progress\n type=\"circle\"\n :percent=\"uploadpicprogress\"\n :width=\"80\"\n v-else\n />\n </div>\n <div class=\"upload-image\" v-else>\n <img\n style=\"width: 100%; height: 100%\"\n :src=\"form.img\"\n />\n </div>\n </a-upload>\n <div class=\"demand\">\n <p>\n {{ lan.$t(\"fengmianyaoqiu\") }}\n </p>\n <p>\n 1.{{ lan.$t(\"fengmianyaoqiu1\") }}\n </p>\n <p>\n 2.{{ lan.$t(\"fengmianyaoqiu2\") }}\n </p>\n </div>\n </div>\n </a-form-item>\n <a-form-item\n :label=\"lan.$t('shipinjieshao')\"\n class=\"video-introduction\"\n :rules=\"{ required: true, message: 'Please input Activity name', trigger: 'blur'}\"\n >\n <a-upload\n list-type=\"picture\"\n :customRequest=\"uploads\"\n :beforeUpload=\"video\"\n >\n <div class=\"upload-image\" v-if=\"form.fileurl.length == 0\">\n <PlaySquareOutlined\n style=\"fontsize: 22px\"\n v-if=\"uploadprogress == 0\"\n />\n <a-progress\n type=\"circle\"\n :percent=\"uploadprogress\"\n :width=\"80\"\n v-else\n />\n <!-- <video style=\"display: none\" :src=\"videofile\"></video> -->\n </div>\n <div\n class=\"upload-image upload\"\n style=\"position: relative\"\n v-show=\"form.fileurl.length != 0\"\n >\n <video\n :src=\"form.fileurl\"\n :ref=\"\n (el) => {\n videos[0] = el;\n }\n \"\n class=\"upload1\"\n ></video>\n <!-- <a-progress type=\"circle\" :percent=\"100\" :width=\"80\" style=\"position:absolute;right:35%\"/> -->\n </div>\n </a-upload>\n <div class=\"demand\">\n <p>\n {{ lan.$t(\"shipinyaoqiu\") }}\n </p>\n <p>1.{{ lan.$t(\"cshipinyaoqiu1\") }}</p>\n <p>2.{{ lan.$t(\"cshipinyaoqiu2\") }}</p>\n <p>3.{{ lan.$t(\"shipinyaoqiu3\") }}</p>\n </div>\n <!-- <div class=\"demand\">\n <p class=\"one-line-hide\">视频要求:</p>\n <p class=\"one-line-hide\">1.上传视频时间要求为30s之内</p>\n <p class=\"one-line-hide\">2.支持文件大小100M</p>\n <p class=\"one-line-hide\">\n 3.文件扩展名:fiv、mp4…文件扩展名:fiv、mp4…\n </p>\n </div> -->\n </a-form-item>\n <a-form-item :label=\"lan.$t('shipinjianjie')\" class=\"brief\">\n <a-textarea\n v-model:value=\"form.desc\"\n :autoSize=\"true\"\n class=\"brief-textarea\"\n :maxlength=\"200\"\n :placeholder=\"lan.$t('shurushipinjianjie')\"\n />\n <span class=\"words-number\">{{ form.desc.length }}/200</span>\n </a-form-item>\n <a-form-item :wrapper-col=\"{ span: 4, offset: 0 }\">\n <a-button @click=\"onSubmit\">{{\n lan.$t(\"shangchuanshipin\")\n }}</a-button>\n </a-form-item>\n </a-form>\n <nav-bottom></nav-bottom>\n </div>\n</template>\n<script lang=\"ts\">\nimport { defineComponent, onMounted, reactive, Ref, ref, toRaw } from \"vue\";\nimport { PlaySquareOutlined, PlusOutlined } from \"@ant-design/icons-vue\";\nimport NavBottom from \"@/components/NavBottom.vue\";\nimport { previewCover, provenimg, provenvideo } from \"@/utils/common\";\nimport { FromSend, ImgInfo, VideoInfo } from \"@/types\";\nimport { uploadflie } from \"@/utils/vod\";\nimport { setvideo, videoadd, videodetail } from \"@/api\";\nimport { useRoute } from \"vue-router\";\nimport { message } from \"ant-design-vue\";\nimport { useI18n } from \"@/utils/i18n\";\n\nexport default defineComponent({\n name: \"ReleaseWebcast\",\n components: {\n PlaySquareOutlined,\n PlusOutlined,\n NavBottom,\n },\n setup() {\n let issum= true;\n const lan: any = useI18n();\n interface FileItem {\n video: Array<string>;\n }\n const fileList: Array<FileItem> = [];\n\n // 表单数据\n const form = ref<any>({\n title: \"\",\n img: \"\",\n fileid: \"\",\n fileurl: \"\",\n fileduration: \"\",\n desc: \"\",\n video: [\"\"],\n });\n onMounted(async () => {\n if (useRoute().query.id) {\n console.log(useRoute().query.id, \"knijkdbj\");\n form.value = await videodetail(useRoute().query.id, 1);\n console.log(form.value, \"fornm\");\n }\n });\n\n // 是否显示封面预览 封面的路径\n const viewCover: Ref<boolean> = ref(false),\n previewImage: Ref<string> = ref(\"\");\n /**\n * 封面改变触发事件\n */\n function coverChange(info: ImgInfo): void {\n // console.log(info);\n // 获取预览图片\n previewCover(info.file).then((url) => (previewImage.value = url));\n viewCover.value = true;\n // form.cover = fileList;\n }\n\n /**\n * 上传封面之前的钩子\n * @param file 上传的文件\n */\n const beforeCoverUpload = (file: File): boolean => {\n console.log(file);\n const type = provenimg(file.name);\n if(!type){\n message.error(\"请重新选择\")\n }\n return false;\n };\n\n /**\n * 删除封面\n */\n function cancelCover(file: number): void {\n console.log(file);\n }\n /**\n * 删除视频列表\n * @param index 删除文件的索引\n */\n function removeFile(index: number): void {\n const newFileList = form.value.video.slice();\n newFileList.splice(index, 1);\n form.value.video = newFileList;\n }\n\n /**\n * 上传图片\n */\n const uploadpicprogress: Ref<number> = ref(0);\n const videofile = ref<File>();\n const videos = ref<Array<any>>([]);\n const ifalowupload = ref<boolean>(false);\n interface AntUpload {\n action: string;\n data: unknown;\n file: File;\n }\n async function uploadspic(file: AntUpload) {\n \n const res = await uploadflie(file.file, (info: any) => {\n console.log(info);\n let jindu: number = info.percent.toFixed(2) * 100;\n jindu = parseInt(jindu + \"\");\n uploadpicprogress.value = jindu || 1;\n });\n console.log(res);\n form.value.img = res.video.url;\n \n }\n\n function beforeUploadpic(info?: any) {\n console.log(info);\n if (info.type.split(\"/\")[0] != \"image\") {\n message.error(lan.$t(\"fengmiangeshi\"));\n ifalowupload.value = false;\n return;\n } else {\n ifalowupload.value = true;\n }\n }\n\n /**\n * 上传视频\n */\n const uploadprogress: Ref<number> = ref(0);\n const ifallowvideo = ref<boolean>(false);\n async function uploads(file: AntUpload) {\n issum = false;\n console.log(file);\n videofile.value = file.file;\n uploadprogress.value = 1;\n videos.value[0].addEventListener(\"durationchange\", () => {\n console.log(videos.value[0].duration);\n form.value.fileduration = videos.value[0].duration;\n });\n const res = await uploadflie(file.file, (info: any) => {\n console.log(info);\n const jindu = info.percent.toFixed(2) * 100\n uploadprogress.value = jindu > 0 ? jindu : 1;\n });\n console.log(res);\n\n form.value.fileid = res.fileId;\n form.value.fileurl = res.video.url;\n issum = true;\n } \n\n function beforeVideoUpload(info?: any) {\n console.log(info);\n if (info.type.split(\"/\")[0] != \"video\") {\n ifallowvideo.value;\n message.error(lan.$t(\"wenjiangeshi\"));\n } else {\n ifallowvideo.value = true;\n }\n }\n\n /**\n * 表单提交\n */\n const routes = useRoute();\n const onSubmit = async (e: FromSend) => {\n if(!issum){\n message.error(lan.$t(\"shangchuanwancheng\"))\n return; \n }\n e.preventDefault();\n console.log(toRaw(form.value), 111);\n console.log(toRaw(form.value).video[0].length);\n\n console.log(routes.query, \"adsadsa\");\n const subdata = toRaw(form.value);\n if (subdata.title == \"\") {\n message.error(lan.$t(\"biaotiweikong\"));\n return;\n } else if (subdata.img == \"\") {\n message.error(lan.$t(\"fengmianweikong\"));\n return;\n } else if (subdata.fileurl == \"\") {\n message.error(lan.$t(\"wenjianweikong\"));\n } else {\n if (routes.query.id) {\n form.value.id = routes.query.id;\n console.log(\"edi\");\n setvideo(form.value);\n } else {\n videoadd(form, toRaw(form.value));\n }\n // videoadd(form, toRaw(form.value));\n }\n\n // videoadd(form, toRaw(form.value));\n };\n function beforeUpload(info?: any) {\n console.log(info);\n if (info.type.split(\"/\")[0] != \"video\") {\n ifallowvideo.value = false;\n message.error(lan.$t(\"shipinjieshaoccuowu\"));\n return;\n } else {\n ifallowvideo.value = true;\n }\n }\n function video(file: any){\n return provenvideo(file, true)\n }\n function imgs(file: any){\n return provenimg(file)\n }\n \n\n return {\n labelCol: { span: 4 },\n wrapperCol: { span: 14 },\n form,\n viewCover,\n previewImage,\n previewCover,\n coverChange,\n cancelCover,\n beforeCoverUpload,\n onSubmit,\n uploadpicprogress,\n uploadspic,\n uploadprogress,\n uploads,\n videofile,\n videos,\n removeFile,\n beforeUpload,\n ifalowupload,\n beforeVideoUpload,\n lan,\n beforeUploadpic,\n video,\n imgs\n };\n },\n});\n</script>\n<style lang=\"scss\" scoped>\n.upload1{\n width: 171px;\n height: 96px;\n}\n.upload {\n width: 171px;\n height: 96px;\n display: none;\n}\n.upload-video {\n width: 100%;\n min-width: 700px;\n background-color: #ffffff;\n padding: 46px;\n border-radius: 17px;\n position: relative;\n ::v-deep(.ant-form) {\n .title {\n font-size: 12px;\n font-weight: bold;\n color: #111111;\n margin-bottom: 28px;\n }\n .ant-row {\n .ant-form-item-label {\n width: 130px;\n margin: 0 30px 0 17px;\n text-align: left;\n > label {\n font-size: 12px;\n font-weight: 500;\n color: #808080;\n &::after {\n content: \"\";\n }\n }\n }\n .upload-image {\n width: 171px;\n height: 96px;\n border: 1px solid #dcdfe0;\n border-radius: 3px;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-right: 17px;\n }\n .ant-input {\n width: 171px;\n padding: 6px 11px;\n border-radius: 3px;\n border: 1px solid #dcdfe0;\n font-size: 11px;\n color: #3f3f3f;\n &::-webkit-input-placeholder {\n font-size: 12px;\n color: #808080;\n }\n }\n .ant-select {\n font-size: 12px;\n color: #3f3f3f;\n }\n .ant-select-dropdown {\n font-size: 12px;\n }\n .ant-upload-list {\n display: none;\n }\n .ant-btn {\n padding: 0;\n width: 63px;\n height: 23px;\n background: #08ae98;\n border-radius: 3px;\n font-size: 10px;\n font-weight: 500;\n color: #ffffff;\n // &:hover {\n // background: #08ae98;\n // }\n }\n }\n .video-cover {\n .preview-image {\n width: 171px;\n height: 96px;\n }\n }\n .demand {\n height: 94px;\n font-size: 10px;\n font-weight: 500;\n color: #808080;\n // width: 134px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n > p {\n line-height: 17px;\n margin: 0;\n }\n }\n .video-introduction {\n .ant-form-item-control-wrapper {\n .ant-form-item-children {\n display: flex;\n // align-items: center;\n }\n }\n .video-list {\n display: flex;\n align-items: center;\n .link {\n width: 11px;\n height: 11px;\n margin-right: 4px;\n }\n > span {\n font-size: 9px;\n font-weight: 500;\n color: #07ad97;\n max-width: 150px;\n }\n .del {\n width: 11px;\n height: 11px;\n margin-left: auto;\n cursor: pointer;\n }\n }\n }\n .duration {\n .unit {\n margin-left: 18px;\n font-size: 12px;\n font-weight: 500;\n color: #808080;\n }\n }\n .brief {\n position: relative;\n .ant-input {\n width: 359px;\n }\n .brief-textarea {\n min-height: 85px;\n padding-bottom: 30px;\n }\n .words-number {\n position: absolute;\n right: 11px;\n bottom: -11px;\n font-size: 11px;\n font-weight: 500;\n color: #7f7f7f;\n user-select: none;\n }\n }\n }\n}\n</style>","\nimport { defineComponent, onMounted, reactive, Ref, ref, toRaw } from \"vue\";\nimport { PlaySquareOutlined, PlusOutlined } from \"@ant-design/icons-vue\";\nimport NavBottom from \"@/components/NavBottom.vue\";\nimport { previewCover, provenimg, provenvideo } from \"@/utils/common\";\nimport { FromSend, ImgInfo, VideoInfo } from \"@/types\";\nimport { uploadflie } from \"@/utils/vod\";\nimport { setvideo, videoadd, videodetail } from \"@/api\";\nimport { useRoute } from \"vue-router\";\nimport { message } from \"ant-design-vue\";\nimport { useI18n } from \"@/utils/i18n\";\n\nexport default defineComponent({\n name: \"ReleaseWebcast\",\n components: {\n PlaySquareOutlined,\n PlusOutlined,\n NavBottom,\n },\n setup() {\n let issum= true;\n const lan: any = useI18n();\n interface FileItem {\n video: Array<string>;\n }\n const fileList: Array<FileItem> = [];\n\n // 表单数据\n const form = ref<any>({\n title: \"\",\n img: \"\",\n fileid: \"\",\n fileurl: \"\",\n fileduration: \"\",\n desc: \"\",\n video: [\"\"],\n });\n onMounted(async () => {\n if (useRoute().query.id) {\n console.log(useRoute().query.id, \"knijkdbj\");\n form.value = await videodetail(useRoute().query.id, 1);\n console.log(form.value, \"fornm\");\n }\n });\n\n // 是否显示封面预览 封面的路径\n const viewCover: Ref<boolean> = ref(false),\n previewImage: Ref<string> = ref(\"\");\n /**\n * 封面改变触发事件\n */\n function coverChange(info: ImgInfo): void {\n // console.log(info);\n // 获取预览图片\n previewCover(info.file).then((url) => (previewImage.value = url));\n viewCover.value = true;\n // form.cover = fileList;\n }\n\n /**\n * 上传封面之前的钩子\n * @param file 上传的文件\n */\n const beforeCoverUpload = (file: File): boolean => {\n console.log(file);\n const type = provenimg(file.name);\n if(!type){\n message.error(\"请重新选择\")\n }\n return false;\n };\n\n /**\n * 删除封面\n */\n function cancelCover(file: number): void {\n console.log(file);\n }\n /**\n * 删除视频列表\n * @param index 删除文件的索引\n */\n function removeFile(index: number): void {\n const newFileList = form.value.video.slice();\n newFileList.splice(index, 1);\n form.value.video = newFileList;\n }\n\n /**\n * 上传图片\n */\n const uploadpicprogress: Ref<number> = ref(0);\n const videofile = ref<File>();\n const videos = ref<Array<any>>([]);\n const ifalowupload = ref<boolean>(false);\n interface AntUpload {\n action: string;\n data: unknown;\n file: File;\n }\n async function uploadspic(file: AntUpload) {\n \n const res = await uploadflie(file.file, (info: any) => {\n console.log(info);\n let jindu: number = info.percent.toFixed(2) * 100;\n jindu = parseInt(jindu + \"\");\n uploadpicprogress.value = jindu || 1;\n });\n console.log(res);\n form.value.img = res.video.url;\n \n }\n\n function beforeUploadpic(info?: any) {\n console.log(info);\n if (info.type.split(\"/\")[0] != \"image\") {\n message.error(lan.$t(\"fengmiangeshi\"));\n ifalowupload.value = false;\n return;\n } else {\n ifalowupload.value = true;\n }\n }\n\n /**\n * 上传视频\n */\n const uploadprogress: Ref<number> = ref(0);\n const ifallowvideo = ref<boolean>(false);\n async function uploads(file: AntUpload) {\n issum = false;\n console.log(file);\n videofile.value = file.file;\n uploadprogress.value = 1;\n videos.value[0].addEventListener(\"durationchange\", () => {\n console.log(videos.value[0].duration);\n form.value.fileduration = videos.value[0].duration;\n });\n const res = await uploadflie(file.file, (info: any) => {\n console.log(info);\n const jindu = info.percent.toFixed(2) * 100\n uploadprogress.value = jindu > 0 ? jindu : 1;\n });\n console.log(res);\n\n form.value.fileid = res.fileId;\n form.value.fileurl = res.video.url;\n issum = true;\n } \n\n function beforeVideoUpload(info?: any) {\n console.log(info);\n if (info.type.split(\"/\")[0] != \"video\") {\n ifallowvideo.value;\n message.error(lan.$t(\"wenjiangeshi\"));\n } else {\n ifallowvideo.value = true;\n }\n }\n\n /**\n * 表单提交\n */\n const routes = useRoute();\n const onSubmit = async (e: FromSend) => {\n if(!issum){\n message.error(lan.$t(\"shangchuanwancheng\"))\n return; \n }\n e.preventDefault();\n console.log(toRaw(form.value), 111);\n console.log(toRaw(form.value).video[0].length);\n\n console.log(routes.query, \"adsadsa\");\n const subdata = toRaw(form.value);\n if (subdata.title == \"\") {\n message.error(lan.$t(\"biaotiweikong\"));\n return;\n } else if (subdata.img == \"\") {\n message.error(lan.$t(\"fengmianweikong\"));\n return;\n } else if (subdata.fileurl == \"\") {\n message.error(lan.$t(\"wenjianweikong\"));\n } else {\n if (routes.query.id) {\n form.value.id = routes.query.id;\n console.log(\"edi\");\n setvideo(form.value);\n } else {\n videoadd(form, toRaw(form.value));\n }\n // videoadd(form, toRaw(form.value));\n }\n\n // videoadd(form, toRaw(form.value));\n };\n function beforeUpload(info?: any) {\n console.log(info);\n if (info.type.split(\"/\")[0] != \"video\") {\n ifallowvideo.value = false;\n message.error(lan.$t(\"shipinjieshaoccuowu\"));\n return;\n } else {\n ifallowvideo.value = true;\n }\n }\n function video(file: any){\n return provenvideo(file, true)\n }\n function imgs(file: any){\n return provenimg(file)\n }\n \n\n return {\n labelCol: { span: 4 },\n wrapperCol: { span: 14 },\n form,\n viewCover,\n previewImage,\n previewCover,\n coverChange,\n cancelCover,\n beforeCoverUpload,\n onSubmit,\n uploadpicprogress,\n uploadspic,\n uploadprogress,\n uploads,\n videofile,\n videos,\n removeFile,\n beforeUpload,\n ifalowupload,\n beforeVideoUpload,\n lan,\n beforeUploadpic,\n video,\n imgs\n };\n },\n});\n","import { render } from \"./ReleaseVideo.vue?vue&type=template&id=3f353a0a&scoped=true&bindings={}\"\nimport script from \"./ReleaseVideo.vue?vue&type=script&lang=ts\"\nexport * from \"./ReleaseVideo.vue?vue&type=script&lang=ts\"\n\nimport \"./ReleaseVideo.vue?vue&type=style&index=0&id=3f353a0a&lang=scss&scoped=true\"\nscript.render = render\nscript.__scopeId = \"data-v-3f353a0a\"\n\nexport default script","// This icon file is generated automatically.\nvar PlusOutlined = { \"icon\": { \"tag\": \"svg\", \"attrs\": { \"viewBox\": \"64 64 896 896\", \"focusable\": \"false\" }, \"children\": [{ \"tag\": \"defs\", \"attrs\": {}, \"children\": [{ \"tag\": \"style\", \"attrs\": {} }] }, { \"tag\": \"path\", \"attrs\": { \"d\": \"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z\" } }, { \"tag\": \"path\", \"attrs\": { \"d\": \"M176 474h672q8 0 8 8v60q0 8-8 8H176q-8 0-8-8v-60q0-8 8-8z\" } }] }, \"name\": \"plus\", \"theme\": \"outlined\" };\nexport default PlusOutlined;\n","import * as _vue from \"vue\";\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? Object(arguments[i]) : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n// GENERATE BY ./scripts/generate.ts\n// DON NOT EDIT IT MANUALLY\nimport PlusOutlinedSvg from \"@ant-design/icons-svg/es/asn/PlusOutlined\";\nimport AntdIcon from '../components/AntdIcon';\n\nvar PlusOutlined = function PlusOutlined(props, context) {\n var p = _objectSpread({}, props, context.attrs);\n\n return _vue.createVNode(AntdIcon, _vue.mergeProps(p, {\n \"icon\": PlusOutlinedSvg\n }), null);\n};\n\nPlusOutlined.displayName = 'PlusOutlined';\nPlusOutlined.inheritAttrs = false;\nexport default PlusOutlined;","'use strict';\nvar $ = require('../internals/export');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar toInteger = require('../internals/to-integer');\nvar toLength = require('../internals/to-length');\nvar toObject = require('../internals/to-object');\nvar arraySpeciesCreate = require('../internals/array-species-create');\nvar createProperty = require('../internals/create-property');\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\nvar arrayMethodUsesToLength = require('../internals/array-method-uses-to-length');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('splice');\nvar USES_TO_LENGTH = arrayMethodUsesToLength('splice', { ACCESSORS: true, 0: 0, 1: 2 });\n\nvar max = Math.max;\nvar min = Math.min;\nvar MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;\nvar MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded';\n\n// `Array.prototype.splice` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.splice\n// with adding support of @@species\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, {\n splice: function splice(start, deleteCount /* , ...items */) {\n var O = toObject(this);\n var len = toLength(O.length);\n var actualStart = toAbsoluteIndex(start, len);\n var argumentsLength = arguments.length;\n var insertCount, actualDeleteCount, A, k, from, to;\n if (argumentsLength === 0) {\n insertCount = actualDeleteCount = 0;\n } else if (argumentsLength === 1) {\n insertCount = 0;\n actualDeleteCount = len - actualStart;\n } else {\n insertCount = argumentsLength - 2;\n actualDeleteCount = min(max(toInteger(deleteCount), 0), len - actualStart);\n }\n if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER) {\n throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED);\n }\n A = arraySpeciesCreate(O, actualDeleteCount);\n for (k = 0; k < actualDeleteCount; k++) {\n from = actualStart + k;\n if (from in O) createProperty(A, k, O[from]);\n }\n A.length = actualDeleteCount;\n if (insertCount < actualDeleteCount) {\n for (k = actualStart; k < len - actualDeleteCount; k++) {\n from = k + actualDeleteCount;\n to = k + insertCount;\n if (from in O) O[to] = O[from];\n else delete O[to];\n }\n for (k = len; k > len - actualDeleteCount + insertCount; k--) delete O[k - 1];\n } else if (insertCount > actualDeleteCount) {\n for (k = len - actualDeleteCount; k > actualStart; k--) {\n from = k + actualDeleteCount - 1;\n to = k + insertCount - 1;\n if (from in O) O[to] = O[from];\n else delete O[to];\n }\n }\n for (k = 0; k < insertCount; k++) {\n O[k + actualStart] = arguments[k + 2];\n }\n O.length = len - actualDeleteCount + insertCount;\n return A;\n }\n});\n","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./ReleaseVideo.vue?vue&type=style&index=0&id=3f353a0a&lang=scss&scoped=true\"","'use strict';\nvar $ = require('../internals/export');\nvar isObject = require('../internals/is-object');\nvar isArray = require('../internals/is-array');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar toLength = require('../internals/to-length');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar createProperty = require('../internals/create-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\nvar arrayMethodUsesToLength = require('../internals/array-method-uses-to-length');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice');\nvar USES_TO_LENGTH = arrayMethodUsesToLength('slice', { ACCESSORS: true, 0: 0, 1: 2 });\n\nvar SPECIES = wellKnownSymbol('species');\nvar nativeSlice = [].slice;\nvar max = Math.max;\n\n// `Array.prototype.slice` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.slice\n// fallback for not array-like ES3 strings and DOM objects\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, {\n slice: function slice(start, end) {\n var O = toIndexedObject(this);\n var length = toLength(O.length);\n var k = toAbsoluteIndex(start, length);\n var fin = toAbsoluteIndex(end === undefined ? length : end, length);\n // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible\n var Constructor, result, n;\n if (isArray(O)) {\n Constructor = O.constructor;\n // cross-realm fallback\n if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) {\n Constructor = undefined;\n } else if (isObject(Constructor)) {\n Constructor = Constructor[SPECIES];\n if (Constructor === null) Constructor = undefined;\n }\n if (Constructor === Array || Constructor === undefined) {\n return nativeSlice.call(O, k, fin);\n }\n }\n result = new (Constructor === undefined ? Array : Constructor)(max(fin - k, 0));\n for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);\n result.length = n;\n return result;\n }\n});\n"],"sourceRoot":""} |