@xtdev/xt-miniprogram-ui 1.2.88 → 1.2.90

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -198,6 +198,12 @@ Component({
198
198
  onCameraError(e) {
199
199
  console.log("onCameraError:", e);
200
200
  },
201
+ onCameraCancel(){
202
+ this.setData({
203
+ showCamera: false,
204
+ watermarkData: {}
205
+ });
206
+ },
201
207
  /**
202
208
  * 重新上传
203
209
  * @param {*} e
@@ -52,6 +52,6 @@
52
52
  </view>
53
53
  </view>
54
54
  <!-- 相机页面 -->
55
- <xt-water-camera wx:if="{{showCamera}}" watermarkType="banquet" watermarkData="{{watermarkData}}" bind:confirm="onPhotoConfirm" bind:error="onCameraError" />
55
+ <xt-water-camera wx:if="{{showCamera}}" watermarkType="banquet" watermarkData="{{watermarkData}}" bind:confirm="onPhotoConfirm" bind:error="onCameraError" bind:cancel="onCameraCancel"/>
56
56
 
57
57
 
@@ -405,9 +405,9 @@ Component({
405
405
  ctx.fill();
406
406
 
407
407
  // 时间文字
408
- ctx.fillStyle = '#000000';
409
- ctx.fillText(currentHours, tagX + tagWidth + tagPaddingH, tagY + tagHeight / 2 + 2);
410
- ctx.fillText(currentMinutes, tagX + tagWidth + tagPaddingH + 70 * scale, tagY + tagHeight / 2 + 2);
408
+ ctx.fillStyle = '#6722AB';
409
+ ctx.fillText(currentHours, tagX + tagWidth + tagPaddingH, tagY + tagHeight / 2 + 3);
410
+ ctx.fillText(currentMinutes, tagX + tagWidth + tagPaddingH + 70 * scale, tagY + tagHeight / 2 + 3);
411
411
 
412
412
  ctx.font = `bold ${nameFontSize}px "PingFang SC", sans-serif`;
413
413
  ctx.fillText(":", tagX + tagWidth + tagPaddingH + 56 * scale, tagY + tagHeight / 2);
@@ -562,5 +562,9 @@ Component({
562
562
  this.clockInterval = null;
563
563
  }
564
564
  },
565
+
566
+ cancel(){
567
+ this.triggerEvent('cancel');
568
+ },
565
569
  },
566
570
  });
@@ -61,6 +61,7 @@
61
61
  </view>
62
62
  <image class="shutter-icon" bind:tap="switchCamera" src="https://img.tanjiu.cn/home/Jmiyy8h2SiZ8YaMWrNTzcHS3C5XGap3c.png" mode="aspectFit" binderror="" bindload=""></image>
63
63
  </view>
64
+ <image class="close-btn" bind:tap="cancel" src="https://img.tanjiu.cn/home/YC2FD8x6SB2m6HEfaZCYaFnmn8wzQdEt.png"></image>
64
65
  </view>
65
66
 
66
67
  <!-- 预览区域 -->
@@ -52,7 +52,7 @@
52
52
  .tag-container .tag-time {
53
53
  padding: 12rpx;
54
54
  background-color: #fff;
55
- color: #333;
55
+ color: #6722AB;
56
56
  font-size: 48rpx;
57
57
  font-weight: bold;
58
58
  font-family: FengTan-Regular;
@@ -123,6 +123,14 @@
123
123
  margin-right: 8rpx;
124
124
  }
125
125
 
126
+ .close-btn {
127
+ position: absolute;
128
+ top: 40rpx;
129
+ left: 40rpx;
130
+ width: 48rpx;
131
+ height: 48rpx;
132
+ }
133
+
126
134
  .shutter-area {
127
135
  position: absolute;
128
136
  bottom: 40rpx;
@@ -205,8 +213,8 @@
205
213
  position: fixed;
206
214
  left: -9999rpx;
207
215
  top: -9999rpx;
208
- width: 1px;
209
- height: 1px;
216
+ width: 100vw;
217
+ height: 100vh;
210
218
  }
211
219
 
212
220
  .loading-overlay {
@@ -250,4 +258,4 @@
250
258
  .shutter-icon{
251
259
  width: 48rpx;
252
260
  height: 48rpx;
253
- }
261
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xtdev/xt-miniprogram-ui",
3
- "version": "1.2.88",
3
+ "version": "1.2.90",
4
4
  "description": "",
5
5
  "miniprogram": "libs",
6
6
  "publishConfig": {