6)for(P=a[t-7],W=17,M=0;M<6;M++)for(B=0;B<3;B++,W--)1&(W>11?t>>W-12:P>>W)?(p[5-M+e*(2-B+e-11)]=1,p[2-B+e-11+e*(5-M)]=1):(x(5-M,2-B+e-11),x(2-B+e-11,5-M));for(B=0;B 6)for(P=a[t-7],W=17,M=0;M<6;M++)for(B=0;B<3;B++,W--)1&(W>11?t>>W-12:P>>W)?(p[5-M+e*(2-B+e-11)]=1,p[2-B+e-11+e*(5-M)]=1):(b(5-M,2-B+e-11),b(2-B+e-11,5-M));for(B=0;B 测试测试=s)&&(a=e.width/i.width);var f=i.width*a,l=i.height*a,d=r||[],u=d[0],p=d[1],g=O(u)?W(u,e.width):(e.width-f)*(P(u)?W(u,1):{left:0,center:.5,right:1}[u||"center"]),v=O(p)?W(p,e.height):(e.height-l)*(P(p)?W(p,1):{top:0,center:.5,bottom:1}[p||"center"]),y=function(t,e){return[(t-g)/a,(e-v)/a]},x=y(0,0),b=x[0],w=x[1],m=y(e.width,e.height),S=m[0],z=m[1],I=Math.max,M=Math.min;return{sx:I(b,0),sy:I(w,0),sw:M(S-b,i.width),sh:M(z-w,i.height),dx:I(g,0),dy:I(v,0),dw:M(f,e.width),dh:M(l,e.height)}}({objectFit:u,objectPosition:v},r.contentSize,t),o=i.sx,s=i.sy,a=i.sh,h=i.sw,c=i.dx,f=i.dy,l=i.dh,d=i.dw;I==n.MP_BAIDU?e.drawImage(t.src,c+m,f+S,d,l,o,s,h,a):e.drawImage(t.src,o,s,h,a,c+m,f+S,d,l)}else e.drawImage(t.src,m,S,b,w)},B=function(){e.restore(),L.drawView(r,o,!1,!0,!1),h(1)},T=function(t){k(t),B()},T(t),[2]}))}))}))];case 1:return h.sent(),[2]}}))}))},r.prototype.drawText=function(t,e,i,n){var r=this,o=this.ctx,s=e.borderSize,a=e.contentSize,h=e.left,c=e.top,f=a.width,l=a.height,d=a.left-s.left||0,u=a.top-s.top||0,p=i.color,g=i.lineHeight,v=i.fontSize,y=i.fontWeight,x=i.fontFamily,b=i.fontStyle,w=i.textIndent,m=void 0===w?0:w,S=i.textAlign,z=i.textStroke,I=i.verticalAlign,M=void 0===I?St:I,k=i.backgroundColor,P=i.lineClamp,O=i.backgroundClip,T=i.textShadow,L=i.textDecoration;if(m=B(m)?m:0,this.drawView(e,i,O!=xt),g=W(g,v),t){o.save(),h+=d,c+=u;var R=n.fontHeight,F=n.descent,A=void 0===F?0:F,j=n.ascent,E=A+(void 0===j?0:j);switch(o.setFonts({fontFamily:x,fontSize:v,fontWeight:y,fontStyle:b}),o.setTextBaseline(St),o.setTextAlign(S),O?this.setBackground(k,f,l,h,c):o.setFillStyle(p),S){case It:break;case Mt:h+=.5*f;break;case kt:h+=f}var C=n.lines*g,H=Math.ceil((l-C)/2);switch(H<0&&(H=0),M){case mt:break;case St:c+=H;break;case zt:c+=2*H}var D=(g-R)/2,$=g/2,Y=function(t){var e=o.measureText(t),i=e.actualBoundingBoxDescent,n=void 0===i?0:i,r=e.actualBoundingBoxAscent;return M==mt?{fix:E?void 0===r?0:r:$-D/2,lineY:E?0:D-D/2}:M==St?{fix:E?$+n/4:$,lineY:E?0:D}:M==zt?{fix:E?g-n:$+D/2,lineY:E?2*D:D+D/2}:{fix:0,height:0,lineY:0}},U=function(t,e,i){var r=t;switch(S){case It:r+=i;break;case Mt:r=(t-=i/2)+i;break;case kt:r=t,t-=i}if(L){o.setLineWidth(v/13),o.beginPath();var s=.1*n.fontHeight;/\bunderline\b/.test(L)&&(o.moveTo(t,e+n.fontHeight+s),o.lineTo(r,e+n.fontHeight+s)),/\boverline\b/.test(L)&&(o.moveTo(t,e-s),o.lineTo(r,e-s)),/\bline-through\b/.test(L)&&(o.moveTo(t,e+.5*n.fontHeight),o.lineTo(r,e+.5*n.fontHeight)),o.closePath(),o.setStrokeStyle(p),o.stroke()}},N=function(t,e,i){var n=function(){o.setLineWidth(z.width),o.setStrokeStyle(z.color),o.strokeText(t,e,i)},s="outset";z&&z.type!==s?(o.save(),r.setShadow({boxShadow:T}),o.fillText(t,e,i),o.restore(),n()):z&&z.type==s?(o.save(),r.setShadow({boxShadow:T}),n(),o.restore(),o.save(),o.fillText(t,e,i),o.restore()):(r.setShadow({boxShadow:T}),o.fillText(t,e,i))};if(!n.widths||1==n.widths.length&&n.widths[0].total+m<=a.width){var X=Y(t),_=X.fix,q=void 0===_?0:_,G=X.lineY;return N(t,h+m,c+q),U(h+m,c+G,n&&n.widths&&n.widths[0].total||n.text),c+=g,o.restore(),void this.setBorder(e,i)}for(var V=c,J=h,Q="",Z=0,K=o.measureText("...").width,tt=n.widths,et=0;et=s)&&(h=e.width/i.width);var d=i.width*h,c=i.height*h,f=r||[],u=f[0],p=f[1],g=O(u)?k(u,e.width):(e.width-d)*(P(u)?k(u,1):{left:0,center:.5,right:1}[u||"center"]),v=O(p)?k(p,e.height):(e.height-c)*(P(p)?k(p,1):{top:0,center:.5,bottom:1}[p||"center"]),y=function(t,e){return[(t-g)/h,(e-v)/h]},x=y(0,0),b=x[0],w=x[1],m=y(e.width,e.height),S=m[0],z=m[1],I=Math.max,M=Math.min;return{sx:I(b,0),sy:I(w,0),sw:M(S-b,i.width),sh:M(z-w,i.height),dx:I(g,0),dy:I(v,0),dw:M(d,e.width),dh:M(c,e.height)}}({objectFit:u,objectPosition:v},r.contentSize,t),o=i.sx,s=i.sy,h=i.sh,a=i.sw,l=i.dx,d=i.dy,c=i.dh,f=i.dw;I==n.MP_BAIDU?e.drawImage(t.src,l+m,d+S,f,c,o,s,a,h):e.drawImage(t.src,o,s,a,h,l+m,d+S,f,c)}else e.drawImage(t.src,m,S,b,w)},W=function(){e.restore(),L.drawView(r,o,!1,!0,!1),a(1)},T=function(t){B(t),W()},T(t),[2]}))}))}))];case 1:return a.sent(),[2]}}))}))},r.prototype.drawText=function(t,e,i,n){var r=this,o=this.ctx,s=e.borderSize,h=e.contentSize,a=e.left,l=e.top,d=h.width,c=h.height,f=h.left-s.left||0,u=h.top-s.top||0,p=i.color,g=i.lineHeight,v=i.fontSize,y=i.fontWeight,x=i.fontFamily,b=i.fontStyle,w=i.textIndent,m=void 0===w?0:w,S=i.textAlign,z=i.textStroke,I=i.verticalAlign,M=void 0===I?mt:I,B=i.backgroundColor,P=i.lineClamp,O=i.backgroundClip,T=i.textShadow,L=i.textDecoration;if(m=W(m)?m:0,this.drawView(e,i,O!=yt),g=k(g,v),t){o.save(),a+=f,l+=u;var R=n.fontHeight,F=n.descent,A=void 0===F?0:F,j=n.ascent,E=A+(void 0===j?0:j);switch(o.setFonts({fontFamily:x,fontSize:v,fontWeight:y,fontStyle:b}),o.setTextBaseline(mt),o.setTextAlign(S),O?this.setBackground(B,d,c,a,l):o.setFillStyle(p),S){case zt:break;case It:a+=.5*d;break;case Mt:a+=d}var H=n.lines*g,C=Math.ceil((c-H)/2);switch(C<0&&(C=0),M){case wt:break;case mt:l+=C;break;case St:l+=2*C}var D=(g-R)/2,$=g/2,Y=function(t){var e=o.measureText(t),i=e.actualBoundingBoxDescent,n=void 0===i?0:i,r=e.actualBoundingBoxAscent;return M==wt?{fix:E?void 0===r?0:r:$-D/2,lineY:E?0:D-D/2}:M==mt?{fix:E?$+n/4:$,lineY:E?0:D}:M==St?{fix:E?g-n:$+D/2,lineY:E?2*D:D+D/2}:{fix:0,height:0,lineY:0}},U=function(t,e,i){var r=t;switch(S){case zt:r+=i;break;case It:r=(t-=i/2)+i;break;case Mt:r=t,t-=i}if(L){o.setLineWidth(v/13),o.beginPath();var s=.1*n.fontHeight;/\bunderline\b/.test(L)&&(o.moveTo(t,e+n.fontHeight+s),o.lineTo(r,e+n.fontHeight+s)),/\boverline\b/.test(L)&&(o.moveTo(t,e-s),o.lineTo(r,e-s)),/\bline-through\b/.test(L)&&(o.moveTo(t,e+.5*n.fontHeight),o.lineTo(r,e+.5*n.fontHeight)),o.closePath(),o.setStrokeStyle(p),o.stroke()}},N=function(t,e,i){var n=function(){o.setLineWidth(z.width),o.setStrokeStyle(z.color),o.strokeText(t,e,i)},s="outset";z&&z.type!==s?(o.save(),r.setShadow({boxShadow:T}),o.fillText(t,e,i),o.restore(),n()):z&&z.type==s?(o.save(),r.setShadow({boxShadow:T}),n(),o.restore(),o.save(),o.fillText(t,e,i),o.restore()):(r.setShadow({boxShadow:T}),o.fillText(t,e,i))};if(!n.widths||1==n.widths.length&&n.widths[0].total+m<=h.width){var X=Y(t),_=X.fix,q=void 0===_?0:_,G=X.lineY;return N(t,a+m,l+q),U(a+m,l+G,n&&n.widths&&n.widths[0].total||n.text),l+=g,o.restore(),void this.setBorder(e,i)}for(var V=l,J=a,Q="",Z=0,K=o.measureText("...").width,tt=n.widths,et=0;et=s)&&(a=e.width/i.width);var f=i.width*a,d=i.height*a,l=r||[],u=l[0],p=l[1],g=N(u)?Y(u,e.width):(e.width-f)*(U(u)?Y(u,1):{left:0,center:.5,right:1}[u||"center"]),v=N(p)?Y(p,e.height):(e.height-d)*(U(p)?Y(p,1):{top:0,center:.5,bottom:1}[p||"center"]),y=function(t,e){return[(t-g)/a,(e-v)/a]},b=y(0,0),x=b[0],w=b[1],m=y(e.width,e.height),S=m[0],z=m[1],I=Math.max,M=Math.min;return{sx:I(x,0),sy:I(w,0),sw:M(S-x,i.width),sh:M(z-w,i.height),dx:I(g,0),dy:I(v,0),dw:M(f,e.width),dh:M(d,e.height)}}({objectFit:u,objectPosition:v},e.contentSize,t),o=n.sx,s=n.sy,a=n.sh,h=n.sw,c=n.dx,f=n.dy,d=n.dh,l=n.dw;C==r.MP_BAIDU?i.drawImage(t.src,c+m,f+S,l,d,o,s,h,a):i.drawImage(t.src,o,s,h,a,c+m,f+S,l,d)}else i.drawImage(t.src,m,S,x,w)},k=function(){i.restore(),W.drawView(e,o,!1,!0,!1),h(1)},B=function(t){M(t),k()},B(t),[2]}))}))}))];case 1:return h.sent(),[2]}}))}))},t.prototype.drawText=function(t,e,i,n){var r=this,o=this.ctx,s=e.borderSize,a=e.contentSize,h=e.left,c=e.top,f=a.width,d=a.height,l=a.left-s.left||0,u=a.top-s.top||0,p=i.color,g=i.lineHeight,v=i.fontSize,y=i.fontWeight,b=i.fontFamily,x=i.fontStyle,w=i.textIndent,m=void 0===w?0:w,S=i.textAlign,z=i.textStroke,I=i.verticalAlign,M=void 0===I?Ct:I,k=i.backgroundColor,B=i.lineClamp,W=i.backgroundClip,P=i.textShadow,O=i.textDecoration;if(m=$(m)?m:0,this.drawView(e,i,W!=Ft),g=Y(g,v),t){o.save(),h+=l,c+=u;var T=n.fontHeight,L=n.descent,R=void 0===L?0:L,F=n.ascent,A=R+(void 0===F?0:F);switch(o.setFonts({fontFamily:b,fontSize:v,fontWeight:y,fontStyle:x}),o.setTextBaseline(Ct),o.setTextAlign(S),W?this.setBackground(k,f,d,h,c):o.setFillStyle(p),S){case Dt:break;case $t:h+=.5*f;break;case Yt:h+=f}var E=n.lines*g,j=Math.ceil((d-E)/2);switch(j<0&&(j=0),M){case jt:break;case Ct:c+=j;break;case Ht:c+=2*j}var C=(g-T)/2,H=g/2,D=function(t){var e=o.measureText(t),i=e.actualBoundingBoxDescent,n=void 0===i?0:i,r=e.actualBoundingBoxAscent;return M==jt?{fix:A?void 0===r?0:r:H-C/2,lineY:A?0:C-C/2}:M==Ct?{fix:A?H+n/4:H,lineY:A?0:C}:M==Ht?{fix:A?g-n:H+C/2,lineY:A?2*C:C+C/2}:{fix:0,height:0,lineY:0}},U=function(t,e,i){var r=t;switch(S){case Dt:r+=i;break;case $t:r=(t-=i/2)+i;break;case Yt:r=t,t-=i}if(O){o.setLineWidth(v/13),o.beginPath();var s=.1*n.fontHeight;/\bunderline\b/.test(O)&&(o.moveTo(t,e+n.fontHeight+s),o.lineTo(r,e+n.fontHeight+s)),/\boverline\b/.test(O)&&(o.moveTo(t,e-s),o.lineTo(r,e-s)),/\bline-through\b/.test(O)&&(o.moveTo(t,e+.5*n.fontHeight),o.lineTo(r,e+.5*n.fontHeight)),o.closePath(),o.setStrokeStyle(p),o.stroke()}},N=function(t,e,i){var n=function(){o.setLineWidth(z.width),o.setStrokeStyle(z.color),o.strokeText(t,e,i)},s="outset";z&&z.type!==s?(o.save(),r.setShadow({boxShadow:P}),o.fillText(t,e,i),o.restore(),n()):z&&z.type==s?(o.save(),r.setShadow({boxShadow:P}),n(),o.restore(),o.save(),o.fillText(t,e,i),o.restore()):(r.setShadow({boxShadow:P}),o.fillText(t,e,i))};if(!n.widths||1==n.widths.length&&n.widths[0].total+m<=a.width){var _=D(t),X=_.fix,q=void 0===X?0:X,G=_.lineY;return N(t,h+m,c+q),U(h+m,c+G,n&&n.widths&&n.widths[0].total||n.text),c+=g,o.restore(),void this.setBorder(e,i)}for(var V=c,J=h,Q="",Z=0,K=o.measureText("...").width,tt=n.widths,et=0;et
`
-- 4、发生保存图片倾斜变形或提示 native buffer exceed size limit 时,使用 pixel-ratio="2"参数,降分辨率。
-- 5、h5 保存图片不需要调接口,提示用户长按图片保存。
-- 6、画板不能隐藏,包括`v-if`,`v-show`、`display:none`、`opacity:0`,另外也不要把画板放在弹窗里。如果需要隐藏画板请设置 `custom-style="position: fixed; left: 200%"`
-- 7、微信小程序真机调试请使用 **真机调试2.0**,不支持1.0。
-- 8、微信小程序打开调试时可以生但并闭无法生成时,这种情况一般是没有在公众号配置download域名
-- 9、HBX 3.4.5之前的版本不支持vue3
-- 10、在微信开发工具上 canvas 层级最高无法zindex,并不影响真机
-- 11、请不要导入非uni_modules插件
-- 12、关于QQ小程序 报 Propertyor method"toJSON"is not defined 请把基础库调到 1.50.3
-- 13、支付宝小程序 IDE 不支持 生成图片 请以真机调试结果为准
-- 14、返回值为字符串 `data:,` 大概是尺寸超过限制,设置 pixel-ratio="2"
-- 华为手机 APP 上无法生成图片,请使用 HBX2.9.11++(已过时,忽略这条)
-- IOS APP 请勿使用 HBX2.9.3.20201014 的版本!这个版本无法生成图片。(已过时,忽略这条)
-- 苹果微信 7.0.20 存在闪退和图片无法 onload 为微信 bug(已过时,忽略这条)
-- 微信小程序 IOS 旧接口 如父级设置圆角,子级也设会导致子级的失效,为旧接口BUG。
-- 微信小程序 安卓 旧接口 如使用图片必须加背景色,为旧接口BUG。
-- 微信小程序 安卓端 [图片可能在首次可以加载成功,再次加载会不触发任何事件](https://developers.weixin.qq.com/community/develop/doc/000ee2b8dacf4009337f51f4556800?highLine=canvas%25202d%2520createImage),临时解决方法是给图片加个时间戳
-## 打赏
-
-如果你觉得本插件,解决了你的问题,赠人玫瑰,手留余香。
-
-
-
\ No newline at end of file
diff --git a/uni_modules/liu-poster/package.json b/uni_modules/liu-poster/package.json
index 8f253d3..b12db7c 100644
--- a/uni_modules/liu-poster/package.json
+++ b/uni_modules/liu-poster/package.json
@@ -1,85 +1,100 @@
{
- "id": "liu-poster",
- "displayName": "canvas海报画板、海报生成、海报图",
- "version": "1.1.0",
- "description": "canvas海报画板、海报生成、海报图组件,配置简单,支持绘制背景色、绘制图片、绘制文本、绘制线条,自由生成海报图片",
- "keywords": [
- "海报",
- "生成海报",
- "canvas",
- "图片合成",
- "图片处理"
- ],
- "repository": "",
- "engines": {
- "HBuilderX": "^3.1.0"
- },
- "dcloudext": {
- "type": "component-vue",
- "sale": {
- "regular": {
- "price": "0.00"
- },
- "sourcecode": {
- "price": "0.00"
- }
- },
- "contact": {
- "qq": ""
- },
- "declaration": {
- "ads": "无",
- "data": "无",
- "permissions": "无"
- },
- "npmurl": ""
- },
- "uni_modules": {
- "dependencies": [],
- "encrypt": [],
- "platforms": {
- "cloud": {
- "tcb": "y",
- "aliyun": "y"
- },
- "client": {
- "Vue": {
- "vue2": "y",
- "vue3": "u"
- },
- "App": {
- "app-vue": "u",
- "app-nvue": "u"
- },
- "H5-mobile": {
- "Safari": "y",
- "Android Browser": "y",
- "微信浏览器(Android)": "y",
- "QQ浏览器(Android)": "y"
- },
- "H5-pc": {
- "Chrome": "u",
- "IE": "u",
- "Edge": "u",
- "Firefox": "u",
- "Safari": "u"
- },
- "小程序": {
- "微信": "y",
- "阿里": "u",
- "百度": "u",
- "字节跳动": "u",
- "QQ": "u",
- "钉钉": "u",
- "快手": "u",
- "飞书": "u",
- "京东": "u"
- },
- "快应用": {
- "华为": "u",
- "联盟": "u"
- }
- }
- }
- }
+ "id": "liu-poster",
+ "displayName": "canvas海报画板、海报生成、海报图",
+ "version": "1.1.0",
+ "description": "canvas海报画板、海报生成、海报图组件,配置简单,支持绘制背景色、绘制图片、绘制文本、绘制线条,自由生成海报图片",
+ "keywords": [
+ "海报",
+ "生成海报",
+ "canvas",
+ "图片合成",
+ "图片处理"
+ ],
+ "repository": "",
+ "engines": {
+ "HBuilderX": "^3.1.0",
+ "uni-app": "^3.1.0",
+ "uni-app-x": "^3.1.0"
+ },
+ "dcloudext": {
+ "type": "component-vue",
+ "sale": {
+ "regular": {
+ "price": "0.00"
+ },
+ "sourcecode": {
+ "price": "0.00"
+ }
+ },
+ "contact": {
+ "qq": ""
+ },
+ "declaration": {
+ "ads": "无",
+ "data": "无",
+ "permissions": "无"
+ },
+ "npmurl": "",
+ "darkmode": "-",
+ "i18n": "-",
+ "widescreen": "-"
+ },
+ "uni_modules": {
+ "dependencies": [],
+ "encrypt": [],
+ "platforms": {
+ "cloud": {
+ "tcb": "√",
+ "aliyun": "√"
+ },
+ "client": {
+ "uni-app": {
+ "vue": {
+ "vue2": "-",
+ "vue3": "-"
+ },
+ "web": {
+ "safari": "-",
+ "chrome": "-"
+ },
+ "app": {
+ "vue": "-",
+ "nvue": "-",
+ "android": "-",
+ "ios": "-",
+ "harmony": "-"
+ },
+ "mp": {
+ "weixin": "-",
+ "alipay": "-",
+ "toutiao": "-",
+ "baidu": "-",
+ "kuaishou": "-",
+ "jd": "-",
+ "harmony": "-",
+ "qq": "-",
+ "lark": "-"
+ },
+ "quickapp": {
+ "huawei": "-",
+ "union": "-"
+ }
+ },
+ "uni-app-x": {
+ "web": {
+ "safari": "-",
+ "chrome": "-"
+ },
+ "app": {
+ "android": "-",
+ "ios": "-",
+ "harmony": "-"
+ },
+ "mp": {
+ "weixin": "-"
+ }
+ }
+ }
+ }
+ }
}
\ No newline at end of file
diff --git a/uni_modules/lsj-upload/changelog.md b/uni_modules/lsj-upload/changelog.md
deleted file mode 100644
index 600720d..0000000
--- a/uni_modules/lsj-upload/changelog.md
+++ /dev/null
@@ -1,92 +0,0 @@
-## 2.1.9(2022-07-13)
-[修复] app端选择文件后初始化设置的文件列表被清空问题
-## 2.1.8(2022-07-13)
-[新增] ref方法初始化文件列表,用于已提交后再次编辑时需带入已上传文件:setFiles(files),可传入数组或Map对象,传入格式请与组件选择返回格式保持一致,且name为必须属性。
-## 2.1.7(2022-07-12)
-修复ios端偶现创建webview初始化参数未生效的问题
-## 2.1.6(2022-07-11)
-[修复]:修复上个版本更新导致nvue窗口组件不能选择文件的问题;
-[新增]:
-1.应群友建议(填写禁止格式太多)格式限制formats由原来填写禁止选择的格式改为填写允许被选择的格式;
-2.应群友建议(增加上传结束回调事件),上传结束回调事件@uploadEnd
-3.如能帮到你请留下你的免费好评,组件使用过程中有问题可以加QQ群交流,至于Map对象怎么使用这类前端基础问题请自行百度
-## 2.1.5(2022-07-01)
-app端组件销毁时添加自动销毁webview功能,避免v-if销毁组件的情况控件还能被点击的问题
-## 2.1.4(2022-07-01)
-修复小程序端回显问题
-## 2.1.3(2022-06-30)
-回调事件返回参数新增path字段(文件临时地址),用于回显
-## 2.1.2(2022-06-16)
-修复APP端Tabbar窗口无法选择文件的问题
-## 2.1.1(2022-06-16)
-优化:
-1.组件优化为允许在v-if中使用;
-2.允许option直接在data赋值,不再强制在onRead中初始化;
-## 2.1.0(2022-06-13)
-h5 pc端更改为单次可多选
-## 2.0.9(2022-06-10)
-更新演示内容,部分同学不知道怎么获取服务端返回的数据
-## 2.0.8(2022-06-09)
-优化动态更新上传参数函数,具体查看下方说明:动态更新参数演示
-## 2.0.7(2022-06-07)
-新增wxFileType属性,用于小程序端选择附件时可选文件类型
-## 2.0.6(2022-06-07)
-修复小程序端真机选择文件提示失败的问题
-## 2.0.5(2022-06-02)
-优化小程序端调用hide()后未阻止触发文件选择问题
-## 2.0.4(2022-06-01)
-优化APP端选择器初始定位
-## 2.0.3(2022-05-31)
-修复nvue窗口选择文件报错问题
-## 2.0.2(2022-05-20)
-修复ios端opiton设置过早未传入webview导致不自动上传问题
-## 2.0.1(2022-05-19)
-修复APP端子窗口点击选择文件不响应问题
-## 2.0.0(2022-05-18)
-此次组件更新至2.0版本,与1.0版本使用上略有差异,已使用1.0的同学请自行斟酌是否需要升级!
-部分差异:
-一、 2.0新增异步触发上传功能;
-二、2.0新增文件批量上传功能;
-三、2.0优化option,剔除属性,只保留上传接口所需字段,且允许异步更改option的值;
-四、组件增加size(文件大小限制)、count(文件个数限制)、formats(文件后缀限制)、accept(文件类型限制)、instantly(是否立即自动上传)、debug(日志打印)等属性;
-五、回调事件取消input事件、callback事件,新增change事件和progress事件;
-六、ref事件新增upload事件、clear事件;
-七、优化组件代码,show和hide函数改为显示隐藏,不再重复开关webview;
-
-## 1.2.3(2022-03-22)
-修复Demo里传入待完善功能[手动上传属性manual=true]导致不自动上传的问题,手动提交上传待下个版本更新
-## 1.2.2(2022-02-21)
-修复上版本APP优化导致H5和小程序端不自动初始化的问题,此次更新仅修复此问题。异步提交功能下个版本更新~
-## 1.2.1(2022-01-25)
-QQ1群已满,已开放2群:469580165
-## 1.2.0(2021-12-09)
-优化APP端页面中DOM重排后每次需要重新定位的问题
-## 1.1.1(2021-12-09)
-优化,与上版本使用方式有改变,请检查后确认是否需要更新,create更名为show, close更名为hide,取消初始化时手动create, 传参方式改为props=>option
-## 1.1.0(2021-12-09)
-新增refresh方法,用于DOM发生重排时重新定位控件(APP端)
-## 1.0.9(2021-07-15)
-修复上传进度未同步渲染,直接返回100%的BUG
-## 1.0.8(2021-07-12)
-修复H5端传入height和width未生效的bug
-## 1.0.7(2021-07-07)
-修复h5和小程序端上传完成callback未返回fileName字段问题
-## 1.0.6(2021-07-07)
-修复h5端提示信息debug
-## 1.0.5(2021-06-29)
-感谢小伙伴找出bug,上传成功回调success未置为true,已修复
-## 1.0.4(2021-06-28)
-新增兼容APP,H5,小程序手动关闭控件,关闭后不再弹出文件选择框,需要重新create再次开启
-## 1.0.3(2021-06-28)
-close增加条件编译,除app端外不需要close
-## 1.0.2(2021-06-28)
-1.修复页面滚动位置后再create控件导致控件位置不正确的问题;
-2.修复nvue无法create控件;
-3.示例项目新增nvue使用案例;
-## 1.0.1(2021-06-28)
-因为有的朋友不清楚app端切换tab时应该怎么处理webview,现重新上传一版示例项目,需要做tab切换的朋友可以导入示例项目查看
-## 1.0.0(2021-06-25)
-此插件为l-file插件中上传功能改版,更新内容为:
-1. 按钮内嵌入页面,不再强制固定底部,可跟随页面滚动
-2.无需再单独弹框点击上传,减去中间层
-3.通过slot自定义按钮样式
diff --git a/uni_modules/lsj-upload/components/lsj-upload/LsjFile.js b/uni_modules/lsj-upload/components/lsj-upload/LsjFile.js
deleted file mode 100644
index 3e8ac97..0000000
--- a/uni_modules/lsj-upload/components/lsj-upload/LsjFile.js
+++ /dev/null
@@ -1,392 +0,0 @@
-export class LsjFile {
- constructor(data) {
- this.dom = null;
- // files.type = waiting(等待上传)|| loading(上传中)|| success(成功) || fail(失败)
- this.files = new Map();
- this.debug = data.debug || false;
- this.id = data.id;
- this.width = data.width;
- this.height = data.height;
- this.option = data.option;
- this.instantly = data.instantly;
- this.prohibited = data.prohibited;
- this.onchange = data.onchange;
- this.onprogress = data.onprogress;
- this.uploadHandle = this._uploadHandle;
- // #ifdef MP-WEIXIN
- this.uploadHandle = this._uploadHandleWX;
- // #endif
- }
-
-
- /**
- * 创建File节点
- * @param {string}path webview地址
- */
- create(path) {
- if (!this.dom) {
- // #ifdef H5
- let dom = document.createElement('input');
- dom.type = 'file'
- dom.value = ''
- dom.style.height = this.height
- dom.style.width = this.width
- dom.style.position = 'absolute'
- dom.style.top = 0
- dom.style.left = 0
- dom.style.right = 0
- dom.style.bottom = 0
- dom.style.opacity = 0
- dom.style.zIndex = 999
- dom.accept = this.prohibited.accept;
- if (this.prohibited.count > 1) {
- dom.multiple = 'multiple';
- }
- dom.onchange = event => {
- for (let file of event.target.files) {
- this.addFile(file);
- }
- this.dom.value = '';
- };
- this.dom = dom;
- // #endif
-
- // #ifdef APP-PLUS
- let styles = {
- top: '-500px',
- left: 0,
- width: '1px',
- height: '1px',
- background: 'transparent'
- };
- let extras = {
- debug: this.debug,
- instantly: this.instantly,
- prohibited: this.prohibited,
- }
- this.dom = plus.webview.create(path, this.id, styles,extras);
- this.setData(this.option);
- this._overrideUrlLoading();
- // #endif
- return this.dom;
- }
- }
-
- copyObject(obj) {
- if (typeof obj !== "undefined") {
- return JSON.parse(JSON.stringify(obj));
- } else {
- return obj;
- }
- }
-
- /**
- * 自动根据字符串路径设置对象中的值 支持.和[]
- * @param {Object} dataObj 数据源
- * @param {String} name 支持a.b 和 a[b]
- * @param {String} value 值
- * setValue(dataObj, name, value);
- */
- setValue(dataObj, name, value) {
- // 通过正则表达式 查找路径数据
- let dataValue;
- if (typeof value === "object") {
- dataValue = this.copyObject(value);
- } else {
- dataValue = value;
- }
- let regExp = new RegExp("([\\w$]+)|\\[(:\\d)\\]", "g");
- const patten = name.match(regExp);
- // 遍历路径 逐级查找 最后一级用于直接赋值
- for (let i = 0; i < patten.length - 1; i++) {
- let keyName = patten[i];
- if (typeof dataObj[keyName] !== "object") dataObj[keyName] = {};
- dataObj = dataObj[keyName];
- }
- // 最后一级
- dataObj[patten[patten.length - 1]] = dataValue;
- this.debug&&console.log('参数更新后',JSON.stringify(this.option));
- }
-
- /**
- * 设置上传参数
- * @param {object|string}name 上传参数,支持a.b 和 a[b]
- */
- setData() {
- let [name,value = ''] = arguments;
- if (typeof name === 'object') {
- Object.assign(this.option,name);
- }
- else {
- this.setValue(this.option,name,value);
- }
-
- this.debug&&console.log(JSON.stringify(this.option));
-
- // #ifdef APP-PLUS
- this.dom.evalJS(`vm.setData('${JSON.stringify(this.option)}')`);
- // #endif
- }
-
- /**
- * 上传
- * @param {string}name 文件名称
- */
- async upload(name='') {
- if (!this.option.url) {
- throw Error('未设置上传地址');
- }
-
- // #ifndef APP-PLUS
- if (name && this.files.has(name)) {
- await this.uploadHandle(this.files.get(name));
- }
- else {
- for (let item of this.files.values()) {
- if (item.type === 'waiting' || item.type === 'fail') {
- await this.uploadHandle(item);
- }
- }
- }
- // #endif
-
- // #ifdef APP-PLUS
- this.dom&&this.dom.evalJS(`vm.upload('${name}')`);
- // #endif
- }
-
- // 选择文件change
- addFile(file) {
-
- let name = file.name;
- this.debug&&console.log('文件名称',name,'大小',file.size);
-
- if (file) {
- // 限制文件格式
- let path = '';
- let suffix = name.substring(name.lastIndexOf(".")+1).toLowerCase();
- let formats = this.prohibited.formats.toLowerCase();
- if (formats&&!formats.includes(suffix)) {
- this.toast(`不支持上传${suffix.toUpperCase()}格式文件`);
- return false;
- }
- // 限制文件大小
- if (file.size > 1024 * 1024 * Math.abs(this.prohibited.size)) {
- this.toast(`附件大小请勿超过${this.prohibited.size}M`)
- return false;
- }
- // #ifndef MP-WEIXIN
- path = URL.createObjectURL(file);
- // #endif
- // #ifdef MP-WEIXIN
- path = file.path;
- // #endif
- this.files.set(file.name,{file,path,name: file.name,size: file.size,progress: 0,type: 'waiting'});
-
- // #ifndef MP-WEIXIN
- this.onchange(this.files);
- this.instantly&&this.upload();
- // #endif
-
- // #ifdef MP-WEIXIN
- return true;
- // #endif
- }
- }
-
- /**
- * 移除文件
- * @param {string}name 不传name默认移除所有文件,传入name移除指定name的文件
- */
- clear(name='') {
- // #ifdef APP-PLUS
- this.dom&&this.dom.evalJS(`vm.clear('${name}')`);
- // #endif
-
- if (!name) {
- this.files.clear();
- }
- else {
- this.files.delete(name);
- }
- return this.onchange(this.files);
- }
-
- /**
- * 提示框
- * @param {string}msg 轻提示内容
- */
- toast(msg) {
- uni.showToast({
- title: msg,
- icon: 'none'
- });
- }
-
- /**
- * 微信小程序选择文件
- * @param {number}count 可选择文件数量
- */
- chooseMessageFile(type,count) {
- wx.chooseMessageFile({
- count: count,
- type: type,
- success: ({ tempFiles }) => {
- for (let file of tempFiles) {
- let next = this.addFile(file);
- if (!next) {return}
- }
- this.onchange(this.files);
- this.instantly&&this.upload();
- },
- fail: () => {
- this.toast(`打开失败`);
- }
- })
- }
-
- _overrideUrlLoading() {
- this.dom.overrideUrlLoading({ mode: 'reject' }, e => {
- let {retype,item,files,end} = this._getRequest(
- e.url
- );
- let _this = this;
- switch (retype) {
- case 'updateOption':
- this.dom.evalJS(`vm.setData('${JSON.stringify(_this.option)}')`);
- break
- case 'change':
- try {
- _this.files = new Map([..._this.files,...JSON.parse(unescape(files))]);
- } catch (e) {
- return console.error('出错了,请检查代码')
- }
- _this.onchange(_this.files);
- break
- case 'progress':
- try {
- item = JSON.parse(unescape(item));
- } catch (e) {
- return console.error('出错了,请检查代码')
- }
- _this._changeFilesItem(item,end);
- break
- default:
- break
- }
- })
- }
-
- _getRequest(url) {
- let theRequest = new Object()
- let index = url.indexOf('?')
- if (index != -1) {
- let str = url.substring(index + 1)
- let strs = str.split('&')
- for (let i = 0; i < strs.length; i++) {
- theRequest[strs[i].split('=')[0]] = unescape(strs[i].split('=')[1])
- }
- }
- return theRequest
- }
-
- _changeFilesItem(item,end=false) {
- this.debug&&console.log('onprogress',JSON.stringify(item));
- this.onprogress(item,end);
- this.files.set(item.name,item);
- }
-
- _uploadHandle(item) {
- item.type = 'loading';
- delete item.responseText;
- return new Promise((resolve,reject)=>{
- this.debug&&console.log('option',JSON.stringify(this.option));
- let {url,name,method='POST',header,formData} = this.option;
- let form = new FormData();
- for (let keys in formData) {
- form.append(keys, formData[keys])
- }
- form.append(name, item.file);
- let xmlRequest = new XMLHttpRequest();
- xmlRequest.open(method, url, true);
- for (let keys in header) {
- xmlRequest.setRequestHeader(keys, header[keys])
- }
-
- xmlRequest.upload.addEventListener(
- 'progress',
- event => {
- if (event.lengthComputable) {
- let progress = Math.ceil((event.loaded * 100) / event.total)
- if (progress <= 100) {
- item.progress = progress;
- this._changeFilesItem(item);
- }
- }
- },
- false
- );
-
- xmlRequest.ontimeout = () => {
- console.error('请求超时')
- item.type = 'fail';
- this._changeFilesItem(item,true);
- return resolve(false);
- }
-
- xmlRequest.onreadystatechange = ev => {
- if (xmlRequest.readyState == 4) {
- if (xmlRequest.status == 200) {
- this.debug&&console.log('上传完成:' + xmlRequest.responseText)
- item['responseText'] = xmlRequest.responseText;
- item.type = 'success';
- this._changeFilesItem(item,true);
- return resolve(true);
- } else if (xmlRequest.status == 0) {
- console.error('status = 0 :请检查请求头Content-Type与服务端是否匹配,服务端已正确开启跨域,并且nginx未拦截阻止请求')
- }
- console.error('--ERROR--:status = ' + xmlRequest.status)
- item.type = 'fail';
- this._changeFilesItem(item,true);
- return resolve(false);
- }
- }
- xmlRequest.send(form)
- });
- }
-
- _uploadHandleWX(item) {
- item.type = 'loading';
- delete item.responseText;
- return new Promise((resolve,reject)=>{
- this.debug&&console.log('option',JSON.stringify(this.option));
- let form = {filePath: item.file.path,...this.option };
- form['fail'] = ({ errMsg = '' }) => {
- console.error('--ERROR--:' + errMsg)
- item.type = 'fail';
- this._changeFilesItem(item,true);
- return resolve(false);
- }
- form['success'] = res => {
- if (res.statusCode == 200) {
- this.debug&&console.log('上传完成,微信端返回不一定是字符串,根据接口返回格式判断是否需要JSON.parse:' + res.data)
- item['responseText'] = res.data;
- item.type = 'success';
- this._changeFilesItem(item,true);
- return resolve(true);
- }
- item.type = 'fail';
- this._changeFilesItem(item,true);
- return resolve(false);
- }
-
- let xmlRequest = uni.uploadFile(form);
- xmlRequest.onProgressUpdate(({ progress = 0 }) => {
- if (progress <= 100) {
- item.progress = progress;
- this._changeFilesItem(item);
- }
- })
- });
- }
-}
\ No newline at end of file
diff --git a/uni_modules/lsj-upload/components/lsj-upload/lsj-upload.vue b/uni_modules/lsj-upload/components/lsj-upload/lsj-upload.vue
deleted file mode 100644
index 876f047..0000000
--- a/uni_modules/lsj-upload/components/lsj-upload/lsj-upload.vue
+++ /dev/null
@@ -1,310 +0,0 @@
-
-
-1?ua[e]=t.constructor===window.HTMLUnknownElement||t.constructor===window.HTMLElement:ua[e]=/HTMLUnknownElement/.test(t.toString())}function Et(e){if("string"==typeof e){var t=document.querySelector(e);return t||document.createElement("div")}return e}function jt(e,t){var n=document.createElement(e);return"select"!==e?n:(t.data&&t.data.attrs&&void 0!==t.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n)}function Nt(e,t){return document.createElementNS(ia[e],t)}function Lt(e){return document.createTextNode(e)}function It(e){return document.createComment(e)}function Dt(e,t,n){e.insertBefore(t,n)}function Mt(e,t){e.removeChild(t)}function Pt(e,t){e.appendChild(t)}function Rt(e){return e.parentNode}function Ft(e){return e.nextSibling}function Bt(e){return e.tagName}function Ht(e,t){e.textContent=t}function Ut(e,t,n){e.setAttribute(t,n)}function Vt(e,t){var n=e.data.ref;if(n){var r=e.context,i=e.componentInstance||e.elm,o=r.$refs;t?Array.isArray(o[n])?l(o[n],i):o[n]===i&&(o[n]=void 0):e.data.refInFor?Array.isArray(o[n])&&o[n].indexOf(i)<0?o[n].push(i):o[n]=[i]:o[n]=i}}function zt(e,n){return e.key===n.key&&e.tag===n.tag&&e.isComment===n.isComment&&t(e.data)===t(n.data)&&Jt(e,n)}function Jt(e,n){if("input"!==e.tag)return!0;var r;return(t(r=e.data)&&t(r=r.attrs)&&r.type)===(t(r=n.data)&&t(r=r.attrs)&&r.type)}function Kt(e,n,r){var i,o,a={};for(i=n;i<=r;++i)o=e[i].key,t(o)&&(a[o]=i);return a}function qt(e,t){(e.data.directives||t.data.directives)&&Wt(e,t)}function Wt(e,t){var n,r,i,o=e===pa,a=t===pa,s=Zt(e.data.directives,e.context),c=Zt(t.data.directives,t.context),u=[],l=[];for(n in c)r=s[n],i=c[n],r?(i.oldValue=r.value,Yt(i,"update",t,e),i.def&&i.def.componentUpdated&&l.push(i)):(Yt(i,"bind",t,e),i.def&&i.def.inserted&&u.push(i));if(u.length){var f=function(){for(var n=0;n
a&&(a=u),n.push(u)}for(var h=0;ha&&(a=d)}return r.y0=o,r.max=a,r}function Bm(t){var e=0;d(t.children,function(t){Bm(t);var i=t.value;y(i)&&(i=i[0]),e+=i});var i=t.value;y(i)&&(i=i[0]),(null==i||isNaN(i))&&(i=e),i<0&&(i=0),y(t.value)?t.value[0]=i:t.value=i}function Vm(t,e,i){function n(){r.ignore=r.hoverIgnore}function o(){r.ignore=r.normalIgnore}tb.call(this);var a=new hM({z2:zP});a.seriesIndex=e.seriesIndex;var r=new rM({z2:BP,silent:t.getModel("label").get("silent")});this.add(a),this.add(r),this.updateData(!0,t,"normal",e,i),this.on("emphasis",n).on("normal",o).on("mouseover",n).on("mouseout",o)}function Gm(t,e,i){var n=t.getVisual("color"),o=t.getVisual("visualMeta");o&&0!==o.length||(n=null);var a=t.getModel("itemStyle").get("color");if(a)return a;if(n)return n;if(0===t.depth)return i.option.color[0];var r=i.option.color.length;return a=i.option.color[Fm(t)%r]}function Fm(t){for(var e=t;e.depth>1;)e=e.parentNode;return l(t.getAncestors()[0].children,e)}function Wm(t,e,i){return i!==RP.NONE&&(i===RP.SELF?t===e:i===RP.ANCESTOR?t===e||t.isAncestorOf(e):t===e||t.isDescendantOf(e))}function Hm(t,e,i){e.getData().setItemVisual(t.dataIndex,"color",i)}function Zm(t,e){var i=t.children||[];t.children=Um(i,e),i.length&&d(t.children,function(t){Zm(t,e)})}function Um(t,e){if("function"==typeof e)return t.sort(e);var i="asc"===e;return t.sort(function(t,e){var n=(t.getValue()-e.getValue())*(i?1:-1);return 0===n?(t.dataIndex-e.dataIndex)*(i?-1:1):n})}function Xm(t,e){return e=e||[0,0],f(["x","y"],function(i,n){var o=this.getAxis(i),a=e[n],r=t[n]/2;return"category"===o.type?o.getBandWidth():Math.abs(o.dataToCoord(a-r)-o.dataToCoord(a+r))},this)}function jm(t,e){return e=e||[0,0],f([0,1],function(i){var n=e[i],o=t[i]/2,a=[],r=[];return a[i]=n-o,r[i]=n+o,a[1-i]=r[1-i]=e[1-i],Math.abs(this.dataToPoint(a)[i]-this.dataToPoint(r)[i])},this)}function Ym(t,e){var i=this.getAxis(),n=e instanceof Array?e[0]:e,o=(t instanceof Array?t[0]:t)/2;return"category"===i.type?i.getBandWidth():Math.abs(i.dataToCoord(n-o)-i.dataToCoord(n+o))}function qm(t,e){return f(["Radius","Angle"],function(i,n){var o=this["get"+i+"Axis"](),a=e[n],r=t[n]/2,s="dataTo"+i,l="category"===o.type?o.getBandWidth():Math.abs(o[s](a-r)-o[s](a+r));return"Angle"===i&&(l=l*Math.PI/180),l},this)}function Km(t){var e,i=t.type;if("path"===i){var n=t.shape,o=null!=n.width&&null!=n.height?{x:n.x||0,y:n.y||0,width:n.width,height:n.height}:null,a=lv(n);(e=Xn(a,null,o,n.layout||"center")).__customPathData=a}else"image"===i?(e=new fi({})).__customImagePath=t.style.image:"text"===i?(e=new rM({})).__customText=t.style.text:e=new(0,zM[i.charAt(0).toUpperCase()+i.slice(1)]);return e.__customGraphicType=i,e.name=t.name,e}function $m(t,e,n,o,a,r,s){var l={},u=n.style||{};if(n.shape&&(l.shape=i(n.shape)),n.position&&(l.position=n.position.slice()),n.scale&&(l.scale=n.scale.slice()),n.origin&&(l.origin=n.origin.slice()),n.rotation&&(l.rotation=n.rotation),"image"===t.type&&n.style){h=l.style={};d(["x","y","width","height"],function(e){Jm(e,h,u,t.style,r)})}if("text"===t.type&&n.style){var h=l.style={};d(["x","y"],function(e){Jm(e,h,u,t.style,r)}),!u.hasOwnProperty("textFill")&&u.fill&&(u.textFill=u.fill),!u.hasOwnProperty("textStroke")&&u.stroke&&(u.textStroke=u.stroke)}if("group"!==t.type&&(t.useStyle(u),r)){t.style.opacity=0;var c=u.opacity;null==c&&(c=1),To(t,{style:{opacity:c}},o,e)}r?t.attr(l):Io(t,l,o,e),n.hasOwnProperty("z2")&&t.attr("z2",n.z2||0),n.hasOwnProperty("silent")&&t.attr("silent",n.silent),n.hasOwnProperty("invisible")&&t.attr("invisible",n.invisible),n.hasOwnProperty("ignore")&&t.attr("ignore",n.ignore),n.hasOwnProperty("info")&&t.attr("info",n.info);var f=n.styleEmphasis,p=!1===f;t.__cusHasEmphStl&&null==f||!t.__cusHasEmphStl&&p||(ro(t,f),t.__cusHasEmphStl=!p),s&&po(t,!p)}function Jm(t,e,i,n,o){null==i[t]||o||(e[t]=i[t],i[t]=n[t])}function Qm(t,e,i,n){function o(t){null==t&&(t=h),v&&(c=e.getItemModel(t),d=c.getModel(UP),f=c.getModel(XP),p=e.getItemVisual(t,"color"),v=!1)}var s=t.get("renderItem"),l=t.coordinateSystem,u={};l&&(u=l.prepareCustoms?l.prepareCustoms():YP[l.type](l));var h,c,d,f,p,g=r({getWidth:n.getWidth,getHeight:n.getHeight,getZr:n.getZr,getDevicePixelRatio:n.getDevicePixelRatio,value:function(t,i){return null==i&&(i=h),e.get(e.getDimension(t||0),i)},style:function(i,n){null==n&&(n=h),o(n);var r=c.getModel(HP).getItemStyle();null!=p&&(r.fill=p);var s=e.getItemVisual(n,"opacity");return null!=s&&(r.opacity=s),mo(r,d,null,{autoColor:p,isRectText:!0}),r.text=d.getShallow("show")?A(t.getFormattedLabel(n,"normal"),_u(e,n)):null,i&&a(r,i),r},styleEmphasis:function(i,n){null==n&&(n=h),o(n);var r=c.getModel(ZP).getItemStyle();return mo(r,f,null,{isRectText:!0},!0),r.text=f.getShallow("show")?D(t.getFormattedLabel(n,"emphasis"),t.getFormattedLabel(n,"normal"),_u(e,n)):null,i&&a(r,i),r},visual:function(t,i){return null==i&&(i=h),e.getItemVisual(i,t)},barLayout:function(t){if(l.getBaseAxis)return Ll(r({axis:l.getBaseAxis()},t),n)},currentSeriesIndices:function(){return i.getCurrentSeriesIndices()},font:function(t){return So(t,i)}},u.api||{}),m={context:{},seriesId:t.id,seriesName:t.name,seriesIndex:t.seriesIndex,coordSys:u.coordSys,dataInsideLength:e.count(),encode:tv(t.getData())},v=!0;return function(t,i){return h=t,v=!0,s&&s(r({dataIndexInside:t,dataIndex:e.getRawIndex(t),actionType:i?i.type:null},m),g)}}function tv(t){var e={};return d(t.dimensions,function(i,n){var o=t.getDimensionInfo(i);if(!o.isExtraCoord){var a=o.coordDim;(e[a]=e[a]||[])[o.coordDimIndex]=n}}),e}function ev(t,e,i,n,o,a){return(t=iv(t,e,i,n,o,a,!0))&&a.setItemGraphicEl(e,t),t}function iv(t,e,i,n,o,a,r){var s=!i,l=(i=i||{}).type,u=i.shape,h=i.style;if(t&&(s||null!=l&&l!==t.__customGraphicType||"path"===l&&uv(u)&&lv(u)!==t.__customPathData||"image"===l&&hv(h,"image")&&h.image!==t.__customImagePath||"text"===l&&hv(u,"text")&&h.text!==t.__customText)&&(o.remove(t),t=null),!s){var c=!t;return!t&&(t=Km(i)),$m(t,e,i,n,a,c,r),"group"===l&&nv(t,e,i,n,a),o.add(t),t}}function nv(t,e,i,n,o){var a=i.children,r=a?a.length:0,s=i.$mergeChildren,l="byName"===s||i.diffChildrenByName,u=!1===s;if(r||l||u)if(l)ov({oldChildren:t.children()||[],newChildren:a||[],dataIndex:e,animatableModel:n,group:t,data:o});else{u&&t.removeAll();for(var h=0;h