Commit dab3659b authored by salitedfish's avatar salitedfish

阶段性提交

parent 0da74866
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<!-- 右边 --> <!-- 右边 -->
<div class="right flex items-center overflow-hidden"> <div class="right flex items-center overflow-ellipsis">
<div v-if="type == 'click'" @click="eventEmit(type)"> <div v-if="type == 'click'" @click="eventEmit(type)">
<div class="flex items-center"> <div class="flex items-center">
<div class="text-sm">{{ value }}</div> <div class="text-sm">{{ value }}</div>
...@@ -34,11 +34,12 @@ ...@@ -34,11 +34,12 @@
<input <input
v-model="inputValue" v-model="inputValue"
type="text" type="text"
class="bg-transparent" class="bg-transparent text-sm"
:placeholder="placeholder" :placeholder="placeholder"
@input="cellOnChange" @input="cellOnChange"
/> />
</div> </div>
<input v-else-if="type === 'input-num'" <input v-else-if="type === 'input-num'"
:value="inputValue" :value="inputValue"
type="number" type="number"
...@@ -47,6 +48,7 @@ ...@@ -47,6 +48,7 @@
class="bg-transparent" class="bg-transparent"
:placeholder="placeholder" :placeholder="placeholder"
/> />
<div v-else-if="type === 'pick'"> <div v-else-if="type === 'pick'">
<div class="flex flex-row items-center"> <div class="flex flex-row items-center">
<div @click="eventEmit(type)"> <div @click="eventEmit(type)">
...@@ -73,6 +75,7 @@ ...@@ -73,6 +75,7 @@
</div> </div>
</div> </div>
</div> </div>
<div v-else-if="type === 'upload'" class="overflow-hidden"> <div v-else-if="type === 'upload'" class="overflow-hidden">
<div class="flex flex-row items-center overflow-hidden"> <div class="flex flex-row items-center overflow-hidden">
<div <div
...@@ -94,15 +97,17 @@ ...@@ -94,15 +97,17 @@
</div> </div>
</div> </div>
</div> </div>
<div v-else-if="type === 'showText'" class="overflow-hidden"> <div v-else-if="type === 'showText'" class="overflow-hidden">
<div class="flex flex-row items-center overflow-hidden"> <div class="flex flex-row items-center overflow-ellipsis">
<div <div
v-if="name" v-if="name"
class="overflow-hidden overflow-ellipsis" class="overflow-hidden text-xs"
id="copyNodeId" id="copyNodeId"
> >
{{ name }} {{ name }}
</div> </div>
<div ref="btn" @click="handleClickCopy(name)" class="ml-1"> <div ref="btn" @click="handleClickCopy(name)" class="ml-1">
<app-icon name="icon-fuzhi" size="18px"></app-icon> <app-icon name="icon-fuzhi" size="18px"></app-icon>
</div> </div>
......
...@@ -28,6 +28,10 @@ export class NFTService extends Service { ...@@ -28,6 +28,10 @@ export class NFTService extends Service {
path: '/oss/policy', path: '/oss/policy',
dataType: 'application/x-www-form-urlencoded', dataType: 'application/x-www-form-urlencoded',
}, },
fileUpload: {
path: '/oss/upload',
dataType: 'multipart/form-data'
},
getMd5: { path: '/nft/file/md5', dataType: 'multipart/form-data' }, getMd5: { path: '/nft/file/md5', dataType: 'multipart/form-data' },
save: { path: '/nft/save', dataType: 'multipart/form-data' }, save: { path: '/nft/save', dataType: 'multipart/form-data' },
publish: { path: '/nft/publish', dataType: 'application/json' }, publish: { path: '/nft/publish', dataType: 'application/json' },
...@@ -205,6 +209,18 @@ export class NFTService extends Service { ...@@ -205,6 +209,18 @@ export class NFTService extends Service {
}) })
} }
//普通文件上传
async fileUpload(file:File):Promise<string>{
const fd = new FormData()
fd.append('file',file)
return await this.service.post(this.router.fileUpload.path,fd,{
headers: {
Authorization: this.getAuth(),
'Content-Type': this.router.fileUpload.dataType,
}
})
}
/** /**
* 完成OSS签名 * 完成OSS签名
*/ */
......
...@@ -11,4 +11,5 @@ export interface iSaveData { ...@@ -11,4 +11,5 @@ export interface iSaveData {
isGrant?: number isGrant?: number
fileUrl?: string fileUrl?: string
fileName?: string fileName?: string
cover?: string
} }
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
:text='fromText.nameText' :text='fromText.nameText'
:validate="{ maxLen: 20 }" :validate="{ maxLen: 20 }"
:placeholder="fromText.namePlaceholder" :placeholder="fromText.namePlaceholder"
class="text-font-white my-3" class="text-font-white my-3 text-sm"
@cellOnChange="(v) => setCreateNFT({ value_name: v })" @cellOnChange="(v) => setCreateNFT({ value_name: v })"
></app-cell> ></app-cell>
<app-cell <app-cell
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
:text="fromText.authorText" :text="fromText.authorText"
:validate="{ maxLen: 20 }" :validate="{ maxLen: 20 }"
:placeholder="fromText.authorPlaceholder" :placeholder="fromText.authorPlaceholder"
class="text-font-white my-3" class="text-font-white my-3 text-sm"
@cellOnChange="(v) => setCreateNFT({ value_publisher: v })" @cellOnChange="(v) => setCreateNFT({ value_publisher: v })"
></app-cell> ></app-cell>
<app-cell <app-cell
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
<div class="step-two" v-if="currentStep == 2"> <div class="step-two" v-if="currentStep == 2">
<app-cell <app-cell
:text="fromText.fileUploadText" :text="fromText.fileUploadText"
class="text-font-white my-3" class="text-font-white my-3 text-xs"
type="upload" type="upload"
:placeholder="fromText.filePlaceholder" :placeholder="fromText.filePlaceholder"
:name="fileName" :name="fileName"
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
></app-cell> ></app-cell>
<app-cell <app-cell
text="封面上传(非必填)" text="封面上传(非必填)"
class="text-font-white my-3 " class="text-font-white my-3 text-xs"
type="upload" type="upload"
placeholder="请上传相关封面" placeholder="请上传相关封面"
:name="coverName" :name="coverName"
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
></app-cell> ></app-cell>
<app-cell <app-cell
:text="fromText.fileHashText" :text="fromText.fileHashText"
class="text-font-white my-3" class="text-font-white my-3 text-xs"
type="showText" type="showText"
:name="fileHash" :name="fileHash"
@cellOnChange="getValue" @cellOnChange="getValue"
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
labelIcon="icon-wenhao" labelIcon="icon-wenhao"
@clickIcon="alertPlatformSave" @clickIcon="alertPlatformSave"
:list="archivesList" :list="archivesList"
class="text-font-white my-3" class="text-font-white my-3 text-xs"
@cellOnChange="(v) => (createNFT.archives = v)" @cellOnChange="(v) => (createNFT.archives = v)"
></app-cell> ></app-cell>
<app-cell <app-cell
...@@ -112,7 +112,7 @@ ...@@ -112,7 +112,7 @@
labelIcon="icon-wenhao" labelIcon="icon-wenhao"
@clickIcon="alertAuthorizeRead" @clickIcon="alertAuthorizeRead"
:list="grantList" :list="grantList"
class="text-font-white my-3" class="text-font-white my-3 text-xs"
@cellOnChange="(v) => (createNFT.grant = v)" @cellOnChange="(v) => (createNFT.grant = v)"
></app-cell> ></app-cell>
<div class="fixed bottom-0 w-full left-0 flex flex-row z-30"> <div class="fixed bottom-0 w-full left-0 flex flex-row z-30">
...@@ -138,20 +138,20 @@ ...@@ -138,20 +138,20 @@
text="NFT编号" text="NFT编号"
type="showText" type="showText"
:name="publish.nftId" :name="publish.nftId"
class="text-font-white my-3 break-all" class="text-font-white my-3 text-xs"
></app-cell> ></app-cell>
<app-cell <app-cell
:text="fromText.fileHashText" :text="fromText.fileHashText"
type="showText" type="showText"
:name="publish.fileHash" :name="publish.fileHash"
class="text-font-white my-3" class="text-font-white my-3 text-xs"
@cellOnChange="getValue" @cellOnChange="getValue"
></app-cell> ></app-cell>
<app-cell <app-cell
text="发行人地址" text="发行人地址"
type="showText" type="showText"
:name="publish.wallet" :name="publish.wallet"
class="text-font-white my-3" class="text-font-white my-3 text-xs"
@cellOnChange="getValue" @cellOnChange="getValue"
></app-cell> ></app-cell>
<app-cell <app-cell
...@@ -160,7 +160,7 @@ ...@@ -160,7 +160,7 @@
:value="1" :value="1"
:disabled="true" :disabled="true"
type="input-num" type="input-num"
class="text-font-white my-3" class="text-font-white my-3 text-xs"
@cellOnChange=" @cellOnChange="
(v) => { (v) => {
publish.count = v; publish.count = v;
...@@ -344,7 +344,8 @@ export default Vue.extend({ ...@@ -344,7 +344,8 @@ export default Vue.extend({
fileName: "fileName", fileName: "fileName",
file: "file", file: "file",
pickedList: "pickedList", pickedList: "pickedList",
coverName: 'coverName' coverName: 'coverName',
coverFile: "coverFile"
}), }),
validation(): boolean { validation(): boolean {
let disabled = true; let disabled = true;
...@@ -442,15 +443,15 @@ export default Vue.extend({ ...@@ -442,15 +443,15 @@ export default Vue.extend({
this.$router.push("/Nft/create/pick"); this.$router.push("/Nft/create/pick");
}, },
async publishNft() { async publishNft() {
try { // try {
this.loading4 = true; this.loading4 = true;
const result = this.$service.nftService.publish({ const result = this.$service.nftService.publish({
fileHash: this.fileHash, fileHash: this.fileHash,
id: this.publish.id, id: this.publish.id,
wallet: this.publish.wallet, wallet: this.publish.wallet,
nftId: this.publish.nftId, nftId: this.publish.nftId,
}); });
// const result = this.$service.nftService.publish();
result result
.then((ret: any) => { .then((ret: any) => {
this.success = ret === true; this.success = ret === true;
...@@ -463,20 +464,22 @@ export default Vue.extend({ ...@@ -463,20 +464,22 @@ export default Vue.extend({
this.success = false; this.success = false;
this.errorMsg = err; this.errorMsg = err;
}); });
} catch (err) { // } catch (err) {
console.log(err); // console.log(err);
} // }
}, },
async uploadFileToOss(file: File): Promise<string> { async uploadFileToOss(file: File): Promise<string> {
const ossRet = (await this.$service.nftService.ossPolicy()) as any; const ossRet = (await this.$service.nftService.ossPolicy()) as any;
await this.$service.nftService.uploadFileToOss(file, ossRet); await this.$service.nftService.uploadFileToOss(file, ossRet);
const { dir, host } = ossRet; const { dir, host } = ossRet;
return `${host}/${dir}${file.name}`; return `${host}/${dir}${file.name}`;
}, },
async encryptAndPushToChain() { async encryptAndPushToChain() {
this.loading2 = true; this.loading2 = true;
let mistake = false; // let mistake = false;
try { // try {
let data = { let data = {
author: this.createNFT.value_publisher, author: this.createNFT.value_publisher,
categoryId: parseInt(this.categoryId) , categoryId: parseInt(this.categoryId) ,
...@@ -492,6 +495,7 @@ export default Vue.extend({ ...@@ -492,6 +495,7 @@ export default Vue.extend({
isArchives: this.createNFT.archives, isArchives: this.createNFT.archives,
}; };
} else if (this.createNFT.archives === 1) { } else if (this.createNFT.archives === 1) {
//需要加密存档
const fileUrl = await this.uploadFileToOss(this.file); const fileUrl = await this.uploadFileToOss(this.file);
data = { data = {
...data, ...data,
...@@ -502,29 +506,46 @@ export default Vue.extend({ ...@@ -502,29 +506,46 @@ export default Vue.extend({
isGrant: this.createNFT.grant, isGrant: this.createNFT.grant,
}; };
} }
if(this.coverFile){
const coverImgUrl = await this.$service.nftService.fileUpload(this.coverFile)
data = {
...data,
cover: coverImgUrl
}
}
const { id, nftId, wallet, fileHash } = const { id, nftId, wallet, fileHash } =
await this.$service.nftService.save(data); await this.$service.nftService.save(data);
this.publish.fileHash = fileHash; this.publish.fileHash = fileHash;
this.publish.nftId = nftId; this.publish.nftId = nftId;
this.publish.id = id; this.publish.id = id;
this.publish.wallet = wallet; this.publish.wallet = wallet;
} catch (err) {
mistake = true;
} // } catch (err) {
// mistake = true;
// }
this.loading2 = false; this.loading2 = false;
if (mistake) return; // if (mistake) return ;
}, },
async currentStepChange(val: number) { async currentStepChange(val: number) {
if (this.currentStep === 2 && val === 1) { try{
await this.encryptAndPushToChain(); if (this.currentStep === 2 && val === 1) {
} else if (this.currentStep === 3 && val === 1) { await this.encryptAndPushToChain();
await this.publishNft(); } else if (this.currentStep === 3 && val === 1) {
await this.publishNft();
}
}catch(err){
this.loading2 = false
return
} }
if (this.currentStep < this.mySteps.length + 1) { if (this.currentStep < this.mySteps.length + 1) {
this.currentStep += val; this.currentStep += val;
} }
}, },
clickRepublish() { clickRepublish() {
this.currentStep = 1; this.currentStep = 1;
}, },
......
<template> <template>
<Layout-Child class="page-scroll text-center"> <Layout-Child class="page-scroll text-center">
<div class="text-font-white mt-20 text-center mb-20">{{uploadAccept.acceptTitle}}</div> <div class="text-font-white mt-20 text-center mb-6">{{uploadAccept.acceptTitle}}</div>
<input type="file" id="upload" class="hidden" @change="handleFileChange('inputFile')" ref="inputFile" :accept="uploadAccept.acceptType"/> <input type="file" class="upload hidden" @change="handleFileChange('inputFile')" ref="inputFile" :accept="uploadAccept.acceptType"/>
<input type="file" id="upload" accept="image/*" class=" hidden" ref='localImgElem' @change="handleFileChange('localImgElem')"/> <input type="file" accept="image/*" class="upload hidden" ref='localImgElem' @change="handleFileChange('localImgElem')"/>
<input type="file" id="upload" accept="image/*" capture="camera" class=" hidden" ref='cameraElem' @change="handleFileChange('cameraElem')"/> <input type="file" accept="image/*" capture="camera" class="upload hidden" ref='cameraElem' @change="handleFileChange('cameraElem')"/>
<van-action-sheet v-model="show" :actions="actions" @select="onSelect" /> <van-action-sheet v-model="show" :actions="actions" @select="onSelect" />
<label @click="initUpload" class="inline-block"> <div
<div ref="uploadBox"
ref="uploadBox" class="
class=" upload-box
upload-box text-center
text-center text-font-white
flex "
items-center :class="{hiddenBorder:((uploadType == '封面图片' && coverName) || (uploadType == '图片' && fileName))}"
justify-center >
text-font-white <img
" @click="initUpload"
> v-if="uploadNull "
src="@/assets/icons/upload.png"
alt=""
class="mx-auto mt-28"
/>
<Loading type="spiner mt-16" v-else-if="uploadLoading" />
<!-- 当上传的是图片或封面图片 -->
<div v-else-if="showImgUploadImg" class="img-box">
<img <img
v-if="showNotUploadImg "
src="@/assets/icons/upload.png"
alt=""
class="mx-auto"
/>
<img
v-else-if="showImgUploadImg"
:src="showUploadFile" :src="showUploadFile"
alt="" alt=""
class="mx-auto" class="mx-auto"
@click="showFullImg"
/> />
<img
v-else-if="status === uploadStatus.success && uploadType !== '图片' && uploadType !== '封面图片'"
src="@/assets/icons/upload.png"
alt=""
class="mx-auto"
/>
<Loading type="spiner" v-else-if="status === uploadStatus.uploading || coverstatus === uploadStatus.uploading" />
<div v-else-if="status === uploadStatus.failed || coverstatus === uploadStatus.uploading">上传失败</div>
</div> </div>
</label>
<div class="text-center text-font-white"> <!-- 当上传的不是图片或封面图片 -->
<div v-if="(uploadType == '封面图片' && !coverName) || (uploadType !== '封面图片' && !fileName)" class="mt-2">{{uploadAccept.acceptText}}</div> <img
<div v-else class="mt-2"> v-else-if="status === uploadStatus.success && uploadType !== '图片' && uploadType !== '封面图片'"
src="@/assets/img/file.png"
alt=""
class="mx-auto mt-16"
/>
<div v-else-if="uploadFailed">上传失败</div>
<div v-if="!(uploadType == '封面图片' && !coverName) || (uploadType !== '封面图片' && !fileName)" class=" w-40 mx-auto mt-2 text-xs">
{{ (uploadType == '封面图片' && coverName)?coverName:fileName }} {{ (uploadType == '封面图片' && coverName)?coverName:fileName }}
</div> </div>
<!-- <div v-if="uploadType == '封面图片' && coverName" class="mt-2"> <div v-if="uploadNull" class="mt-2 text-center mx-auto w-40" style="color: #0076ff" @click="initUpload">
{{ coverName }} {{uploadType=='封面图片'?"上传封面":'上传附件'}}
</div> </div>
<div v-else-if="uploadType !== '封面图片' && fileName" class="mt-2"> <div v-if="showReUpload" class="mt-2 flex mx-auto w-40 justify-between" style="color: #0076ff">
{{ fileName }} <div @click="clearUpload">
</div> --> 删除上传
</div>
<label for="upload" class="mt-2"> <div @click="initUpload">
<div
v-if="showReUpload"
style="color: #0076ff"
class="inline-block"
>
重新上传 重新上传
</div> </div>
</label> </div>
</div> </div>
<div class="mt-2 mx-auto w-56 text-center text-font-white text-xs">{{uploadAccept.acceptText}}</div>
<div class="flex justify-between fixed bottom-0 left-0 right-0"> <div class="flex justify-between fixed bottom-0 left-0 right-0">
<app-btn <app-btn
...@@ -141,11 +134,11 @@ export default Vue.extend({ ...@@ -141,11 +134,11 @@ export default Vue.extend({
case '剧本': case '剧本':
return {acceptTitle:'请上传剧本附件',acceptType:'application/pdf,application/msword,text/plain',acceptText:'支持扩展名格式PDF'} return {acceptTitle:'请上传剧本附件',acceptType:'application/pdf,application/msword,text/plain',acceptText:'支持扩展名格式PDF'}
case '视频': case '视频':
return {acceptTitle:'请上传视频附件',acceptType:'video/*',acceptText:'上传视频仅支持MOV、MP4格式文件,大小限制为100M以内'} return {acceptTitle:'请上传视频附件',acceptType:'video/*',acceptText:'上传视频仅支持MOV、MP4格式文件,大小限制为500M以内'}
case '电影': case '电影':
return {acceptTitle:'请上传电影附件',acceptType:'video/*',acceptText:'上传视频仅支持MOV、MP4格式文件,大小限制为100M以内'} return {acceptTitle:'请上传电影附件',acceptType:'video/*',acceptText:'上传电影仅支持MOV、MP4格式文件,大小限制为1G以内'}
case '音频': case '音频':
return {acceptTitle:'请上传音频附件',acceptType:"audio/*",acceptText:'上传音频仅支持MP3格式文件'} return {acceptTitle:'请上传音频附件',acceptType:"audio/*",acceptText:'上传音频仅支持MP3格式文件,大小限制为100M以内'}
case '图片': case '图片':
return {acceptTitle:'请上传图片附件',acceptType:'image/*',acceptText:'仅支持png、jpg图片'} return {acceptTitle:'请上传图片附件',acceptType:'image/*',acceptText:'仅支持png、jpg图片'}
case '封面图片': case '封面图片':
...@@ -163,14 +156,23 @@ export default Vue.extend({ ...@@ -163,14 +156,23 @@ export default Vue.extend({
return '' return ''
} }
}, },
showNotUploadImg():boolean{
return (this.uploadType !== '封面图片' && this.status === uploadStatus.NULL) || (this.uploadType == '封面图片' && this.coverstatus === uploadStatus.NULL)
},
showImgUploadImg():boolean{ showImgUploadImg():boolean{
return (this.status === uploadStatus.success && this.uploadType == '图片') || (this.coverstatus === uploadStatus.success && this.uploadType == '封面图片') return (this.status === uploadStatus.success && this.uploadType == '图片') || (this.coverstatus === uploadStatus.success && this.uploadType == '封面图片')
}, },
uploadNull():boolean{
return ((this.uploadType !== '封面图片' && this.status === uploadStatus.NULL)||(this.uploadType == '封面图片' && this.coverstatus === uploadStatus.NULL))
},
uploadLoading():boolean{
return ((this.uploadType !== '封面图片' && this.status === uploadStatus.uploading)||(this.uploadType == '封面图片' && this.coverstatus === uploadStatus.uploading))
},
uploadSuccess():boolean{
return ((this.uploadType !== '封面图片' && this.status === uploadStatus.success)||(this.uploadType == '封面图片' && this.coverstatus === uploadStatus.success))
},
showReUpload():boolean{ showReUpload():boolean{
return ((this.uploadType !== '封面图片') && (this.status === uploadStatus.failed || this.status === uploadStatus.success))||((this.uploadType == '封面图片') && (this.coverstatus === uploadStatus.failed || this.coverstatus === uploadStatus.success)) return ((this.uploadType !== '封面图片') && (this.status === uploadStatus.failed || this.status === uploadStatus.success))||((this.uploadType == '封面图片') && (this.coverstatus === uploadStatus.failed || this.coverstatus === uploadStatus.success))
},
uploadFailed():boolean {
return ((this.uploadType !== '封面图片' && this.status === uploadStatus.failed)||(this.uploadType == '封面图片' && this.coverstatus === uploadStatus.failed))
} }
}, },
methods: { methods: {
...@@ -199,6 +201,7 @@ export default Vue.extend({ ...@@ -199,6 +201,7 @@ export default Vue.extend({
const ele = this.$refs[ref] as HTMLInputElement; const ele = this.$refs[ref] as HTMLInputElement;
const files = ele.files; const files = ele.files;
if (files && files.length >= 1) { if (files && files.length >= 1) {
this[this.uploadType == '封面图片'? 'coverstatus':'status'] = uploadStatus.uploading;
this.afterRead(files[0]); this.afterRead(files[0]);
} }
}, },
...@@ -210,38 +213,47 @@ export default Vue.extend({ ...@@ -210,38 +213,47 @@ export default Vue.extend({
const ab = await file.arrayBuffer(); const ab = await file.arrayBuffer();
const fileMd5 = md5(Buffer.from(ab)); const fileMd5 = md5(Buffer.from(ab));
// const ossRet = await this.$service.nftService.ossPolicy();
// const uploadRet = await this.$service.nftService.uploadFileToOss(
// file,
// ossRet
// );
if(this.uploadType == '封面图片') { if(this.uploadType == '封面图片') {
this.coverstatus = uploadStatus.uploading;
this.setState({ this.setState({
coverName: file.name, coverName: file.name,
coverFile: file, coverFile: file,
}); });
this.coverstatus = uploadStatus.success;
}else { }else {
this.status = uploadStatus.uploading;
this.setState({ this.setState({
fileName: file.name, fileName: file.name,
fileHash: fileMd5, fileHash: fileMd5,
file: file, file: file,
}); });
this.status = uploadStatus.success;
} }
this[this.uploadType == '封面图片'? 'coverstatus':'status'] = uploadStatus.success;
} catch (err) { } catch (err) {
console.log(err, "show err"); this[this.uploadType == '封面图片'? 'coverstatus':'status'] = uploadStatus.failed;
if(this.uploadType == '封面图片') {
this.coverstatus = uploadStatus.failed;
}else {
this.status = uploadStatus.failed;
}
} }
}, },
showFullImg(){
console.log('图片预览')
},
clearUpload(){
if(this.uploadType == '封面图片'){
this.setState({
coverName: '',
coverFile: undefined,
});
this.coverstatus = uploadStatus.NULL
}else {
this.setState({
fileName: '',
fileHash: '',
file: undefined,
});
this.status = uploadStatus.NULL
}
for(let item of document.getElementsByClassName('upload')){
(item as any).value = ''
}
},
afterRead2(file: any) { afterRead2(file: any) {
file.status = "uploading"; file.status = "uploading";
file.message = "上传中..."; file.message = "上传中...";
...@@ -255,12 +267,22 @@ export default Vue.extend({ ...@@ -255,12 +267,22 @@ export default Vue.extend({
}); });
</script> </script>
<style scoped> <style scoped lang="less">
.upload-box { .upload-box {
width: 140px; width: 200px;
height: 71px; height: 280px;
margin: 0 auto;
background: #1d2649; background: #1d2649;
border-radius: 15px; border-radius: 15px;
border: 1px solid #0078ff; border: 1px solid #0078ff;
padding-top: 1px;
.img-box {
height: 200px;
display: flex;
align-items: center;
}
}
.hiddenBorder {
border: none;
} }
</style> </style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment