7.3提交

This commit is contained in:
zoujiandong
2025-07-03 13:14:39 +08:00
parent 8f4ee464dc
commit 5a56083d0c
44 changed files with 2003 additions and 485 deletions
+11 -4
View File
@@ -26,8 +26,11 @@ Component({
observer(newval) {
this.setData({
paintSrc: newval
},()=>{
this.initData();
});
this.initData();
},
}
@@ -88,7 +91,7 @@ Component({
r: 33,
g: 33,
b: 33,
selectSize:5,
selectSize:8,
clear: false, // 是否开启清空栏
eraser: false, // 是否开启橡皮擦
saving: false, // 是否在保存状态
@@ -130,6 +133,7 @@ Component({
clear: false, // 是否开启清空栏
eraser: false, // 是否开启橡皮擦
saving: false,
showBars: false
})
},
// save(e){
@@ -138,13 +142,14 @@ Component({
// },
tapBtn: function (e) {
utils.tapBtn(e, this, 2,this.data.paintFrom);
this.hideBarsHandler()
},
showBarsHandler(e) {
//this.tapBtn(e)
this.setData({
showBars: !this.data.showBars,
clear:false,
eraser:false
//eraser:false
})
},
@@ -252,12 +257,14 @@ Component({
this.setData({
eraser: true,
clear: false,
canvasHeightLen: 0
canvasHeightLen: 0,
showBars: false
})
},
changeColor: function (e) {
utils.changeColor(e, this);
this.hideBarsHandler()
},
changeWidth: function (e) {
+4 -2
View File
@@ -10,8 +10,10 @@
<canvas canvas-id="myCanvas" disable-scroll="true" bindtouchstart="touchStart"
bindtouchmove="touchMove" bindtouchend="touchEnd" wx:if="{{hasChoosedImg}}"
style="margin:0 auto;height: {{(canvasHeightLen == 0) ? canvasHeight : canvasHeightLen}}px; width: {{canvasWidth}}px; background: url('{{background}}');background-position: 0 0; background-size: {{canvasWidth}}px {{canvasHeight}}px"
/>
style="position:relative;margin:0 auto;height: {{(canvasHeightLen == 0) ? canvasHeight : canvasHeightLen}}px; width: {{canvasWidth}}px; background: url('{{background}}');background-position: 0 0; background-size: {{canvasWidth}}px {{canvasHeight}}px"
>
<image src="{{background}}" mode="" class="imgcover" wx:if="{{hasChoosedImg}}"/>
</canvas>
<view class="failText" wx:if="{{!hasChoosedImg}}" bindtap="addImg" >没有选择照片,点击重新选择</view>
<!-- <view class="bottom">
<block wx:for="{{btnInfo}}" wx:key="{{index}}">
+8
View File
@@ -147,4 +147,12 @@ page {
margin: 20rpx;
border-radius: 50%;
background: white;
}
.imgcover{
width:100%;
height:100%;
top:0;
bottom:0;
z-index:-1;
position: absolute;
}