first commit

This commit is contained in:
编码猿
2024-09-27 02:06:13 +08:00
commit 852d94fbb9
36760 changed files with 3274413 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/lime-painter/index"],{"44af":function(t,e,n){"use strict";n.r(e);var r=n("d173"),a=n("7b5e");for(var i in a)"default"!==i&&function(t){n.d(e,t,(function(){return a[t]}))}(i);var o,c=n("f0c5"),u=Object(c["a"])(a["default"],r["b"],r["c"],!1,null,null,null,!1,r["a"],o);e["default"]=u.exports},5159:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=c(n("4795")),a=n("ed92"),i=n("0981"),o=n("75f7");function c(t){return t&&t.__esModule?t:{default:t}}function u(t,e,n,r,a,i,o){try{var c=t[i](o),u=c.value}catch(s){return void n(s)}c.done?e(u):Promise.resolve(u).then(r,a)}function s(t){return function(){var e=this,n=arguments;return new Promise((function(r,a){var i=t.apply(e,n);function o(t){u(i,r,a,o,c,"next",t)}function c(t){u(i,r,a,o,c,"throw",t)}o(void 0)}))}}var d={name:"l-painter",props:{board:Object,fileType:{type:String,default:"jpg"},pixelRatio:Number,customStyle:String,isRenderImage:Boolean,isH5RenderBlob:Boolean,type:{type:String,default:""}},data:function(){var t="l-painter";return{canvasId:t,use2dCanvas:!1,draw:null,ctx:null}},watch:{board:{handler:function(t){"{}"!==JSON.stringify(t)&&this.render()},immediate:!0,deep:!0}},computed:{style:function(){return"width:".concat(this.boardWidth,"px; height: ").concat(this.boardHeight,"px; ").concat(this.customStyle)},dpr:function(){return this.pixelRatio||wx.getSystemInfoSync().pixelRatio},boardWidth:function(){var t=this.board||{},e=t.width,n=void 0===e?200:e;return(0,a.toPx)(n)},boardHeight:function(){var t=this.board||{},e=t.height,n=void 0===e?200:e;return(0,a.toPx)(n)}},created:function(){},mounted:function(){},methods:{render:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.getContext().then(function(){var n=s(r.default.mark((function n(o){var c,u,s,d,l,f,h,v,p;return r.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(t.ctx||(t.ctx=o),c=t.use2dCanvas,u=t.boardWidth,s=t.boardHeight,d=t.board,l=t.canvas,f=t.isH5RenderBlob,h=e.width,v=e.height,!c||l){n.next=5;break}return n.abrupt("return",Promise.reject(new Error("render: fail canvas has not been created")));case 5:return t.boundary={top:0,left:0,width:u||h,height:s||v},t.ctx.clearRect(0,0,u,s),t.draw||(t.draw=new i.Draw(t.ctx,l,c)),n.next=10,t.draw.drawBoard("{}"!=JSON.stringify(e)?e:d);case 10:if(c){n.next=15;break}return n.next=13,t.canvasDraw(t.ctx,t.isRenderImage);case 13:p=n.sent,p&&t.isRenderImage&&t.canvasToTempFilePath().then((function(e){if(/^data:image\/(\w+);base64/.test(e.tempFilePath)&&f){var n=URL.createObjectURL((0,a.dataURItoBlob)(e.tempFilePath));t.$emit("success",n)}else t.$emit("success",e.tempFilePath)})).catch((function(e){t.$emit("fail",e),new Error(JSON.stringify(e))}));case 15:return n.abrupt("return",Promise.resolve("ok"));case 16:case"end":return n.stop()}}),n)})));return function(t){return n.apply(this,arguments)}}())},canvasDraw:function(t,e){return new Promise((function(n){t.draw(e,(function(){n(!0)}))}))},getContext:function(){var e=this,n=this.type,r=this.dpr,a=this.boardWidth,i=this.boardHeight;if(""===n){var c=t.createCanvasContext(this.canvasId,this);return Promise.resolve(c)}return new Promise((function(c){t.createSelectorQuery().in(e).select("#l-painter").node().exec((function(t){var u=t[0].node,s=u.getContext(n);e.inited||(e.inited=!0,u.width=a*r,u.height=i*r,e.use2dCanvas=!0,e.canvas=u,s.scale(r,r)),c((0,o.adaptor)(s))}))}))},canvasToTempFilePath:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=this.use2dCanvas,a=this.canvasId;return new Promise((function(i,o){var c=e.boundary,u=c.top,s=void 0===u?0:u,d=c.left,l=void 0===d?0:d,f=c.width,h=c.height,v={x:l,y:s,width:f,height:h,destWidth:f*e.dpr,destHeight:h*e.dpr,canvasId:a,fileType:n.fileType||e.fileType||"png",quality:n.quality||1,success:i,fail:o};r&&(delete v.canvasId,v.canvas=e.canvas),t.canvasToTempFilePath(v,e)}))}}};e.default=d}).call(this,n("543d")["default"])},"7b5e":function(t,e,n){"use strict";n.r(e);var r=n("5159"),a=n.n(r);for(var i in r)"default"!==i&&function(t){n.d(e,t,(function(){return r[t]}))}(i);e["default"]=a.a},d173:function(t,e,n){"use strict";var r,a=function(){var t=this,e=t.$createElement;t._self._c},i=[];n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return r}))}}]);
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
'components/lime-painter/index-create-component',
{
'components/lime-painter/index-create-component':(function(module, exports, __webpack_require__){
__webpack_require__('543d')['createComponent'](__webpack_require__("44af"))
})
},
[['components/lime-painter/index-create-component']]
]);

View File

@@ -0,0 +1,4 @@
{
"usingComponents": {},
"component": true
}

View File

@@ -0,0 +1 @@
<canvas style="{{(style)}}" type="{{type}}" id="l-painter" canvas-id="{{canvasId}}"></canvas>

View File

@@ -0,0 +1,10 @@
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/uni-fav/uni-fav"],{"174b":function(n,e,t){},"4aeb":function(n,e,t){"use strict";t.r(e);var o=t("7c91"),c=t.n(o);for(var u in o)"default"!==u&&function(n){t.d(e,n,(function(){return o[n]}))}(u);e["default"]=c.a},"7c91":function(n,e,t){"use strict";(function(n){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=function(){Promise.all([t.e("common/vendor"),t.e("components/uni-icons/uni-icons")]).then(function(){return resolve(t("3bb2"))}.bind(null,t)).catch(t.oe)},c={name:"UniFav",components:{uniIcons:o},props:{star:{type:[Boolean,String],default:!0},bgColor:{type:String,default:"#eeeeee"},fgColor:{type:String,default:"#666666"},bgColorChecked:{type:String,default:"#007aff"},fgColorChecked:{type:String,default:"#FFFFFF"},circle:{type:[Boolean,String],default:!1},checked:{type:Boolean,default:!1},contentText:{type:Object,default:function(){return{contentDefault:"收藏",contentFav:"已收藏"}}}},watch:{checked:function(){n.report&&(this.checked?n.report("收藏","收藏"):n.report("取消收藏","取消收藏"))}},methods:{onClick:function(){this.$emit("click")}}};e.default=c}).call(this,t("543d")["default"])},ab8d:function(n,e,t){"use strict";var o={uniIcons:function(){return Promise.all([t.e("common/vendor"),t.e("components/uni-icons/uni-icons")]).then(t.bind(null,"3bb2"))}},c=function(){var n=this,e=n.$createElement;n._self._c},u=[];t.d(e,"b",(function(){return c})),t.d(e,"c",(function(){return u})),t.d(e,"a",(function(){return o}))},b125:function(n,e,t){"use strict";t.r(e);var o=t("ab8d"),c=t("4aeb");for(var u in c)"default"!==u&&function(n){t.d(e,n,(function(){return c[n]}))}(u);t("e8e8");var r,i=t("f0c5"),a=Object(i["a"])(c["default"],o["b"],o["c"],!1,null,"7e2dcdb6",null,!1,o["a"],r);e["default"]=a.exports},e8e8:function(n,e,t){"use strict";var o=t("174b"),c=t.n(o);c.a}}]);
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
'components/uni-fav/uni-fav-create-component',
{
'components/uni-fav/uni-fav-create-component':(function(module, exports, __webpack_require__){
__webpack_require__('543d')['createComponent'](__webpack_require__("b125"))
})
},
[['components/uni-fav/uni-fav-create-component']]
]);

View File

@@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"uni-icons": "/components/uni-icons/uni-icons"
}
}

View File

@@ -0,0 +1 @@
<view data-event-opts="{{[['tap',[['onClick',['$event']]]]]}}" class="{{['uni-fav data-v-7e2dcdb6',circle===true||circle==='true'?'uni-fav--circle':'']}}" style="{{'background-color:'+(checked?bgColorChecked:bgColor)+';'}}" bindtap="__e"><block wx:if="{{!checked&&(star===true||star==='true')}}"><uni-icons class="uni-fav-star data-v-7e2dcdb6" style="{{'color:'+(checked?fgColorChecked:fgColor)+';'}}" vue-id="040bd878-1" color="{{fgColor}}" size="14" type="star-filled" bind:__l="__l"></uni-icons></block><text class="uni-fav-text data-v-7e2dcdb6" style="{{'color:'+(checked?fgColorChecked:fgColor)+';'}}">{{checked?contentText.contentFav:contentText.contentDefault}}</text></view>

View File

@@ -0,0 +1 @@
.uni-fav.data-v-7e2dcdb6{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;width:60px;height:25px;line-height:25px;text-align:center;border-radius:3px}.uni-fav--circle.data-v-7e2dcdb6{border-radius:30px}.uni-fav-star.data-v-7e2dcdb6{display:-webkit-box;display:-webkit-flex;display:flex;height:25px;line-height:24px;margin-right:3px;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}.uni-fav-text.data-v-7e2dcdb6{display:-webkit-box;display:-webkit-flex;display:flex;height:25px;line-height:25px;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;font-size:28rpx}

View File

@@ -0,0 +1,10 @@
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/uni-icons/uni-icons"],{2507:function(n,t,e){},"3bb2":function(n,t,e){"use strict";e.r(t);var u=e("62bc"),c=e("eeae");for(var r in c)"default"!==r&&function(n){e.d(t,n,(function(){return c[n]}))}(r);e("52e9");var i,a=e("f0c5"),o=Object(a["a"])(c["default"],u["b"],u["c"],!1,null,"72b11afe",null,!1,u["a"],i);t["default"]=o.exports},"52e9":function(n,t,e){"use strict";var u=e("2507"),c=e.n(u);c.a},"62bc":function(n,t,e){"use strict";var u,c=function(){var n=this,t=n.$createElement;n._self._c},r=[];e.d(t,"b",(function(){return c})),e.d(t,"c",(function(){return r})),e.d(t,"a",(function(){return u}))},e800:function(n,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var u=c(e("ce44"));function c(n){return n&&n.__esModule?n:{default:n}}var r={name:"UniIcons",props:{type:{type:String,default:""},color:{type:String,default:"#333333"},size:{type:[Number,String],default:16}},data:function(){return{icons:u.default}},methods:{_onClick:function(){this.$emit("click")}}};t.default=r},eeae:function(n,t,e){"use strict";e.r(t);var u=e("e800"),c=e.n(u);for(var r in u)"default"!==r&&function(n){e.d(t,n,(function(){return u[n]}))}(r);t["default"]=c.a}}]);
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
'components/uni-icons/uni-icons-create-component',
{
'components/uni-icons/uni-icons-create-component':(function(module, exports, __webpack_require__){
__webpack_require__('543d')['createComponent'](__webpack_require__("3bb2"))
})
},
[['components/uni-icons/uni-icons-create-component']]
]);

View File

@@ -0,0 +1,4 @@
{
"usingComponents": {},
"component": true
}

View File

@@ -0,0 +1 @@
<text data-event-opts="{{[['tap',[['_onClick',['$event']]]]]}}" class="uni-icons data-v-72b11afe" style="{{'color:'+(color)+';'+('font-size:'+(size+'px')+';')}}" bindtap="__e">{{icons[type]}}</text>

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,10 @@
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/uni-link/uni-link"],{"0e55":function(t,n,e){"use strict";var u,a=function(){var t=this,n=t.$createElement;t._self._c},i=[];e.d(n,"b",(function(){return a})),e.d(n,"c",(function(){return i})),e.d(n,"a",(function(){return u}))},"4f54":function(t,n,e){},"6cde":function(t,n,e){"use strict";var u=e("4f54"),a=e.n(u);a.a},"9ce7":function(t,n,e){"use strict";e.r(n);var u=e("0e55"),a=e("a88e");for(var i in a)"default"!==i&&function(t){e.d(n,t,(function(){return a[t]}))}(i);e("6cde");var r,o=e("f0c5"),f=Object(o["a"])(a["default"],u["b"],u["c"],!1,null,"1c322b2a",null,!1,u["a"],r);n["default"]=f.exports},a88e:function(t,n,e){"use strict";e.r(n);var u=e("f821"),a=e.n(u);for(var i in u)"default"!==i&&function(t){e.d(n,t,(function(){return u[t]}))}(i);n["default"]=a.a},f821:function(t,n,e){"use strict";(function(t){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var e={name:"uniLink",props:{href:{type:String,default:""},text:{type:String,default:""},showUnderLine:{type:[Boolean,String],default:!0},copyTips:{type:String,default:"已自动复制网址,请在手机浏览器里粘贴该网址"},color:{type:String,default:"#999999"},fontSize:{type:[Number,String],default:14}},methods:{openURL:function(){t.setClipboardData({data:this.href}),t.showModal({content:this.copyTips,showCancel:!1})}}};n.default=e}).call(this,e("543d")["default"])}}]);
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
'components/uni-link/uni-link-create-component',
{
'components/uni-link/uni-link-create-component':(function(module, exports, __webpack_require__){
__webpack_require__('543d')['createComponent'](__webpack_require__("9ce7"))
})
},
[['components/uni-link/uni-link-create-component']]
]);

View File

@@ -0,0 +1,4 @@
{
"usingComponents": {},
"component": true
}

View File

@@ -0,0 +1 @@
<text data-event-opts="{{[['tap',[['openURL',['$event']]]]]}}" class="{{['uni-link data-v-1c322b2a',(showUnderLine===true||showUnderLine==='true')?'uni-link--withline':'']}}" style="{{'color:'+(color)+';'+('font-size:'+(fontSize+'px')+';')}}" bindtap="__e">{{text}}</text>

View File

@@ -0,0 +1 @@
.uni-link--withline.data-v-1c322b2a{text-decoration:underline}