-
Notifications
You must be signed in to change notification settings - Fork 11
/
chunk-GEXEQO5D.js
21 lines (21 loc) · 70 KB
/
chunk-GEXEQO5D.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import{a as x,b as S}from"./chunk-2LBKIA5W.js";import"./chunk-U6B6NZRZ.js";import{f as ye,g as De}from"./chunk-KLID2YEL.js";import"./chunk-XBFW6RIC.js";import{d as L}from"./chunk-V6MBOLWS.js";import"./chunk-4F3F27BT.js";import"./chunk-7EEEUGJK.js";import{a as h,b,d as g}from"./chunk-HVFPNQ3B.js";import{a as C}from"./chunk-6AJOFIIP.js";import"./chunk-3LAVY7RV.js";import{a as k,g as X,h as Y,j as K}from"./chunk-Q4ISATUO.js";import"./chunk-JXWNPNAC.js";import{Ca as E,Ea as f,Hc as V,Ic as Q,Lc as J,c as be,e as ve,ec as q,f as Z}from"./chunk-YWVGY2C2.js";import{Aa as c,Ac as j,Ba as pe,Bc as G,Ca as se,Cc as W,E as fe,Gc as Fe,Hc as e,Ib as z,Jc as he,Mc as B,Nc as A,Oc as U,Pb as P,Qc as ge,Wb as d,_c as Ce,c as M,dc as xe,ic as t,jc as n,kc as m,mb as R,oc as Se,rb as r,rc as F,s as Ee,sb as w,tc as O,za as s}from"./chunk-GBKJFEQZ.js";import{f as ze}from"./chunk-EQDQRRRY.js";function Ae(a,_){if(a&1&&(m(0,"span",2),t(1,"div",3),e(2,"Upload"),n()),a&2){let o=O();d("nzType",o.loading?"loading":"plus")}}function Ue(a,_){if(a&1&&m(0,"img",1),a&2){let o=O();d("src",o.avatarUrl,R)}}var $=(()=>{class a{constructor(o){this.messageService=o,this.loading=!1,this.beforeUpload=(i,l)=>new M(p=>{let u=i.type==="image/jpeg"||i.type==="image/png";if(!u){this.messageService.error("You can only upload JPG file!"),p.complete();return}let D=i.size/1024/1024<2;if(!D){this.messageService.error("Image must smaller than 2MB!"),p.complete();return}p.next(u&&D),p.complete()})}getBase64(o,i){let l=new FileReader;l.addEventListener("load",()=>i(l.result.toString())),l.readAsDataURL(o)}handleChange(o){switch(o.file.status){case"uploading":this.loading=!0;break;case"done":this.getBase64(o.file.originFileObj,i=>{this.loading=!1,this.avatarUrl=i});break;case"error":this.messageService.error("Network error"),this.loading=!1;break}}static{this.\u0275fac=function(i){return new(i||a)(w(L))}}static{this.\u0275cmp=z({type:a,selectors:[["nz-demo-upload-avatar"]],decls:3,vars:3,consts:[["nzAction","https://www.mocky.io/v2/5cc8019d300000980a055e76","nzName","avatar","nzListType","picture-card",1,"avatar-uploader",3,"nzChange","nzShowUploadList","nzBeforeUpload"],[2,"width","100%",3,"src"],["nz-icon","",1,"upload-icon",3,"nzType"],[1,"ant-upload-text"]],template:function(i,l){i&1&&(t(0,"nz-upload",0),F("nzChange",function(u){return l.handleChange(u)}),P(1,Ae,3,1)(2,Ue,1,1,"img",1),n()),i&2&&(d("nzShowUploadList",!1)("nzBeforeUpload",l.beforeUpload),r(),xe(l.avatarUrl?2:1))},dependencies:[f,E,S,x],styles:["[_nghost-%COMP%] .avatar-uploader>.ant-upload{width:128px;height:128px}"]})}}return a})();var Ie=()=>({authorization:"authorization-text"}),ee=(()=>{class a{constructor(o){this.messageService=o}handleChange(o){o.file.status!=="uploading"&&console.log(o.file,o.fileList),o.file.status==="done"?this.messageService.success(`${o.file.name} file uploaded successfully`):o.file.status==="error"&&this.messageService.error(`${o.file.name} file upload failed.`)}static{this.\u0275fac=function(i){return new(i||a)(w(L))}}static{this.\u0275cmp=z({type:a,selectors:[["nz-demo-upload-basic"]],decls:4,vars:2,consts:[["nzAction","https://www.mocky.io/v2/5cc8019d300000980a055e76",3,"nzChange","nzHeaders"],["nz-button",""],["nzType","upload"]],template:function(i,l){i&1&&(t(0,"nz-upload",0),F("nzChange",function(u){return l.handleChange(u)}),t(1,"button",1),m(2,"nz-icon",2),e(3," Click to Upload "),n()()),i&2&&d("nzHeaders",ge(1,Ie))},dependencies:[g,b,h,C,f,E,S,x],encapsulation:2})}}return a})();var te=(()=>{class a{constructor(){this.fileList=[{uid:"1",name:"xxx.png",status:"done",response:"Server Error 500",url:"http://www.baidu.com/xxx.png"},{uid:"2",name:"yyy.png",status:"done",url:"http://www.baidu.com/yyy.png"},{uid:"3",name:"zzz.png",status:"error",response:"Server Error 500",url:"http://www.baidu.com/zzz.png"}]}static{this.\u0275fac=function(i){return new(i||a)}}static{this.\u0275cmp=z({type:a,selectors:[["nz-demo-upload-default-file-list"]],decls:4,vars:1,consts:[["nzAction","https://www.mocky.io/v2/5cc8019d300000980a055e76",3,"nzFileList"],["nz-button",""],["nzType","upload"]],template:function(i,l){i&1&&(t(0,"nz-upload",0)(1,"button",1),m(2,"nz-icon",2),e(3," Upload "),n()()),i&2&&d("nzFileList",l.fileList)},dependencies:[g,b,h,C,f,E,S,x],encapsulation:2})}}return a})();var ne=(()=>{class a{static{this.\u0275fac=function(i){return new(i||a)}}static{this.\u0275cmp=z({type:a,selectors:[["nz-demo-upload-directory"]],decls:4,vars:0,consts:[["nzAction","https://www.mocky.io/v2/5cc8019d300000980a055e76","nzDirectory",""],["nz-button",""],["nzType","upload"]],template:function(i,l){i&1&&(t(0,"nz-upload",0)(1,"button",1),m(2,"nz-icon",2),e(3," Upload Directory "),n()())},dependencies:[g,b,h,C,f,E,S,x],encapsulation:2})}}return a})();var ie=(()=>{class a{constructor(o){this.messageService=o}handleChange({file:o,fileList:i}){let l=o.status;l!=="uploading"&&console.log(o,i),l==="done"?this.messageService.success(`${o.name} file uploaded successfully.`):l==="error"&&this.messageService.error(`${o.name} file upload failed.`)}static{this.\u0275fac=function(i){return new(i||a)(w(L))}}static{this.\u0275cmp=z({type:a,selectors:[["nz-demo-upload-drag"]],decls:7,vars:1,consts:[["nzType","drag","nzAction","https://www.mocky.io/v2/5cc8019d300000980a055e76",3,"nzChange","nzMultiple"],[1,"ant-upload-drag-icon"],["nzType","inbox"],[1,"ant-upload-text"],[1,"ant-upload-hint"]],template:function(i,l){i&1&&(t(0,"nz-upload",0),F("nzChange",function(u){return l.handleChange(u)}),t(1,"p",1),m(2,"nz-icon",2),n(),t(3,"p",3),e(4,"Click or drag file to this area to upload"),n(),t(5,"p",4),e(6," Support for a single or bulk upload. Strictly prohibit from uploading company data or other band files "),n()()),i&2&&d("nzMultiple",!0)},dependencies:[g,h,f,E,S,x],encapsulation:2})}}return a})();var oe=(()=>{class a{constructor(){this.fileList=[{uid:"-1",name:"xxx.png",status:"done",url:"http://www.baidu.com/xxx.png"}]}handleChange(o){let i=[...o.fileList];i=i.slice(-2),i=i.map(l=>(l.response&&(l.url=l.response.url),l)),this.fileList=i}static{this.\u0275fac=function(i){return new(i||a)}}static{this.\u0275cmp=z({type:a,selectors:[["nz-demo-upload-file-list"]],decls:4,vars:1,consts:[["nzAction","https://www.mocky.io/v2/5cc8019d300000980a055e76",3,"nzChange","nzFileList"],["nz-button",""],["nzType","upload"]],template:function(i,l){i&1&&(t(0,"nz-upload",0),F("nzChange",function(u){return l.handleChange(u)}),t(1,"button",1),m(2,"nz-icon",2),e(3," Upload "),n()()),i&2&&d("nzFileList",l.fileList)},dependencies:[g,b,h,C,f,E,S,x],encapsulation:2})}}return a})();function ke(a,_){if(a&1&&m(0,"img",5),a&2){let o=O();d("src",o.previewImage,R)}}var Le=a=>new Promise((_,o)=>{let i=new FileReader;i.readAsDataURL(a),i.onload=()=>_(i.result),i.onerror=l=>o(l)}),le=(()=>{class a{constructor(){this.fileList=[{uid:"-1",name:"image.png",status:"done",url:"https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png"},{uid:"-2",name:"image.png",status:"done",url:"https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png"},{uid:"-3",name:"image.png",status:"done",url:"https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png"},{uid:"-4",name:"image.png",status:"done",url:"https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png"},{uid:"-xxx",percent:50,name:"image.png",status:"uploading",url:"https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png"},{uid:"-5",name:"image.png",status:"error"}],this.previewImage="",this.previewVisible=!1,this.handlePreview=o=>ze(this,null,function*(){!o.url&&!o.preview&&(o.preview=yield Le(o.originFileObj)),this.previewImage=o.url||o.preview,this.previewVisible=!0})}static{this.\u0275fac=function(i){return new(i||a)}}static{this.\u0275cmp=z({type:a,selectors:[["nz-demo-upload-picture-card"]],decls:8,vars:6,consts:[["modalContent",""],["nzAction","https://www.mocky.io/v2/5cc8019d300000980a055e76","nzListType","picture-card",3,"nzFileListChange","nzFileList","nzShowButton","nzPreview"],["nzType","plus"],[2,"margin-top","8px"],[3,"nzOnCancel","nzVisible","nzContent","nzFooter"],[2,"width","100%",3,"src"]],template:function(i,l){if(i&1){let p=Se();t(0,"nz-upload",1),U("nzFileListChange",function(D){return pe(p),A(l.fileList,D)||(l.fileList=D),se(D)}),t(1,"div"),m(2,"nz-icon",2),t(3,"div",3),e(4,"Upload"),n()()(),t(5,"nz-modal",4),F("nzOnCancel",function(){return pe(p),se(l.previewVisible=!1)}),P(6,ke,1,1,"ng-template",null,0,Ce),n()}if(i&2){let p=Fe(7);B("nzFileList",l.fileList),d("nzShowButton",l.fileList.length<8)("nzPreview",l.handlePreview),r(5),d("nzVisible",l.previewVisible)("nzContent",p)("nzFooter",null)}},dependencies:[f,E,De,ye,S,x],encapsulation:2})}}return a})();var ae=(()=>{class a{constructor(){this.defaultFileList=[{uid:"-1",name:"xxx.png",status:"done",url:"https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png",thumbUrl:"https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png"},{uid:"-2",name:"yyy.png",status:"error"}],this.fileList1=[...this.defaultFileList],this.fileList2=[...this.defaultFileList]}static{this.\u0275fac=function(i){return new(i||a)}}static{this.\u0275cmp=z({type:a,selectors:[["nz-demo-upload-picture-style"]],decls:11,vars:2,consts:[["nzAction","https://www.mocky.io/v2/5cc8019d300000980a055e76","nzListType","picture",3,"nzFileListChange","nzFileList"],["nz-button",""],["nzType","upload"],["nzAction","https://www.mocky.io/v2/5cc8019d300000980a055e76","nzListType","picture",1,"upload-list-inline",3,"nzFileListChange","nzFileList"]],template:function(i,l){i&1&&(t(0,"nz-upload",0),U("nzFileListChange",function(u){return A(l.fileList1,u)||(l.fileList1=u),u}),t(1,"button",1),m(2,"nz-icon",2),e(3," Upload "),n()(),m(4,"br")(5,"br"),t(6,"nz-upload",3),U("nzFileListChange",function(u){return A(l.fileList2,u)||(l.fileList2=u),u}),t(7,"button",1)(8,"span"),m(9,"nz-icon",2),e(10," Upload "),n()()()),i&2&&(B("nzFileList",l.fileList1),r(6),B("nzFileList",l.fileList2))},dependencies:[g,b,h,C,f,E,S,x],styles:["[_nghost-%COMP%] .upload-list-inline .ant-upload-list-item{float:left;width:200px;margin-right:8px}[_nghost-%COMP%] .upload-list-inline [class*=-upload-list-rtl] .ant-upload-list-item{float:right}[_nghost-%COMP%] .upload-list-inline .ant-upload-animate-enter{animation-name:uploadAnimateInlineIn}[_nghost-%COMP%] .upload-list-inline .ant-upload-animate-leave{animation-name:uploadAnimateInlineOut}"]})}}return a})();var de=(()=>{class a{constructor(o){this.http=o,this.previewFile=i=>(console.log("Your upload file:",i),this.http.post("https://next.json-generator.com/api/json/get/4ytyBoLK8",{body:i}).pipe(Ee(l=>l.thumbnail)))}static{this.\u0275fac=function(i){return new(i||a)(w(Z))}}static{this.\u0275cmp=z({type:a,selectors:[["nz-demo-upload-preview-file"]],decls:4,vars:1,consts:[["nzAction","https://www.mocky.io/v2/5cc8019d300000980a055e76","nzListType","picture",3,"nzPreviewFile"],["nz-button",""],["nzType","upload"]],template:function(i,l){i&1&&(t(0,"nz-upload",0)(1,"button",1),m(2,"nz-icon",2),e(3," Upload "),n()()),i&2&&d("nzPreviewFile",l.previewFile)},dependencies:[g,b,h,C,f,E,S,x],encapsulation:2})}}return a})();var me=(()=>{class a{constructor(){this.transformFile=o=>new M(i=>{let l=new FileReader;l.readAsDataURL(o),l.onload=()=>{let p=document.createElement("canvas"),u=document.createElement("img");u.src=l.result,u.onload=()=>{let D=p.getContext("2d");D.drawImage(u,0,0),D.fillStyle="red",D.textBaseline="middle",D.fillText("Ant Design",20,20),p.toBlob(Be=>{i.next(Be),i.complete()})}}})}static{this.\u0275fac=function(i){return new(i||a)}}static{this.\u0275cmp=z({type:a,selectors:[["nz-demo-upload-transform-file"]],decls:4,vars:1,consts:[["nzAction","https://www.mocky.io/v2/5cc8019d300000980a055e76",3,"nzTransformFile"],["nz-button",""],["nzType","upload"]],template:function(i,l){i&1&&(t(0,"nz-upload",0)(1,"button",1),m(2,"nz-icon",2),e(3," Upload "),n()()),i&2&&d("nzTransformFile",l.transformFile)},dependencies:[g,b,h,C,f,E,S,x],encapsulation:2})}}return a})();var re=(()=>{class a{constructor(o,i){this.http=o,this.messageService=i,this.uploading=!1,this.fileList=[],this.beforeUpload=l=>(this.fileList=this.fileList.concat(l),!1)}handleUpload(){let o=new FormData;this.fileList.forEach(l=>{o.append("files[]",l)}),this.uploading=!0;let i=new be("POST","https://www.mocky.io/v2/5cc8019d300000980a055e76",o,{});this.http.request(i).pipe(fe(l=>l instanceof ve)).subscribe({next:()=>{this.uploading=!1,this.fileList=[],this.messageService.success("upload successfully.")},error:()=>{this.uploading=!1,this.messageService.error("upload failed.")}})}static{this.\u0275fac=function(i){return new(i||a)(w(Z),w(L))}}static{this.\u0275cmp=z({type:a,selectors:[["nz-demo-upload-upload-manually"]],decls:8,vars:5,consts:[[3,"nzFileListChange","nzFileList","nzBeforeUpload"],["nz-button",""],["nzType","upload"],["nz-button","","nzType","primary",3,"click","nzLoading","disabled"]],template:function(i,l){i&1&&(t(0,"nz-upload",0),U("nzFileListChange",function(u){return A(l.fileList,u)||(l.fileList=u),u}),t(1,"button",1),m(2,"nz-icon",2),e(3," Select File "),n()(),m(4,"br")(5,"br"),t(6,"button",3),F("click",function(){return l.handleUpload()}),e(7),n()),i&2&&(B("nzFileList",l.fileList),d("nzBeforeUpload",l.beforeUpload),r(6),d("nzLoading",l.uploading)("disabled",l.fileList.length===0),r(),he(" ",l.uploading?"Uploading":"Start Upload"," "))},dependencies:[g,b,h,C,f,E,S,x],encapsulation:2})}}return a})();var ue=(()=>{class a{constructor(){this.files=[],this.mockOSSData={dir:"user-dir/",expire:"1577811661",host:"//www.mocky.io/v2/5cc8019d300000980a055e76",accessId:"c2hhb2RhaG9uZw==",policy:"eGl4aWhhaGFrdWt1ZGFkYQ==",signature:"ZGFob25nc2hhbw=="},this.transformFile=o=>{let i=o.name.slice(o.name.lastIndexOf(".")),l=Date.now()+i;return o.url=this.mockOSSData.dir+l,o},this.getExtraData=o=>{let{accessId:i,policy:l,signature:p}=this.mockOSSData;return{key:o.url,OSSAccessKeyId:i,policy:l,Signature:p}}}onChange(o){console.log("Aliyun OSS:",o.fileList)}static{this.\u0275fac=function(i){return new(i||a)}}static{this.\u0275cmp=z({type:a,selectors:[["nz-demo-upload-upload-with-aliyun-oss"]],decls:5,vars:4,consts:[["nzName","file",3,"nzFileListChange","nzChange","nzFileList","nzTransformFile","nzData","nzAction"],["nz-button",""],["nzType","upload"]],template:function(i,l){i&1&&(t(0,"nz-upload",0),U("nzFileListChange",function(u){return A(l.files,u)||(l.files=u),u}),F("nzChange",function(u){return l.onChange(u)}),e(1," Photos: "),t(2,"button",1),m(3,"nz-icon",2),e(4," Click to Upload "),n()()),i&2&&(B("nzFileList",l.files),d("nzTransformFile",l.transformFile)("nzData",l.getExtraData)("nzAction",l.mockOSSData.host))},dependencies:[g,b,h,C,f,E,S,x],encapsulation:2})}}return a})();var we=(()=>{class a{constructor(){this.expanded=!1}goLink(o){window&&(window.location.hash=o)}expandAllCode(){this.expanded=!this.expanded,this.codeBoxes.forEach(o=>o.expandCode(this.expanded))}static{this.\u0275fac=function(i){return new(i||a)}}static{this.\u0275cmp=z({type:a,selectors:[["nz-demo-upload"]],viewQuery:function(i,l){if(i&1&&j(k,5),i&2){let p;G(p=W())&&(l.codeBoxes=p)}},decls:778,vars:55,consts:[[1,"toc-affix",3,"nzOffsetTop"],["nzShowInkInFixed","",3,"nzClick","nzAffix"],["nzHref","#components-upload-demo-basic","nzTitle","\u70B9\u51FB\u4E0A\u4F20"],["nzHref","#components-upload-demo-avatar","nzTitle","\u7528\u6237\u5934\u50CF"],["nzHref","#components-upload-demo-default-file-list","nzTitle","\u5DF2\u4E0A\u4F20\u7684\u6587\u4EF6\u5217\u8868"],["nzHref","#components-upload-demo-picture-card","nzTitle","\u7167\u7247\u5899"],["nzHref","#components-upload-demo-file-list","nzTitle","\u5B8C\u5168\u63A7\u5236\u7684\u4E0A\u4F20\u5217\u8868"],["nzHref","#components-upload-demo-drag","nzTitle","\u62D6\u62FD\u4E0A\u4F20"],["nzHref","#components-upload-demo-directory","nzTitle","\u6587\u4EF6\u5939\u4E0A\u4F20"],["nzHref","#components-upload-demo-upload-manually","nzTitle","\u624B\u52A8\u4E0A\u4F20"],["nzHref","#components-upload-demo-picture-style","nzTitle","\u56FE\u7247\u5217\u8868\u6837\u5F0F"],["nzHref","#components-upload-demo-preview-file","nzTitle","\u81EA\u5B9A\u4E49\u9884\u89C8"],["nzHref","#components-upload-demo-transform-file","nzTitle","\u4E0A\u4F20\u524D\u8F6C\u6362\u6587\u4EF6"],["nzHref","#components-upload-demo-upload-with-aliyun-oss","nzTitle","\u963F\u91CC\u4E91 OSS"],["nzHref","#api","nzTitle","API"],[1,"markdown"],[1,"subtitle"],[1,"widget"],["aria-label","Edit this page on Github","href","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/upload/doc/index.zh-CN.md","target","_blank","rel","noopener noreferrer",1,"edit-button"],["nzType","edit"],["id","\u4F55\u65F6\u4F7F\u7528"],["onclick","window.location.hash = '\u4F55\u65F6\u4F7F\u7528'",1,"anchor"],[1,"language-ts"],[1,"token","keyword"],[1,"token","punctuation"],[1,"token","string"],["nz-icon","","nzType","appstore","nz-tooltip","","nzTooltipTitle","\u5C55\u5F00\u5168\u90E8\u4EE3\u7801",1,"code-box-expand-trigger",3,"click"],["nz-row","",3,"nzGutter"],["nz-col","",3,"nzXl","nzSpan"],["nzTitle","\u70B9\u51FB\u4E0A\u4F20","nzSelector","nz-demo-upload-basic","nzGenerateCommand","ng g ng-zorro-antd:upload-basic <name>","nzComponentName","NzDemoUploadBasicComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["demo",""],["intro",""],["nzTitle","\u5DF2\u4E0A\u4F20\u7684\u6587\u4EF6\u5217\u8868","nzSelector","nz-demo-upload-default-file-list","nzGenerateCommand","ng g ng-zorro-antd:upload-default-file-list <name>","nzComponentName","NzDemoUploadDefaultFileListComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["nzTitle","\u5B8C\u5168\u63A7\u5236\u7684\u4E0A\u4F20\u5217\u8868","nzSelector","nz-demo-upload-file-list","nzGenerateCommand","ng g ng-zorro-antd:upload-file-list <name>","nzComponentName","NzDemoUploadFileListComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["nzTitle","\u6587\u4EF6\u5939\u4E0A\u4F20","nzSelector","nz-demo-upload-directory","nzGenerateCommand","ng g ng-zorro-antd:upload-directory <name>","nzComponentName","NzDemoUploadDirectoryComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["nzTitle","\u56FE\u7247\u5217\u8868\u6837\u5F0F","nzSelector","nz-demo-upload-picture-style","nzGenerateCommand","ng g ng-zorro-antd:upload-picture-style <name>","nzComponentName","NzDemoUploadPictureStyleComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["href","https://developer.mozilla.org/en-US/docs/Web/API/FileReader/readAsDataURL","target","_blank","rel","noopener"],["nzTitle","\u4E0A\u4F20\u524D\u8F6C\u6362\u6587\u4EF6","nzSelector","nz-demo-upload-transform-file","nzGenerateCommand","ng g ng-zorro-antd:upload-transform-file <name>","nzComponentName","NzDemoUploadTransformFileComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["nzTitle","\u7528\u6237\u5934\u50CF","nzSelector","nz-demo-upload-avatar","nzGenerateCommand","ng g ng-zorro-antd:upload-avatar <name>","nzComponentName","NzDemoUploadAvatarComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["nzTitle","\u7167\u7247\u5899","nzSelector","nz-demo-upload-picture-card","nzGenerateCommand","ng g ng-zorro-antd:upload-picture-card <name>","nzComponentName","NzDemoUploadPictureCardComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["nzTitle","\u62D6\u62FD\u4E0A\u4F20","nzSelector","nz-demo-upload-drag","nzGenerateCommand","ng g ng-zorro-antd:upload-drag <name>","nzComponentName","NzDemoUploadDragComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["nzTitle","\u624B\u52A8\u4E0A\u4F20","nzSelector","nz-demo-upload-upload-manually","nzGenerateCommand","ng g ng-zorro-antd:upload-upload-manually <name>","nzComponentName","NzDemoUploadUploadManuallyComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["nzTitle","\u81EA\u5B9A\u4E49\u9884\u89C8","nzSelector","nz-demo-upload-preview-file","nzGenerateCommand","ng g ng-zorro-antd:upload-preview-file <name>","nzComponentName","NzDemoUploadPreviewFileComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["nzTitle","\u963F\u91CC\u4E91 OSS","nzSelector","nz-demo-upload-upload-with-aliyun-oss","nzGenerateCommand","ng g ng-zorro-antd:upload-upload-with-aliyun-oss <name>","nzComponentName","NzDemoUploadUploadWithAliyunOssComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],[1,"markdown","api-container"],["id","api"],["onclick","window.location.hash = 'api'",1,"anchor"],["href","https://github.com/blueimp/jQuery-File-Upload/wiki","target","_blank","rel","noopener"],["id","nz-upload"],[1,"api-type-label","component"],["onclick","window.location.hash = 'nz-upload'",1,"anchor"],["href","https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-accept","target","_blank","rel","noopener"],["href","https://caniuse.com/#feat=input-file-directory","target","_blank","rel","noopener"],["id","nzchange"],["onclick","window.location.hash = 'nzchange'",1,"anchor"],[1,"language-js"],["spellcheck","true",1,"token","comment"],["id","nzcustomrequest"],["onclick","window.location.hash = 'nzcustomrequest'",1,"anchor"]],template:function(i,l){i&1&&(t(0,"article")(1,"nz-affix",0)(2,"nz-anchor",1),F("nzClick",function(u){return l.goLink(u)}),m(3,"nz-link",2)(4,"nz-link",3)(5,"nz-link",4)(6,"nz-link",5)(7,"nz-link",6)(8,"nz-link",7)(9,"nz-link",8)(10,"nz-link",9)(11,"nz-link",10)(12,"nz-link",11)(13,"nz-link",12)(14,"nz-link",13)(15,"nz-link",14),n()(),t(16,"section",15)(17,"h1"),e(18,"Upload"),t(19,"span",16),e(20,"\u4E0A\u4F20"),n(),m(21,"span",17),t(22,"a",18),m(23,"nz-icon",19),n()(),t(24,"section",15),c(),t(25,"p"),e(26,"\u6587\u4EF6\u9009\u62E9\u4E0A\u4F20\u548C\u62D6\u62FD\u4E0A\u4F20\u63A7\u4EF6\u3002"),n(),t(27,"h2",20)(28,"span"),e(29,"\u4F55\u65F6\u4F7F\u7528"),n(),t(30,"a",21),e(31,"#"),n()(),t(32,"p"),e(33,"\u4E0A\u4F20\u662F\u5C06\u4FE1\u606F\uFF08\u7F51\u9875\u3001\u6587\u5B57\u3001\u56FE\u7247\u3001\u89C6\u9891\u7B49\uFF09\u901A\u8FC7\u7F51\u9875\u6216\u8005\u4E0A\u4F20\u5DE5\u5177\u53D1\u5E03\u5230\u8FDC\u7A0B\u670D\u52A1\u5668\u4E0A\u7684\u8FC7\u7A0B\u3002"),n(),t(34,"ul")(35,"li"),e(36,"\u5F53\u9700\u8981\u4E0A\u4F20\u4E00\u4E2A\u6216\u4E00\u4E9B\u6587\u4EF6\u65F6\u3002"),n(),t(37,"li"),e(38,"\u5F53\u9700\u8981\u5C55\u73B0\u4E0A\u4F20\u7684\u8FDB\u5EA6\u65F6\u3002"),n(),t(39,"li"),e(40,"\u5F53\u9700\u8981\u4F7F\u7528\u62D6\u62FD\u4EA4\u4E92\u65F6\u3002"),n()(),t(41,"pre",22)(42,"code")(43,"span",23),e(44,"import"),n(),e(45," "),t(46,"span",24),e(47,"{"),n(),e(48," NzUploadModule "),t(49,"span",24),e(50,"}"),n(),e(51," "),t(52,"span",23),e(53,"from"),n(),e(54," "),t(55,"span",25),e(56,"'ng-zorro-antd/upload'"),n(),t(57,"span",24),e(58,";"),n()()(),s(),n(),t(59,"h2")(60,"span"),e(61,"\u4EE3\u7801\u6F14\u793A"),n(),t(62,"span",26),F("click",function(){return l.expandAllCode()}),n()()(),t(63,"div",27)(64,"div",28)(65,"nz-code-box",29),m(66,"nz-demo-upload-basic",30),t(67,"div",31),c(),t(68,"p"),e(69,"\u7ECF\u5178\u6B3E\u5F0F\uFF0C\u7528\u6237\u70B9\u51FB\u6309\u94AE\u5F39\u51FA\u6587\u4EF6\u9009\u62E9\u6846\u3002"),n(),s(),n()(),t(70,"nz-code-box",32),m(71,"nz-demo-upload-default-file-list",30),t(72,"div",31),c(),t(73,"p"),e(74,"\u4F7F\u7528 "),t(75,"code"),e(76,"nzFileList"),n(),e(77," \u8BBE\u7F6E\u5DF2\u4E0A\u4F20\u7684\u5185\u5BB9\u3002"),n(),s(),n()(),t(78,"nz-code-box",33),m(79,"nz-demo-upload-file-list",30),t(80,"div",31),c(),t(81,"p"),e(82,"\u4F7F\u7528 "),t(83,"code"),e(84,"nzFileList"),n(),e(85," \u5BF9\u5217\u8868\u8FDB\u884C\u5B8C\u5168\u63A7\u5236\uFF0C\u53EF\u4EE5\u5B9E\u73B0\u5404\u79CD\u81EA\u5B9A\u4E49\u529F\u80FD\uFF0C\u4EE5\u4E0B\u6F14\u793A\u4E8C\u79CD\u60C5\u51B5\uFF1A"),n(),t(86,"ol")(87,"li")(88,"p"),e(89,"\u4E0A\u4F20\u5217\u8868\u6570\u91CF\u7684\u9650\u5236\u3002"),n()(),t(90,"li")(91,"p"),e(92,"\u8BFB\u53D6\u8FDC\u7A0B\u8DEF\u5F84\u5E76\u663E\u793A\u94FE\u63A5\u3002"),n()()(),s(),n()(),t(93,"nz-code-box",34),m(94,"nz-demo-upload-directory",30),t(95,"div",31),c(),t(96,"p"),e(97,"\u652F\u6301\u4E0A\u4F20\u4E00\u4E2A\u6587\u4EF6\u5939\u91CC\u7684\u6240\u6709\u6587\u4EF6\u3002"),n(),s(),n()(),t(98,"nz-code-box",35),m(99,"nz-demo-upload-picture-style",30),t(100,"div",31),c(),t(101,"p"),e(102,"\u4E0A\u4F20\u6587\u4EF6\u4E3A\u56FE\u7247\uFF0C\u53EF\u5C55\u793A\u672C\u5730\u7F29\u7565\u56FE\u3002"),t(103,"code"),e(104,"IE8/9"),n(),e(105," \u4E0D\u652F\u6301\u6D4F\u89C8\u5668\u672C\u5730\u7F29\u7565\u56FE\u5C55\u793A\uFF08"),t(106,"a",36),e(107,"Ref"),n(),e(108,"\uFF09\uFF0C\u53EF\u4EE5\u5199 "),t(109,"code"),e(110,"thumbUrl"),n(),e(111," \u5C5E\u6027\u6765\u4EE3\u66FF\u3002"),n(),s(),n()(),t(112,"nz-code-box",37),m(113,"nz-demo-upload-transform-file",30),t(114,"div",31),c(),t(115,"p"),e(116,"\u4F7F\u7528 "),t(117,"code"),e(118,"nzTransformFile"),n(),e(119," \u8F6C\u6362\u4E0A\u4F20\u7684\u6587\u4EF6\uFF08\u4F8B\u5982\u6DFB\u52A0\u6C34\u5370\uFF09\u3002"),n(),s(),n()()(),t(120,"div",28)(121,"nz-code-box",38),m(122,"nz-demo-upload-avatar",30),t(123,"div",31),c(),t(124,"p"),e(125,"\u70B9\u51FB\u4E0A\u4F20\u7528\u6237\u5934\u50CF\uFF0C\u5E76\u4F7F\u7528 "),t(126,"code"),e(127,"nzBeforeUpload"),n(),e(128," \u9650\u5236\u7528\u6237\u4E0A\u4F20\u7684\u56FE\u7247\u683C\u5F0F\u548C\u5927\u5C0F\u3002"),n(),t(129,"blockquote")(130,"p")(131,"code"),e(132,"nzBeforeUpload"),n(),e(133," \u7684\u8FD4\u56DE\u503C\u53EF\u4EE5\u662F\u4E00\u4E2A Observable \u4EE5\u652F\u6301\u4E5F\u652F\u6301\u5F02\u6B65\u68C0\u67E5\u3002"),n()(),s(),n()(),t(134,"nz-code-box",39),m(135,"nz-demo-upload-picture-card",30),t(136,"div",31),c(),t(137,"p"),e(138,"\u7528\u6237\u53EF\u4EE5\u4E0A\u4F20\u56FE\u7247\u5E76\u5728\u5217\u8868\u4E2D\u663E\u793A\u7F29\u7565\u56FE\u3002\u5F53\u4E0A\u4F20\u7167\u7247\u6570\u5230\u8FBE\u9650\u5236\u540E\uFF0C\u4E0A\u4F20\u6309\u94AE\u6D88\u5931\u3002"),n(),s(),n()(),t(139,"nz-code-box",40),m(140,"nz-demo-upload-drag",30),t(141,"div",31),c(),t(142,"p"),e(143,"\u628A\u6587\u4EF6\u62D6\u5165\u6307\u5B9A\u533A\u57DF\uFF0C\u5B8C\u6210\u4E0A\u4F20\uFF0C\u540C\u6837\u652F\u6301\u70B9\u51FB\u4E0A\u4F20\u3002"),n(),t(144,"p"),e(145,"\u8BBE\u7F6E "),t(146,"code"),e(147,"nzMultiple"),n(),e(148," \u540E\uFF0C\u5728 "),t(149,"code"),e(150,"IE10+"),n(),e(151," \u53EF\u4EE5\u4E00\u6B21\u4E0A\u4F20\u591A\u4E2A\u6587\u4EF6\u3002"),n(),s(),n()(),t(152,"nz-code-box",41),m(153,"nz-demo-upload-upload-manually",30),t(154,"div",31),c(),t(155,"p")(156,"code"),e(157,"nzBeforeUpload"),n(),e(158," \u8FD4\u56DE "),t(159,"code"),e(160,"false"),n(),e(161," \u540E\uFF0C\u624B\u52A8\u4E0A\u4F20\u6587\u4EF6\u3002"),n(),s(),n()(),t(162,"nz-code-box",42),m(163,"nz-demo-upload-preview-file",30),t(164,"div",31),c(),t(165,"p"),e(166,"\u81EA\u5B9A\u4E49\u672C\u5730\u9884\u89C8\uFF0C\u7528\u4E8E\u5904\u7406\u975E\u56FE\u7247\u683C\u5F0F\u6587\u4EF6\uFF08\u4F8B\u5982\u89C6\u9891\u6587\u4EF6\uFF09\u3002"),n(),s(),n()(),t(167,"nz-code-box",43),m(168,"nz-demo-upload-upload-with-aliyun-oss",30),t(169,"div",31),c(),t(170,"p"),e(171,"\u4F7F\u7528\u963F\u91CC\u4E91 OSS \u4E0A\u4F20\u793A\u4F8B."),n(),s(),n()()()(),t(172,"section",44),c(),t(173,"h2",45)(174,"span"),e(175,"API"),n(),t(176,"a",46),e(177,"#"),n()(),t(178,"blockquote")(179,"p"),e(180,"\u670D\u52A1\u7AEF\u4E0A\u4F20\u63A5\u53E3\u5B9E\u73B0\u53EF\u4EE5\u53C2\u8003 "),t(181,"a",47),e(182,"jQuery-File-Upload"),n(),e(183,"\u3002"),n()(),t(184,"h3",48)(185,"span"),e(186,"nz-upload"),n(),t(187,"label",49),e(188,"component"),n(),t(189,"a",50),e(190,"#"),n()(),t(191,"table")(192,"thead")(193,"tr")(194,"th"),e(195,"\u53C2\u6570"),n(),t(196,"th"),e(197,"\u8BF4\u660E"),n(),t(198,"th"),e(199,"\u7C7B\u578B"),n(),t(200,"th"),e(201,"\u9ED8\u8BA4\u503C"),n()()(),t(202,"tbody")(203,"tr")(204,"td")(205,"code"),e(206,"[nzAccept]"),n()(),t(207,"td"),e(208,"\u63A5\u53D7\u4E0A\u4F20\u7684\u6587\u4EF6\u7C7B\u578B, \u8BE6\u89C1 "),t(209,"a",51),e(210,"input accept Attribute"),n()(),t(211,"td")(212,"code"),e(213,"string"),n()(),t(214,"td"),e(215,"-"),n()(),t(216,"tr")(217,"td")(218,"code"),e(219,"[nzAction]"),n()(),t(220,"td"),e(221,"\u5FC5\u9009\u53C2\u6570, \u4E0A\u4F20\u7684\u5730\u5740"),n(),t(222,"td")(223,"code"),e(224,"string | ((file: NzUploadFile) => string | Observable<string>)"),n()(),t(225,"td"),e(226,"-"),n()(),t(227,"tr")(228,"td")(229,"code"),e(230,"[nzDirectory]"),n()(),t(231,"td"),e(232,"\u652F\u6301\u4E0A\u4F20\u6587\u4EF6\u5939\uFF08"),t(233,"a",52),e(234,"caniuse"),n(),e(235,"\uFF09"),n(),t(236,"td")(237,"code"),e(238,"boolean"),n()(),t(239,"td")(240,"code"),e(241,"false"),n()()(),t(242,"tr")(243,"td")(244,"code"),e(245,"[nzBeforeUpload]"),n()(),t(246,"td"),e(247,"\u4E0A\u4F20\u6587\u4EF6\u4E4B\u524D\u7684\u94A9\u5B50\uFF0C\u53C2\u6570\u4E3A\u4E0A\u4F20\u7684\u6587\u4EF6\uFF0C\u82E5\u8FD4\u56DE "),t(248,"code"),e(249,"false"),n(),e(250," \u5219\u505C\u6B62\u4E0A\u4F20\u3002\u6CE8\u610F\uFF1A"),t(251,"strong"),e(252,"IE9"),n(),e(253," \u4E0D\u652F\u6301\u8BE5\u65B9\u6CD5\uFF1B\u6CE8\u610F\uFF1A\u52A1\u5FC5\u4F7F\u7528 "),t(254,"code"),e(255,"=>"),n(),e(256," \u5B9A\u4E49\u5904\u7406\u65B9\u6CD5\u3002"),n(),t(257,"td")(258,"code"),e(259,"(file: NzUploadFile, fileList: NzUploadFile[]) => boolean | Observable<boolean>"),n()(),t(260,"td"),e(261,"-"),n()(),t(262,"tr")(263,"td")(264,"code"),e(265,"[nzCustomRequest]"),n()(),t(266,"td"),e(267,"\u901A\u8FC7\u8986\u76D6\u9ED8\u8BA4\u7684\u4E0A\u4F20\u884C\u4E3A\uFF0C\u53EF\u4EE5\u81EA\u5B9A\u4E49\u81EA\u5DF1\u7684\u4E0A\u4F20\u5B9E\u73B0\uFF1B\u6CE8\u610F\uFF1A\u52A1\u5FC5\u4F7F\u7528 "),t(268,"code"),e(269,"=>"),n(),e(270," \u5B9A\u4E49\u5904\u7406\u65B9\u6CD5\u3002"),n(),t(271,"td")(272,"code"),e(273,"(item) => Subscription"),n()(),t(274,"td"),e(275,"-"),n()(),t(276,"tr")(277,"td")(278,"code"),e(279,"[nzData]"),n()(),t(280,"td"),e(281,"\u4E0A\u4F20\u6240\u9700\u53C2\u6570\u6216\u8FD4\u56DE\u4E0A\u4F20\u53C2\u6570\u7684\u65B9\u6CD5\uFF1B\u6CE8\u610F\uFF1A\u52A1\u5FC5\u4F7F\u7528 "),t(282,"code"),e(283,"=>"),n(),e(284," \u5B9A\u4E49\u5904\u7406\u65B9\u6CD5\u3002"),n(),t(285,"td")(286,"code"),e(287,"Object | ((file: NzUploadFile) => Object | Observable<{}>)"),n()(),t(288,"td"),e(289,"-"),n()(),t(290,"tr")(291,"td")(292,"code"),e(293,"[nzDisabled]"),n()(),t(294,"td"),e(295,"\u662F\u5426\u7981\u7528"),n(),t(296,"td")(297,"code"),e(298,"boolean"),n()(),t(299,"td")(300,"code"),e(301,"false"),n()()(),t(302,"tr")(303,"td")(304,"code"),e(305,"[nzFileList]"),n()(),t(306,"td"),e(307,"\u6587\u4EF6\u5217\u8868\uFF0C\u53CC\u5411\u7ED1\u5B9A"),n(),t(308,"td")(309,"code"),e(310,"NzUploadFile[]"),n()(),t(311,"td"),e(312,"-"),n()(),t(313,"tr")(314,"td")(315,"code"),e(316,"[nzLimit]"),n()(),t(317,"td"),e(318,"\u9650\u5236\u5355\u6B21\u6700\u591A\u4E0A\u4F20\u6570\u91CF\uFF0C"),t(319,"code"),e(320,"nzMultiple"),n(),e(321," \u6253\u5F00\u65F6\u6709\u6548\uFF1B"),t(322,"code"),e(323,"0"),n(),e(324," \u8868\u793A\u4E0D\u9650"),n(),t(325,"td")(326,"code"),e(327,"number"),n()(),t(328,"td")(329,"code"),e(330,"0"),n()()(),t(331,"tr")(332,"td")(333,"code"),e(334,"[nzSize]"),n()(),t(335,"td"),e(336,"\u9650\u5236\u6587\u4EF6\u5927\u5C0F\uFF0C\u5355\u4F4D\uFF1AKB\uFF1B"),t(337,"code"),e(338,"0"),n(),e(339," \u8868\u793A\u4E0D\u9650"),n(),t(340,"td")(341,"code"),e(342,"number"),n()(),t(343,"td")(344,"code"),e(345,"0"),n()()(),t(346,"tr")(347,"td")(348,"code"),e(349,"[nzFileType]"),n()(),t(350,"td"),e(351,"\u9650\u5236\u6587\u4EF6\u7C7B\u578B\uFF0C\u4F8B\u5982\uFF1A"),t(352,"code"),e(353,"image/png,image/jpeg,image/gif,image/bmp"),n()(),t(354,"td")(355,"code"),e(356,"string"),n()(),t(357,"td"),e(358,"-"),n()(),t(359,"tr")(360,"td")(361,"code"),e(362,"[nzFilter]"),n()(),t(363,"td"),e(364,"\u81EA\u5B9A\u4E49\u8FC7\u6EE4\u5668"),n(),t(365,"td")(366,"code"),e(367,"UploadFilter[]"),n()(),t(368,"td"),e(369,"-"),n()(),t(370,"tr")(371,"td")(372,"code"),e(373,"[nzHeaders]"),n()(),t(374,"td"),e(375,"\u8BBE\u7F6E\u4E0A\u4F20\u7684\u8BF7\u6C42\u5934\u90E8\uFF0CIE10 \u4EE5\u4E0A\u6709\u6548\uFF1B\u6CE8\u610F\uFF1A\u52A1\u5FC5\u4F7F\u7528 "),t(376,"code"),e(377,"=>"),n(),e(378," \u5B9A\u4E49\u5904\u7406\u65B9\u6CD5\u3002"),n(),t(379,"td")(380,"code"),e(381,"Object | ((file: NzUploadFile) => Object | Observable<{}>)"),n()(),t(382,"td"),e(383,"-"),n()(),t(384,"tr")(385,"td")(386,"code"),e(387,"[nzListType]"),n()(),t(388,"td"),e(389,"\u4E0A\u4F20\u5217\u8868\u7684\u5185\u5EFA\u6837\u5F0F\uFF0C\u652F\u6301\u4E09\u79CD\u57FA\u672C\u6837\u5F0F "),t(390,"code"),e(391,"text"),n(),e(392,", "),t(393,"code"),e(394,"picture"),n(),e(395," \u548C "),t(396,"code"),e(397,"picture-card"),n()(),t(398,"td")(399,"code"),e(400,"'text' | 'picture' | 'picture-card'"),n()(),t(401,"td")(402,"code"),e(403,"'text'"),n()()(),t(404,"tr")(405,"td")(406,"code"),e(407,"[nzMultiple]"),n()(),t(408,"td"),e(409,"\u662F\u5426\u652F\u6301\u591A\u9009\u6587\u4EF6\uFF0C"),t(410,"code"),e(411,"ie10+"),n(),e(412," \u652F\u6301\u3002\u5F00\u542F\u540E\u6309\u4F4F ctrl \u53EF\u9009\u62E9\u591A\u4E2A\u6587\u4EF6\u3002"),n(),t(413,"td")(414,"code"),e(415,"boolean"),n()(),t(416,"td")(417,"code"),e(418,"false"),n()()(),t(419,"tr")(420,"td")(421,"code"),e(422,"[nzName]"),n()(),t(423,"td"),e(424,"\u53D1\u5230\u540E\u53F0\u7684\u6587\u4EF6\u53C2\u6570\u540D"),n(),t(425,"td")(426,"code"),e(427,"string"),n()(),t(428,"td")(429,"code"),e(430,"'file'"),n()()(),t(431,"tr")(432,"td")(433,"code"),e(434,"[nzShowUploadList]"),n()(),t(435,"td"),e(436,"\u662F\u5426\u5C55\u793A uploadList, \u53EF\u8BBE\u4E3A\u4E00\u4E2A\u5BF9\u8C61\uFF0C\u7528\u4E8E\u5355\u72EC\u8BBE\u5B9A "),t(437,"code"),e(438,"showPreviewIcon"),n(),e(439,"\uFF0C"),t(440,"code"),e(441,"showRemoveIcon"),n(),e(442," \u548C "),t(443,"code"),e(444,"showDownloadIcon"),n()(),t(445,"td")(446,"code"),e(447,"boolean | { showPreviewIcon?: boolean, showRemoveIcon?: boolean, showDownloadIcon?: boolean }"),n()(),t(448,"td")(449,"code"),e(450,"true"),n()()(),t(451,"tr")(452,"td")(453,"code"),e(454,"[nzShowButton]"),n()(),t(455,"td"),e(456,"\u662F\u5426\u5C55\u793A\u4E0A\u4F20\u6309\u94AE"),n(),t(457,"td")(458,"code"),e(459,"boolean"),n()(),t(460,"td")(461,"code"),e(462,"true"),n()()(),t(463,"tr")(464,"td")(465,"code"),e(466,"[nzWithCredentials]"),n()(),t(467,"td"),e(468,"\u4E0A\u4F20\u8BF7\u6C42\u65F6\u662F\u5426\u643A\u5E26 cookie"),n(),t(469,"td")(470,"code"),e(471,"boolean"),n()(),t(472,"td")(473,"code"),e(474,"false"),n()()(),t(475,"tr")(476,"td")(477,"code"),e(478,"[nzOpenFileDialogOnClick]"),n()(),t(479,"td"),e(480,"\u70B9\u51FB\u6253\u5F00\u6587\u4EF6\u5BF9\u8BDD\u6846"),n(),t(481,"td")(482,"code"),e(483,"boolean"),n()(),t(484,"td")(485,"code"),e(486,"true"),n()()(),t(487,"tr")(488,"td")(489,"code"),e(490,"[nzPreview]"),n()(),t(491,"td"),e(492,"\u70B9\u51FB\u6587\u4EF6\u94FE\u63A5\u6216\u9884\u89C8\u56FE\u6807\u65F6\u7684\u56DE\u8C03\uFF1B\u6CE8\u610F\uFF1A\u52A1\u5FC5\u4F7F\u7528 "),t(493,"code"),e(494,"=>"),n(),e(495," \u5B9A\u4E49\u5904\u7406\u65B9\u6CD5\u3002"),n(),t(496,"td")(497,"code"),e(498,"(file: NzUploadFile) => void"),n()(),t(499,"td"),e(500,"-"),n()(),t(501,"tr")(502,"td")(503,"code"),e(504,"[nzPreviewFile]"),n()(),t(505,"td"),e(506,"\u81EA\u5B9A\u4E49\u6587\u4EF6\u9884\u89C8\u903B\u8F91\uFF1B\u6CE8\u610F\uFF1A\u52A1\u5FC5\u4F7F\u7528 "),t(507,"code"),e(508,"=>"),n(),e(509," \u5B9A\u4E49\u5904\u7406\u65B9\u6CD5\u3002"),n(),t(510,"td")(511,"code"),e(512,"(file: NzUploadFile) => Observable<dataURL: string>"),n()(),t(513,"td"),e(514,"-"),n()(),t(515,"tr")(516,"td")(517,"code"),e(518,"[nzPreviewIsImage]"),n()(),t(519,"td"),e(520,"\u81EA\u5B9A\u4E49\u9884\u89C8\u6587\u4EF6\u662F\u5426\u6709\u6548\u56FE\u50CF\uFF0C\u4E00\u822C\u7528\u4E8E\u56FE\u50CF URL \u4E3A\u975E\u6807\u51C6\u683C\u5F0F\uFF1B\u6CE8\u610F\uFF1A\u52A1\u5FC5\u4F7F\u7528 "),t(521,"code"),e(522,"=>"),n(),e(523," \u5B9A\u4E49\u5904\u7406\u65B9\u6CD5\u3002"),n(),t(524,"td")(525,"code"),e(526,"(file: NzUploadFile) => boolean"),n()(),t(527,"td"),e(528,"-"),n()(),t(529,"tr")(530,"td")(531,"code"),e(532,"[nzRemove]"),n()(),t(533,"td"),e(534,"\u70B9\u51FB\u79FB\u9664\u6587\u4EF6\u65F6\u7684\u56DE\u8C03\uFF0C\u8FD4\u56DE\u503C\u4E3A false \u65F6\u4E0D\u79FB\u9664\u3002\u652F\u6301\u8FD4\u56DE "),t(535,"code"),e(536,"Observable"),n(),e(537," \u5BF9\u8C61\uFF1B\u6CE8\u610F\uFF1A\u52A1\u5FC5\u4F7F\u7528 "),t(538,"code"),e(539,"=>"),n(),e(540," \u5B9A\u4E49\u5904\u7406\u65B9\u6CD5\u3002"),n(),t(541,"td")(542,"code"),e(543,"(file: NzUploadFile) => boolean | Observable<boolean>"),n()(),t(544,"td"),e(545,"-"),n()(),t(546,"tr")(547,"td")(548,"code"),e(549,"(nzChange)"),n()(),t(550,"td"),e(551,"\u4E0A\u4F20\u6587\u4EF6\u6539\u53D8\u65F6\u7684\u72B6\u6001"),n(),t(552,"td")(553,"code"),e(554,"EventEmitter<NzUploadChangeParam>"),n()(),t(555,"td"),e(556,"-"),n()(),t(557,"tr")(558,"td")(559,"code"),e(560,"[nzDownload]"),n()(),t(561,"td"),e(562,"\u70B9\u51FB\u4E0B\u8F7D\u6587\u4EF6\u65F6\u7684\u56DE\u8C03\uFF0C\u5982\u679C\u6CA1\u6709\u6307\u5B9A\uFF0C\u5219\u9ED8\u8BA4\u8DF3\u8F6C\u5230\u6587\u4EF6 url \u5BF9\u5E94\u7684\u6807\u7B7E\u9875"),n(),t(563,"td")(564,"code"),e(565,"(file: NzUploadFile) => void"),n()(),t(566,"td"),e(567,"\u8DF3\u8F6C\u65B0\u6807\u7B7E\u9875"),n()(),t(568,"tr")(569,"td")(570,"code"),e(571,"[nzTransformFile]"),n()(),t(572,"td"),e(573,"\u5728\u4E0A\u4F20\u4E4B\u524D\u8F6C\u6362\u6587\u4EF6\u3002\u652F\u6301\u8FD4\u56DE\u4E00\u4E2A Observable \u5BF9\u8C61"),n(),t(574,"td")(575,"code"),e(576,"(file: NzUploadFile) => NzUploadTransformFileType"),n()(),t(577,"td"),e(578,"-"),n()(),t(579,"tr")(580,"td")(581,"code"),e(582,"[nzIconRender]"),n()(),t(583,"td"),e(584,"\u81EA\u5B9A\u4E49\u663E\u793A icon"),n(),t(585,"td")(586,"code"),e(587,"TemplateRef<{ $implicit: NzUploadFile }>"),n()(),t(588,"td"),e(589,"-"),n()(),t(590,"tr")(591,"td")(592,"code"),e(593,"[nzFileListRender]"),n()(),t(594,"td"),e(595,"\u81EA\u5B9A\u4E49\u663E\u793A\u6574\u4E2A\u5217\u8868"),n(),t(596,"td")(597,"code"),e(598,"TemplateRef<{ $implicit: NzUploadFile[] }>"),n()(),t(599,"td"),e(600,"-"),n()()()(),t(601,"h4",53)(602,"span"),e(603,"nzChange"),n(),t(604,"a",54),e(605,"#"),n()(),t(606,"blockquote")(607,"p"),e(608,"\u5F00\u59CB\u3001\u4E0A\u4F20\u8FDB\u5EA6\u3001\u5B8C\u6210\u3001\u5931\u8D25\u90FD\u4F1A\u8C03\u7528\u8FD9\u4E2A\u51FD\u6570\u3002"),n()(),t(609,"p"),e(610,"\u6587\u4EF6\u72B6\u6001\u6539\u53D8\u7684\u56DE\u8C03\uFF0C\u8FD4\u56DE\u4E3A\uFF1A"),n(),t(611,"pre",55)(612,"code")(613,"span",24),e(614,"{"),n(),e(615,`
file`),t(616,"span",24),e(617,":"),n(),e(618," "),t(619,"span",24),e(620,"{"),n(),e(621," "),t(622,"span",56),e(623,"/* ... */"),n(),e(624," "),t(625,"span",24),e(626,"}"),n(),t(627,"span",24),e(628,","),n(),e(629,`
fileList`),t(630,"span",24),e(631,":"),n(),e(632," "),t(633,"span",24),e(634,"["),n(),e(635," "),t(636,"span",56),e(637,"/* ... */"),n(),e(638," "),t(639,"span",24),e(640,"]"),n(),t(641,"span",24),e(642,","),n(),e(643,`
event`),t(644,"span",24),e(645,":"),n(),e(646," "),t(647,"span",24),e(648,"{"),n(),e(649," "),t(650,"span",56),e(651,"/* ... */"),n(),e(652," "),t(653,"span",24),e(654,"}"),n(),t(655,"span",24),e(656,","),n(),e(657,`
`),t(658,"span",24),e(659,"}"),n()()(),t(660,"ol")(661,"li")(662,"p")(663,"code"),e(664,"file"),n(),e(665," \u5F53\u524D\u64CD\u4F5C\u7684\u6587\u4EF6\u5BF9\u8C61\u3002"),n(),t(666,"pre",55)(667,"code")(668,"span",24),e(669,"{"),n(),e(670,`
uid`),t(671,"span",24),e(672,":"),n(),e(673," "),t(674,"span",25),e(675,"'uid'"),n(),t(676,"span",24),e(677,","),n(),e(678," "),t(679,"span",56),e(680,"// \u6587\u4EF6\u552F\u4E00\u6807\u8BC6"),n(),e(681,`
name`),t(682,"span",24),e(683,":"),n(),e(684," "),t(685,"span",25),e(686,"'xx.png'"),n(),e(687," "),t(688,"span",56),e(689,"// \u6587\u4EF6\u540D"),n(),e(690,`
status`),t(691,"span",24),e(692,":"),n(),e(693," "),t(694,"span",25),e(695,"'done'"),n(),t(696,"span",24),e(697,","),n(),e(698," "),t(699,"span",56),e(700,"// \u72B6\u6001\u6709\uFF1Auploading done error removed"),n(),e(701,`
response`),t(702,"span",24),e(703,":"),n(),e(704," "),t(705,"span",25),e(706,`'{"status": "success"}'`),n(),t(707,"span",24),e(708,","),n(),e(709," "),t(710,"span",56),e(711,"// \u670D\u52A1\u7AEF\u54CD\u5E94\u5185\u5BB9"),n(),e(712,`
linkProps`),t(713,"span",24),e(714,":"),n(),e(715," "),t(716,"span",25),e(717,`'{"download": "image"}'`),n(),t(718,"span",24),e(719,","),n(),e(720," "),t(721,"span",56),e(722,"// \u4E0B\u8F7D\u94FE\u63A5\u989D\u5916\u7684 HTML \u5C5E\u6027"),n(),e(723,`
`),t(724,"span",24),e(725,"}"),n()()()(),t(726,"li")(727,"p")(728,"code"),e(729,"fileList"),n(),e(730," \u5F53\u524D\u7684\u6587\u4EF6\u5217\u8868\u3002"),n()(),t(731,"li")(732,"p")(733,"code"),e(734,"event"),n(),e(735," \u4E0A\u4F20\u4E2D\u7684\u670D\u52A1\u7AEF\u54CD\u5E94\u5185\u5BB9\uFF0C\u5305\u542B\u4E86\u4E0A\u4F20\u8FDB\u5EA6\u7B49\u4FE1\u606F\uFF0C\u9AD8\u7EA7\u6D4F\u89C8\u5668\u652F\u6301\u3002"),n()()(),t(736,"h4",57)(737,"span"),e(738,"nzCustomRequest"),n(),t(739,"a",58),e(740,"#"),n()(),t(741,"p"),e(742,"\u9ED8\u8BA4\u4F7F\u7528 HTML5 \u65B9\u5F0F\u4E0A\u4F20\uFF08\u5373\uFF1A\u4F7F\u7528 "),t(743,"code"),e(744,"HttpClient"),n(),e(745,"\uFF09\uFF0C\u5141\u8BB8\u8986\u76D6\u9ED8\u8BA4\u884C\u4E3A\u5B9E\u73B0\u5B9A\u5236\u9700\u6C42\uFF0C\u4F8B\u5982\u76F4\u63A5\u4E0E\u963F\u91CC\u4E91\u4EA4\u4E92\u7B49\u3002"),n(),t(746,"p")(747,"code"),e(748,"nzCustomRequest"),n(),e(749," \u56DE\u8C03\u4F20\u9012\u4EE5\u4E0B\u53C2\u6570\uFF1A"),n(),t(750,"ul")(751,"li")(752,"code"),e(753,"onProgress: (event: { percent: number }): void"),n()(),t(754,"li")(755,"code"),e(756,"onError: (event: Error): void"),n()(),t(757,"li")(758,"code"),e(759,"onSuccess: (body: Object, xhr?: Object): void"),n()(),t(760,"li")(761,"code"),e(762,"data: Object"),n()(),t(763,"li")(764,"code"),e(765,"filename: String"),n()(),t(766,"li")(767,"code"),e(768,"file: File"),n()(),t(769,"li")(770,"code"),e(771,"withCredentials: Boolean"),n()(),t(772,"li")(773,"code"),e(774,"action: String"),n()(),t(775,"li")(776,"code"),e(777,"headers: Object"),n()()(),s(),n()()),i&2&&(r(),d("nzOffsetTop",16),r(),d("nzAffix",!1),r(61),d("nzGutter",16),r(),d("nzXl",12)("nzSpan",24),r(),d("nzId","components-upload-demo-basic")("nzLink","components-upload-demo-basic")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/upload/demo/basic.md"),r(5),d("nzId","components-upload-demo-default-file-list")("nzLink","components-upload-demo-default-file-list")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/upload/demo/default-file-list.md"),r(8),d("nzId","components-upload-demo-file-list")("nzLink","components-upload-demo-file-list")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/upload/demo/file-list.md"),r(15),d("nzId","components-upload-demo-directory")("nzLink","components-upload-demo-directory")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/upload/demo/directory.md"),r(5),d("nzId","components-upload-demo-picture-style")("nzLink","components-upload-demo-picture-style")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/upload/demo/picture-style.md"),r(14),d("nzId","components-upload-demo-transform-file")("nzLink","components-upload-demo-transform-file")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/upload/demo/transform-file.md"),r(8),d("nzXl",12)("nzSpan",24),r(),d("nzId","components-upload-demo-avatar")("nzLink","components-upload-demo-avatar")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/upload/demo/avatar.md"),r(13),d("nzId","components-upload-demo-picture-card")("nzLink","components-upload-demo-picture-card")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/upload/demo/picture-card.md"),r(5),d("nzId","components-upload-demo-drag")("nzLink","components-upload-demo-drag")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/upload/demo/drag.md"),r(13),d("nzId","components-upload-demo-upload-manually")("nzLink","components-upload-demo-upload-manually")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/upload/demo/upload-manually.md"),r(10),d("nzId","components-upload-demo-preview-file")("nzLink","components-upload-demo-preview-file")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/upload/demo/preview-file.md"),r(5),d("nzId","components-upload-demo-upload-with-aliyun-oss")("nzLink","components-upload-demo-upload-with-aliyun-oss")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/upload/demo/upload-with-aliyun-oss.md"))},dependencies:[K,k,X,Y,J,Q,V,q,E,$,ee,te,ne,ie,oe,le,ae,de,me,re,ue],encapsulation:2})}}return a})();var Ne=(()=>{class a{constructor(){this.expanded=!1}goLink(o){window&&(window.location.hash=o)}expandAllCode(){this.expanded=!this.expanded,this.codeBoxes.forEach(o=>o.expandCode(this.expanded))}static{this.\u0275fac=function(i){return new(i||a)}}static{this.\u0275cmp=z({type:a,selectors:[["nz-demo-upload"]],viewQuery:function(i,l){if(i&1&&j(k,5),i&2){let p;G(p=W())&&(l.codeBoxes=p)}},decls:777,vars:55,consts:[[1,"toc-affix",3,"nzOffsetTop"],["nzShowInkInFixed","",3,"nzClick","nzAffix"],["nzHref","#components-upload-demo-basic","nzTitle","Upload by clicking"],["nzHref","#components-upload-demo-avatar","nzTitle","Avatar"],["nzHref","#components-upload-demo-default-file-list","nzTitle","Default Files"],["nzHref","#components-upload-demo-picture-card","nzTitle","Pictures Wall"],["nzHref","#components-upload-demo-file-list","nzTitle","Complete control over file list"],["nzHref","#components-upload-demo-drag","nzTitle","Drag and Drop"],["nzHref","#components-upload-demo-directory","nzTitle","Upload directory"],["nzHref","#components-upload-demo-upload-manually","nzTitle","Upload manually"],["nzHref","#components-upload-demo-picture-style","nzTitle","Pictures with list style"],["nzHref","#components-upload-demo-preview-file","nzTitle","Customize preview file"],["nzHref","#components-upload-demo-transform-file","nzTitle","Transform file before request"],["nzHref","#components-upload-demo-upload-with-aliyun-oss","nzTitle","Aliyun OSS"],["nzHref","#api","nzTitle","API"],[1,"markdown"],[1,"subtitle"],[1,"widget"],["aria-label","Edit this page on Github","href","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/upload/doc/index.en-US.md","target","_blank","rel","noopener noreferrer",1,"edit-button"],["nzType","edit"],["id","when-to-use"],["onclick","window.location.hash = 'when-to-use'",1,"anchor"],[1,"language-ts"],[1,"token","keyword"],[1,"token","punctuation"],[1,"token","string"],["nz-icon","","nzType","appstore","nz-tooltip","","nzTooltipTitle","Expand All Code",1,"code-box-expand-trigger",3,"click"],["nz-row","",3,"nzGutter"],["nz-col","",3,"nzXl","nzSpan"],["nzTitle","Upload by clicking","nzSelector","nz-demo-upload-basic","nzGenerateCommand","ng g ng-zorro-antd:upload-basic <name>","nzComponentName","NzDemoUploadBasicComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["demo",""],["intro",""],["nzTitle","Default Files","nzSelector","nz-demo-upload-default-file-list","nzGenerateCommand","ng g ng-zorro-antd:upload-default-file-list <name>","nzComponentName","NzDemoUploadDefaultFileListComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["nzTitle","Complete control over file list","nzSelector","nz-demo-upload-file-list","nzGenerateCommand","ng g ng-zorro-antd:upload-file-list <name>","nzComponentName","NzDemoUploadFileListComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["nzTitle","Upload directory","nzSelector","nz-demo-upload-directory","nzGenerateCommand","ng g ng-zorro-antd:upload-directory <name>","nzComponentName","NzDemoUploadDirectoryComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["nzTitle","Pictures with list style","nzSelector","nz-demo-upload-picture-style","nzGenerateCommand","ng g ng-zorro-antd:upload-picture-style <name>","nzComponentName","NzDemoUploadPictureStyleComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["nzTitle","Transform file before request","nzSelector","nz-demo-upload-transform-file","nzGenerateCommand","ng g ng-zorro-antd:upload-transform-file <name>","nzComponentName","NzDemoUploadTransformFileComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["nzTitle","Avatar","nzSelector","nz-demo-upload-avatar","nzGenerateCommand","ng g ng-zorro-antd:upload-avatar <name>","nzComponentName","NzDemoUploadAvatarComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["nzTitle","Pictures Wall","nzSelector","nz-demo-upload-picture-card","nzGenerateCommand","ng g ng-zorro-antd:upload-picture-card <name>","nzComponentName","NzDemoUploadPictureCardComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["nzTitle","Drag and Drop","nzSelector","nz-demo-upload-drag","nzGenerateCommand","ng g ng-zorro-antd:upload-drag <name>","nzComponentName","NzDemoUploadDragComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["nzTitle","Upload manually","nzSelector","nz-demo-upload-upload-manually","nzGenerateCommand","ng g ng-zorro-antd:upload-upload-manually <name>","nzComponentName","NzDemoUploadUploadManuallyComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["nzTitle","Customize preview file","nzSelector","nz-demo-upload-preview-file","nzGenerateCommand","ng g ng-zorro-antd:upload-preview-file <name>","nzComponentName","NzDemoUploadPreviewFileComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["nzTitle","Aliyun OSS","nzSelector","nz-demo-upload-upload-with-aliyun-oss","nzGenerateCommand","ng g ng-zorro-antd:upload-upload-with-aliyun-oss <name>","nzComponentName","NzDemoUploadUploadWithAliyunOssComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],[1,"markdown","api-container"],["id","api"],["onclick","window.location.hash = 'api'",1,"anchor"],["href","https://github.com/blueimp/jQuery-File-Upload/wiki","target","_blank","rel","noopener"],["id","nz-upload"],[1,"api-type-label","component"],["onclick","window.location.hash = 'nz-upload'",1,"anchor"],["href","https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-accept","target","_blank","rel","noopener"],["href","https://caniuse.com/#feat=input-file-directory","target","_blank","rel","noopener"],["id","nzchange"],["onclick","window.location.hash = 'nzchange'",1,"anchor"],[1,"language-js"],["spellcheck","true",1,"token","comment"],["id","nzcustomrequest"],["onclick","window.location.hash = 'nzcustomrequest'",1,"anchor"]],template:function(i,l){i&1&&(t(0,"article")(1,"nz-affix",0)(2,"nz-anchor",1),F("nzClick",function(u){return l.goLink(u)}),m(3,"nz-link",2)(4,"nz-link",3)(5,"nz-link",4)(6,"nz-link",5)(7,"nz-link",6)(8,"nz-link",7)(9,"nz-link",8)(10,"nz-link",9)(11,"nz-link",10)(12,"nz-link",11)(13,"nz-link",12)(14,"nz-link",13)(15,"nz-link",14),n()(),t(16,"section",15)(17,"h1"),e(18,"Upload"),m(19,"span",16)(20,"span",17),t(21,"a",18),m(22,"nz-icon",19),n()(),t(23,"section",15),c(),t(24,"p"),e(25,"Upload file by selecting or dragging."),n(),t(26,"h2",20)(27,"span"),e(28,"When To Use"),n(),t(29,"a",21),e(30,"#"),n()(),t(31,"p"),e(32,"Uploading is publishing information (web pages, text, pictures, video, etc.) to a remote server via a web page or upload tool."),n(),t(33,"ul")(34,"li"),e(35,"When you need to upload one or more files."),n(),t(36,"li"),e(37,"When you need to show the process of uploading."),n(),t(38,"li"),e(39,"When you need to upload files by dragging and dropping."),n()(),t(40,"pre",22)(41,"code")(42,"span",23),e(43,"import"),n(),e(44," "),t(45,"span",24),e(46,"{"),n(),e(47," NzUploadModule "),t(48,"span",24),e(49,"}"),n(),e(50," "),t(51,"span",23),e(52,"from"),n(),e(53," "),t(54,"span",25),e(55,"'ng-zorro-antd/upload'"),n(),t(56,"span",24),e(57,";"),n()()(),s(),n(),t(58,"h2")(59,"span"),e(60,"Examples"),n(),t(61,"span",26),F("click",function(){return l.expandAllCode()}),n()()(),t(62,"div",27)(63,"div",28)(64,"nz-code-box",29),m(65,"nz-demo-upload-basic",30),t(66,"div",31),c(),t(67,"p"),e(68,"Classic mode. File selection dialog pops up when upload button is clicked."),n(),s(),n()(),t(69,"nz-code-box",32),m(70,"nz-demo-upload-default-file-list",30),t(71,"div",31),c(),t(72,"p"),e(73,"Use "),t(74,"code"),e(75,"nzFileList"),n(),e(76," for uploaded files when page init."),n(),s(),n()(),t(77,"nz-code-box",33),m(78,"nz-demo-upload-file-list",30),t(79,"div",31),c(),t(80,"p"),e(81,"You can gain full control over filelist by configuring "),t(82,"code"),e(83,"nzFileList"),n(),e(84,". You can accomplish all kinds of customed functions. The following shows two circumstances:"),n(),t(85,"ol")(86,"li")(87,"p"),e(88,"limit the number of uploaded files."),n()(),t(89,"li")(90,"p"),e(91,"read from response and show file link."),n()()(),s(),n()(),t(92,"nz-code-box",34),m(93,"nz-demo-upload-directory",30),t(94,"div",31),c(),t(95,"p"),e(96,"You can select and upload a whole directory."),n(),s(),n()(),t(97,"nz-code-box",35),m(98,"nz-demo-upload-picture-style",30),t(99,"div",31),c(),t(100,"p"),e(101,"If uploaded file is a picture, the thumbnail can be shown. "),t(102,"code"),e(103,"IE8/9"),n(),e(104," do not support local thumbnail show. Please use "),t(105,"code"),e(106,"thumbUrl"),n(),e(107," instead."),n(),s(),n()(),t(108,"nz-code-box",36),m(109,"nz-demo-upload-transform-file",30),t(110,"div",31),c(),t(111,"p"),e(112,"Use "),t(113,"code"),e(114,"nzTransformFile"),n(),e(115," for transform file before request such as add a watermark."),n(),s(),n()()(),t(116,"div",28)(117,"nz-code-box",37),m(118,"nz-demo-upload-avatar",30),t(119,"div",31),c(),t(120,"p"),e(121,"Click to upload user's avatar, and validate size and format of picture with "),t(122,"code"),e(123,"nzBeforeUpload"),n(),e(124,"."),n(),t(125,"blockquote")(126,"p"),e(127,"The return value of function "),t(128,"code"),e(129,"nzBeforeUpload"),n(),e(130," can be a Observable to check asynchronously."),n()(),s(),n()(),t(131,"nz-code-box",38),m(132,"nz-demo-upload-picture-card",30),t(133,"div",31),c(),t(134,"p"),e(135,"After users upload picture, the thumbnail will be shown in list. The upload button will disappear when count meets limitation."),n(),s(),n()(),t(136,"nz-code-box",39),m(137,"nz-demo-upload-drag",30),t(138,"div",31),c(),t(139,"p"),e(140,"You can drag files to a specific area, to upload. Alternatively, you can also upload by selecting."),n(),t(141,"p"),e(142,"We can upload serveral files at once in modern browsers by giving the input the "),t(143,"code"),e(144,"nzMultiple"),n(),e(145," attribute."),n(),s(),n()(),t(146,"nz-code-box",40),m(147,"nz-demo-upload-upload-manually",30),t(148,"div",31),c(),t(149,"p"),e(150,"Upload files manually after "),t(151,"code"),e(152,"nzBeforeUpload"),n(),e(153," returns "),t(154,"code"),e(155,"false"),n(),e(156,"."),n(),s(),n()(),t(157,"nz-code-box",41),m(158,"nz-demo-upload-preview-file",30),t(159,"div",31),c(),t(160,"p"),e(161,"Customize local preview. Can handle with non-image format files such as video."),n(),s(),n()(),t(162,"nz-code-box",42),m(163,"nz-demo-upload-upload-with-aliyun-oss",30),t(164,"div",31),c(),t(165,"p"),e(166,"Use Aliyun OSS upload example."),n(),s(),n()()()(),t(167,"section",43),c(),t(168,"h2",44)(169,"span"),e(170,"API"),n(),t(171,"a",45),e(172,"#"),n()(),t(173,"blockquote")(174,"p"),e(175,"You can consult "),t(176,"a",46),e(177,"jQuery-File-Upload"),n(),e(178," about how to implement server-side upload interface."),n()(),t(179,"h3",47)(180,"span"),e(181,"nz-upload"),n(),t(182,"label",48),e(183,"component"),n(),t(184,"a",49),e(185,"#"),n()(),t(186,"table")(187,"thead")(188,"tr")(189,"th"),e(190,"Property"),n(),t(191,"th"),e(192,"Description"),n(),t(193,"th"),e(194,"Type"),n(),t(195,"th"),e(196,"Default"),n()()(),t(197,"tbody")(198,"tr")(199,"td")(200,"code"),e(201,"[nzAccept]"),n()(),t(202,"td"),e(203,"File types that can be accepted. See "),t(204,"a",50),e(205,"input accept Attribute"),n()(),t(206,"td")(207,"code"),e(208,"string"),n()(),t(209,"td"),e(210,"-"),n()(),t(211,"tr")(212,"td")(213,"code"),e(214,"[nzAction]"),n()(),t(215,"td"),e(216,"Required. Uploading URL"),n(),t(217,"td")(218,"code"),e(219,"string | ((file: NzUploadFile) => string | Observable<string>)"),n()(),t(220,"td"),e(221,"-"),n()(),t(222,"tr")(223,"td")(224,"code"),e(225,"[nzDirectory]"),n()(),t(226,"td"),e(227,"support uploading the whole directory ("),t(228,"a",51),e(229,"caniuse"),n(),e(230,")"),n(),t(231,"td")(232,"code"),e(233,"boolean"),n()(),t(234,"td")(235,"code"),e(236,"false"),n()()(),t(237,"tr")(238,"td")(239,"code"),e(240,"[nzBeforeUpload]"),n()(),t(241,"td"),e(242,"Hook function, which will be executed before uploading. Uploading will be stopped with "),t(243,"code"),e(244,"false"),n(),e(245," or an Observable. "),t(246,"strong"),e(247,"Warning\uFF1A this function is not supported in IE9"),n(),e(248,". NOTICE: Must use "),t(249,"code"),e(250,"=>"),n(),e(251," to define the method."),n(),t(252,"td")(253,"code"),e(254,"(file: NzUploadFile, fileList: NzUploadFile[]) => boolean | Observable<boolean>"),n()(),t(255,"td"),e(256,"-"),n()(),t(257,"tr")(258,"td")(259,"code"),e(260,"[nzCustomRequest]"),n()(),t(261,"td"),e(262,"Override for the default XHR behavior allowing for additional customization and the ability to implement your own XMLHttpRequest. NOTICE: Must use "),t(263,"code"),e(264,"=>"),n(),e(265," to define the method."),n(),t(266,"td")(267,"code"),e(268,"(item) => Subscription"),n()(),t(269,"td"),e(270,"-"),n()(),t(271,"tr")(272,"td")(273,"code"),e(274,"[nzData]"),n()(),t(275,"td"),e(276,"Uploading params or function which can return uploading params. NOTICE: Must use "),t(277,"code"),e(278,"=>"),n(),e(279," to define the method."),n(),t(280,"td")(281,"code"),e(282,"Object | ((file: NzUploadFile) => Object | Observable<{}>)"),n()(),t(283,"td"),e(284,"-"),n()(),t(285,"tr")(286,"td")(287,"code"),e(288,"[nzDisabled]"),n()(),t(289,"td"),e(290,"disable upload button"),n(),t(291,"td")(292,"code"),e(293,"boolean"),n()(),t(294,"td")(295,"code"),e(296,"false"),n()()(),t(297,"tr")(298,"td")(299,"code"),e(300,"[nzFileList]"),n()(),t(301,"td"),e(302,"List of files, two-way data-binding"),n(),t(303,"td")(304,"code"),e(305,"NzUploadFile[]"),n()(),t(306,"td"),e(307,"-"),n()(),t(308,"tr")(309,"td")(310,"code"),e(311,"[nzLimit]"),n()(),t(312,"td"),e(313,"limit single upload count when "),t(314,"code"),e(315,"nzMultiple"),n(),e(316," has opened. "),t(317,"code"),e(318,"0"),n(),e(319," unlimited"),n(),t(320,"td")(321,"code"),e(322,"number"),n()(),t(323,"td")(324,"code"),e(325,"0"),n()()(),t(326,"tr")(327,"td")(328,"code"),e(329,"[nzSize]"),n()(),t(330,"td"),e(331,"limit file size (KB). "),t(332,"code"),e(333,"0"),n(),e(334," unlimited"),n(),t(335,"td")(336,"code"),e(337,"number"),n()(),t(338,"td")(339,"code"),e(340,"0"),n()()(),t(341,"tr")(342,"td")(343,"code"),e(344,"[nzFileType]"),n()(),t(345,"td"),e(346,"limit file type, e.g: "),t(347,"code"),e(348,"image/png,image/jpeg,image/gif,image/bmp"),n()(),t(349,"td")(350,"code"),e(351,"string"),n()(),t(352,"td"),e(353,"-"),n()(),t(354,"tr")(355,"td")(356,"code"),e(357,"[nzFilter]"),n()(),t(358,"td"),e(359,"Custom filter when choosed file"),n(),t(360,"td")(361,"code"),e(362,"UploadFilter[]"),n()(),t(363,"td"),e(364,"-"),n()(),t(365,"tr")(366,"td")(367,"code"),e(368,"[nzHeaders]"),n()(),t(369,"td"),e(370,"Set request headers, valid above IE10. NOTICE: Must use "),t(371,"code"),e(372,"=>"),n(),e(373," to define the method."),n(),t(374,"td")(375,"code"),e(376,"Object | ((file: NzUploadFile) => Object | Observable<{}>)"),n()(),t(377,"td"),e(378,"-"),n()(),t(379,"tr")(380,"td")(381,"code"),e(382,"[nzListType]"),n()(),t(383,"td"),e(384,"Built-in stylesheets, support for three types: "),t(385,"code"),e(386,"text"),n(),e(387,", "),t(388,"code"),e(389,"picture"),n(),e(390," or "),t(391,"code"),e(392,"picture-card"),n()(),t(393,"td")(394,"code"),e(395,"'text' | 'picture' | 'picture-card'"),n()(),t(396,"td")(397,"code"),e(398,"'text'"),n()()(),t(399,"tr")(400,"td")(401,"code"),e(402,"[nzMultiple]"),n()(),t(403,"td"),e(404,"Whether to support selected multiple files. "),t(405,"code"),e(406,"IE10+"),n(),e(407," supported. You can select multiple files with CTRL holding down while multiple is set to be true"),n(),t(408,"td")(409,"code"),e(410,"boolean"),n()(),t(411,"td")(412,"code"),e(413,"false"),n()()(),t(414,"tr")(415,"td")(416,"code"),e(417,"[nzName]"),n()(),t(418,"td"),e(419,"The name of the uploading file"),n(),t(420,"td")(421,"code"),e(422,"string"),n()(),t(423,"td")(424,"code"),e(425,"'file'"),n()()(),t(426,"tr")(427,"td")(428,"code"),e(429,"[nzShowUploadList]"),n()(),t(430,"td"),e(431,"Whether to show the default upload list, could be an object to specify "),t(432,"code"),e(433,"showPreviewIcon"),n(),e(434,", "),t(435,"code"),e(436,"showRemoveIcon"),n(),e(437," and "),t(438,"code"),e(439,"showDownloadIcon"),n(),e(440," individually"),n(),t(441,"td")(442,"code"),e(443,"boolean | { showPreviewIcon?: boolean, showRemoveIcon?: boolean, showDownloadIcon?: boolean }"),n()(),t(444,"td")(445,"code"),e(446,"true"),n()()(),t(447,"tr")(448,"td")(449,"code"),e(450,"[nzShowButton]"),n()(),t(451,"td"),e(452,"Show upload button"),n(),t(453,"td")(454,"code"),e(455,"boolean"),n()(),t(456,"td")(457,"code"),e(458,"true"),n()()(),t(459,"tr")(460,"td")(461,"code"),e(462,"[nzWithCredentials]"),n()(),t(463,"td"),e(464,"ajax upload with cookie sent"),n(),t(465,"td")(466,"code"),e(467,"boolean"),n()(),t(468,"td")(469,"code"),e(470,"false"),n()()(),t(471,"tr")(472,"td")(473,"code"),e(474,"[nzOpenFileDialogOnClick]"),n()(),t(475,"td"),e(476,"click open file dialog"),n(),t(477,"td")(478,"code"),e(479,"boolean"),n()(),t(480,"td")(481,"code"),e(482,"true"),n()()(),t(483,"tr")(484,"td")(485,"code"),e(486,"[nzPreview]"),n()(),t(487,"td"),e(488,"A callback function will be executed when the file link or preview icon is clicked. NOTICE: Must use "),t(489,"code"),e(490,"=>"),n(),e(491," to define the method."),n(),t(492,"td")(493,"code"),e(494,"(file: NzUploadFile) => void"),n()(),t(495,"td"),e(496,"-"),n()(),t(497,"tr")(498,"td")(499,"code"),e(500,"[nzPreviewFile]"),n()(),t(501,"td"),e(502,"Customize preview file logic. NOTICE: Must use "),t(503,"code"),e(504,"=>"),n(),e(505," to define the method."),n(),t(506,"td")(507,"code"),e(508,"(file: NzUploadFile) => Observable<dataURL: string>"),n()(),t(509,"td"),e(510,"-"),n()(),t(511,"tr")(512,"td")(513,"code"),e(514,"[nzPreviewIsImage]"),n()(),t(515,"td"),e(516,"Customize the preview file is an image, generally used when the image URL is in a non-standard format. NOTICE: Must use "),t(517,"code"),e(518,"=>"),n(),e(519," to define the method."),n(),t(520,"td")(521,"code"),e(522,"(file: NzUploadFile) => boolean"),n()(),t(523,"td"),e(524,"-"),n()(),t(525,"tr")(526,"td")(527,"code"),e(528,"[nzRemove]"),n()(),t(529,"td"),e(530,"A callback function will be executed when the removing file button is clicked, remove event will be prevented when the return value is "),t(531,"code"),e(532,"false"),n(),e(533," or an Observable. NOTICE: Must use "),t(534,"code"),e(535,"=>"),n(),e(536," to define the method."),n(),t(537,"td")(538,"code"),e(539,"(file: NzUploadFile) => boolean | Observable<boolean>"),n()(),t(540,"td"),e(541,"-"),n()(),t(542,"tr")(543,"td")(544,"code"),e(545,"(nzChange)"),n()(),t(546,"td"),e(547,"A callback function, can be executed when uploading state is changing"),n(),t(548,"td")(549,"code"),e(550,"EventEmitter<NzUploadChangeParam>"),n()(),t(551,"td"),e(552,"-"),n()(),t(553,"tr")(554,"td")(555,"code"),e(556,"[nzDownload]"),n()(),t(557,"td"),e(558,"Click the method to download the file, pass the method to perform the method logic, do not pass the default jump to the new TAB."),n(),t(559,"td")(560,"code"),e(561,"(file: NzUploadFile) => void"),n()(),t(562,"td"),e(563,"Jump to new TAB"),n()(),t(564,"tr")(565,"td")(566,"code"),e(567,"[nzTransformFile]"),n()(),t(568,"td"),e(569,"Customize transform file before request"),n(),t(570,"td")(571,"code"),e(572,"(file: NzUploadFile) => NzUploadTransformFileType"),n()(),t(573,"td"),e(574,"-"),n()(),t(575,"tr")(576,"td")(577,"code"),e(578,"[nzIconRender]"),n()(),t(579,"td"),e(580,"Custom show icon"),n(),t(581,"td")(582,"code"),e(583,"TemplateRef<{ $implicit: NzUploadFile }>"),n()(),t(584,"td"),e(585,"-"),n()(),t(586,"tr")(587,"td")(588,"code"),e(589,"[nzFileListRender]"),n()(),t(590,"td"),e(591,"Custom file list"),n(),t(592,"td")(593,"code"),e(594,"TemplateRef<{ $implicit: NzUploadFile[] }>"),n()(),t(595,"td"),e(596,"-"),n()()()(),t(597,"h4",52)(598,"span"),e(599,"nzChange"),n(),t(600,"a",53),e(601,"#"),n()(),t(602,"blockquote")(603,"p"),e(604,"The function will be called when uploading is in progress, completed or failed"),n()(),t(605,"p"),e(606,"When uploading state changes, it returns:"),n(),t(607,"pre",54)(608,"code")(609,"span",24),e(610,"{"),n(),e(611,`
file`),t(612,"span",24),e(613,":"),n(),e(614," "),t(615,"span",24),e(616,"{"),n(),e(617," "),t(618,"span",55),e(619,"/* ... */"),n(),e(620," "),t(621,"span",24),e(622,"}"),n(),t(623,"span",24),e(624,","),n(),e(625,`
fileList`),t(626,"span",24),e(627,":"),n(),e(628," "),t(629,"span",24),e(630,"["),n(),e(631," "),t(632,"span",55),e(633,"/* ... */"),n(),e(634," "),t(635,"span",24),e(636,"]"),n(),t(637,"span",24),e(638,","),n(),e(639,`
event`),t(640,"span",24),e(641,":"),n(),e(642," "),t(643,"span",24),e(644,"{"),n(),e(645," "),t(646,"span",55),e(647,"/* ... */"),n(),e(648," "),t(649,"span",24),e(650,"}"),n(),t(651,"span",24),e(652,","),n(),e(653,`
`),t(654,"span",24),e(655,"}"),n()()(),t(656,"ol")(657,"li")(658,"p")(659,"code"),e(660,"file"),n(),e(661," File object for the current operation."),n(),t(662,"pre",54)(663,"code")(664,"span",24),e(665,"{"),n(),e(666,`
uid`),t(667,"span",24),e(668,":"),n(),e(669," "),t(670,"span",25),e(671,"'uid'"),n(),t(672,"span",24),e(673,","),n(),e(674," "),t(675,"span",55),e(676,"// unique identifier"),n(),e(677,`
name`),t(678,"span",24),e(679,":"),n(),e(680," "),t(681,"span",25),e(682,"'xx.png'"),n(),e(683," "),t(684,"span",55),e(685,"// file name"),n(),e(686,`
status`),t(687,"span",24),e(688,":"),n(),e(689," "),t(690,"span",25),e(691,"'done'"),n(),t(692,"span",24),e(693,","),n(),e(694," "),t(695,"span",55),e(696,"// options\uFF1Auploading, done, error, removed"),n(),e(697,`
response`),t(698,"span",24),e(699,":"),n(),e(700," "),t(701,"span",25),e(702,`'{"status": "success"}'`),n(),t(703,"span",24),e(704,","),n(),e(705," "),t(706,"span",55),e(707,"// response from server"),n(),e(708,`
linkProps`),t(709,"span",24),e(710,":"),n(),e(711," "),t(712,"span",25),e(713,`'{"download": "image"}'`),n(),t(714,"span",24),e(715,","),n(),e(716," "),t(717,"span",55),e(718,"// additional html props of file link"),n(),e(719,`
`),t(720,"span",24),e(721,"}"),n()()()(),t(722,"li")(723,"p")(724,"code"),e(725,"fileList"),n(),e(726," current list of files"),n()(),t(727,"li")(728,"p")(729,"code"),e(730,"event"),n(),e(731," response from server, including uploading progress, supported by advanced browsers."),n()()(),t(732,"h4",56)(733,"span"),e(734,"nzCustomRequest"),n(),t(735,"a",57),e(736,"#"),n()(),t(737,"p"),e(738,"Allows for advanced customization by overriding default behavior in "),t(739,"code"),e(740,"HttpClient"),n(),e(741,". Provide your own XMLHttpRequest calls to interface with custom backend processes or interact with AWS S3 service through the "),t(742,"code"),e(743,"aws-sdk"),n(),e(744," package."),n(),t(745,"p")(746,"code"),e(747,"nzCustomRequest"),n(),e(748," callback is passed an object with:"),n(),t(749,"ul")(750,"li")(751,"code"),e(752,"onProgress: (event: { percent: number }): void"),n()(),t(753,"li")(754,"code"),e(755,"onError: (event: Error): void"),n()(),t(756,"li")(757,"code"),e(758,"onSuccess: (body: Object, xhr?: Object): void"),n()(),t(759,"li")(760,"code"),e(761,"data: Object"),n()(),t(762,"li")(763,"code"),e(764,"filename: String"),n()(),t(765,"li")(766,"code"),e(767,"file: File"),n()(),t(768,"li")(769,"code"),e(770,"withCredentials: Boolean"),n()(),t(771,"li")(772,"code"),e(773,"action: String"),n()(),t(774,"li")(775,"code"),e(776,"headers: Object"),n()()(),s(),n()()),i&2&&(r(),d("nzOffsetTop",16),r(),d("nzAffix",!1),r(60),d("nzGutter",16),r(),d("nzXl",12)("nzSpan",24),r(),d("nzId","components-upload-demo-basic")("nzLink","components-upload-demo-basic")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/upload/demo/basic.md"),r(5),d("nzId","components-upload-demo-default-file-list")("nzLink","components-upload-demo-default-file-list")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/upload/demo/default-file-list.md"),r(8),d("nzId","components-upload-demo-file-list")("nzLink","components-upload-demo-file-list")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/upload/demo/file-list.md"),r(15),d("nzId","components-upload-demo-directory")("nzLink","components-upload-demo-directory")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/upload/demo/directory.md"),r(5),d("nzId","components-upload-demo-picture-style")("nzLink","components-upload-demo-picture-style")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/upload/demo/picture-style.md"),r(11),d("nzId","components-upload-demo-transform-file")("nzLink","components-upload-demo-transform-file")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/upload/demo/transform-file.md"),r(8),d("nzXl",12)("nzSpan",24),r(),d("nzId","components-upload-demo-avatar")("nzLink","components-upload-demo-avatar")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/upload/demo/avatar.md"),r(14),d("nzId","components-upload-demo-picture-card")("nzLink","components-upload-demo-picture-card")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/upload/demo/picture-card.md"),r(5),d("nzId","components-upload-demo-drag")("nzLink","components-upload-demo-drag")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/upload/demo/drag.md"),r(10),d("nzId","components-upload-demo-upload-manually")("nzLink","components-upload-demo-upload-manually")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/upload/demo/upload-manually.md"),r(11),d("nzId","components-upload-demo-preview-file")("nzLink","components-upload-demo-preview-file")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/upload/demo/preview-file.md"),r(5),d("nzId","components-upload-demo-upload-with-aliyun-oss")("nzLink","components-upload-demo-upload-with-aliyun-oss")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/upload/demo/upload-with-aliyun-oss.md"))},dependencies:[K,k,X,Y,J,Q,V,q,E,$,ee,te,ne,ie,oe,le,ae,de,me,re,ue],encapsulation:2})}}return a})();var Pe=[{path:"en",component:Ne},{path:"zh",component:we}],gn=Pe;export{gn as default};