@we-debug/miniprogram 0.23.0 → 0.24.0

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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,28 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [0.24.0](https://github.com/dlhandsome/we-debug/compare/v0.23.1...v0.24.0) (2023-12-21)
7
+
8
+
9
+ ### Features
10
+
11
+ * **runtime/miniprogram:** 新增 arrow 类型表单 ([e3fd07e](https://github.com/dlhandsome/we-debug/commit/e3fd07e32c39ccae16d7d32e77faaad9eb1c118f))
12
+
13
+
14
+
15
+
16
+
17
+ ## [0.23.1](https://github.com/dlhandsome/we-debug/compare/v0.23.0...v0.23.1) (2023-12-20)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * **runtime/miniprogram:** 修复 logo 展示 ([3cea30b](https://github.com/dlhandsome/we-debug/commit/3cea30b1b4f8ccd8e997a2cbcb5ff5315c488f34))
23
+
24
+
25
+
26
+
27
+
6
28
  # [0.23.0](https://github.com/dlhandsome/we-debug/compare/v0.22.2...v0.23.0) (2023-12-20)
7
29
 
8
30
 
@@ -0,0 +1 @@
1
+ <svg t="1703077404316" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="31192" id="mx_n_1703077404317" width="200" height="200"><path d="M711.6 488.624L355.2 152.976a29.36 29.36 0 0 0-42.352 0 31.408 31.408 0 0 0 0 43.552L647.76 512 312.848 827.36a31.408 31.408 0 0 0 0 43.552 29.36 29.36 0 0 0 42.352 0l356.4-335.648a36.32 36.32 0 0 0 0-46.64z" p-id="31193" fill="#808080"></path></svg>
@@ -10,7 +10,7 @@
10
10
  <image class="search-icon--search" src="../icon/search.svg" />
11
11
  <image class="search-icon--close" src="../icon/close.svg" wx:if="{{searchStr}}" catchtap="searchCleanHandler"/>
12
12
  </view>
13
- <scroll-view class="w-mask__modal-content" scroll-y="true" style="max-height:{{modal.scrollHeight}}rpx;">
13
+ <scroll-view class="w-mask__modal-content" scroll-y="true" style="height:{{modal.scrollHeight}}rpx;">
14
14
  <w-cell wx:if="{{rules.length > 0}}">
15
15
  <w-rule
16
16
  wx:for="{{rules}}"
@@ -13,6 +13,7 @@
13
13
  color: rgba(0, 0, 0, 0.8);
14
14
  font-size: 16px;
15
15
  height: 66rpx;
16
+ overflow: hidden;
16
17
  }
17
18
  .w-mask__modal-search {
18
19
  position: relative;
@@ -45,17 +46,6 @@
45
46
  margin: 14px;
46
47
  font-size: 14px;
47
48
  }
48
- .w-mask__modal-search input:before {
49
- position: absolute;
50
- content: '';
51
- background-image: url('data:image/svg+xml; utf8, <svg t="1703061902186" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="22508" width="200" height="200"><path d="M919.179 879.676L743.601 705.143c-0.25-0.249-0.508-0.485-0.765-0.723 54.864-64.213 87.997-147.552 87.997-238.632 0-202.998-164.562-367.56-367.56-367.56S95.713 262.79 95.713 465.788s164.562 367.56 367.56 367.56c91.779 0 175.699-33.641 240.109-89.261 0.242 0.26 0.485 0.52 0.739 0.773l175.578 174.533a27.912 27.912 0 0 0 19.739 8.142c7.194 0 14.387-2.755 19.859-8.26 10.901-10.968 10.849-28.697-0.118-39.599z m-334.65-126.789c-38.375 16.231-79.171 24.461-121.256 24.461-42.085 0-82.881-8.23-121.256-24.461-37.094-15.689-70.419-38.162-99.05-66.793-28.631-28.631-51.104-61.956-66.793-99.05-16.231-38.375-24.461-79.171-24.461-121.256 0-42.085 8.23-82.881 24.461-121.256 15.689-37.094 38.162-70.419 66.793-99.05 28.631-28.631 61.956-51.104 99.05-66.793 38.375-16.231 79.171-24.461 121.256-24.461 42.085 0 82.881 8.23 121.256 24.461 37.094 15.689 70.419 38.162 99.05 66.793 28.631 28.631 51.104 61.956 66.793 99.05 16.231 38.375 24.461 79.171 24.461 121.256 0 42.085-8.23 82.881-24.461 121.256-15.689 37.094-38.162 70.419-66.793 99.05-28.631 28.631-61.956 51.103-99.05 66.793z" p-id="22509"></path></svg>');
52
- background-size: 16px;
53
- left: 4px;
54
- top: 50%;
55
- transform: translateY(-50%);
56
- width: 16px;
57
- height: 16px;
58
- }
59
49
  .w-mask__modal-content--empty {
60
50
  width: 100%;
61
51
  height: 100%;
@@ -66,5 +56,5 @@
66
56
  box-sizing: border-box;
67
57
  }
68
58
  .w-mask__modal-logo {
69
- height: 64rpx;
59
+ height: 144rpx;
70
60
  }
@@ -5,7 +5,7 @@
5
5
  @black: #000;
6
6
  @white: #fff;
7
7
  @brightgreen: #4DC820;
8
- @wechatgreen: #1AAD19;
8
+ @wechatgreen: #07c160;
9
9
  @orange: #FFA500;
10
10
  @yellow: #D8B024;
11
11
  @blueviolet: #8833D7;
@@ -17,6 +17,7 @@
17
17
  color: @mask-modal-title-color;
18
18
  font-size: @font-size-lg;
19
19
  height: 66rpx;
20
+ overflow: hidden;
20
21
  }
21
22
  &__modal-search {
22
23
  position: relative;
@@ -50,18 +51,6 @@
50
51
  padding: 4px 24px;
51
52
  margin: 14px;
52
53
  font-size: 14px;
53
-
54
- &:before{
55
- position: absolute;
56
- content: '';
57
- background-image: url('data:image/svg+xml; utf8, <svg t="1703061902186" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="22508" width="200" height="200"><path d="M919.179 879.676L743.601 705.143c-0.25-0.249-0.508-0.485-0.765-0.723 54.864-64.213 87.997-147.552 87.997-238.632 0-202.998-164.562-367.56-367.56-367.56S95.713 262.79 95.713 465.788s164.562 367.56 367.56 367.56c91.779 0 175.699-33.641 240.109-89.261 0.242 0.26 0.485 0.52 0.739 0.773l175.578 174.533a27.912 27.912 0 0 0 19.739 8.142c7.194 0 14.387-2.755 19.859-8.26 10.901-10.968 10.849-28.697-0.118-39.599z m-334.65-126.789c-38.375 16.231-79.171 24.461-121.256 24.461-42.085 0-82.881-8.23-121.256-24.461-37.094-15.689-70.419-38.162-99.05-66.793-28.631-28.631-51.104-61.956-66.793-99.05-16.231-38.375-24.461-79.171-24.461-121.256 0-42.085 8.23-82.881 24.461-121.256 15.689-37.094 38.162-70.419 66.793-99.05 28.631-28.631 61.956-51.104 99.05-66.793 38.375-16.231 79.171-24.461 121.256-24.461 42.085 0 82.881 8.23 121.256 24.461 37.094 15.689 70.419 38.162 99.05 66.793 28.631 28.631 51.104 61.956 66.793 99.05 16.231 38.375 24.461 79.171 24.461 121.256 0 42.085-8.23 82.881-24.461 121.256-15.689 37.094-38.162 70.419-66.793 99.05-28.631 28.631-61.956 51.103-99.05 66.793z" p-id="22509"></path></svg>');
58
- background-size: 16px;
59
- left: 4px;
60
- top: 50%;
61
- transform: translateY(-50%);
62
- width: 16px;
63
- height: 16px;
64
- }
65
54
  }
66
55
  }
67
56
  &__modal-content {
@@ -76,6 +65,6 @@
76
65
  }
77
66
  }
78
67
  &__modal-logo {
79
- height: 64rpx;
68
+ height: 144rpx;
80
69
  }
81
70
  }
@@ -8,22 +8,57 @@
8
8
  }
9
9
  }
10
10
 
11
- .cell-body-major {
12
- &__meta {
13
- display: inline-block;
14
- padding: 0 8rpx;
15
- margin-left: 16rpx;
16
- min-width: 32rpx;
17
- height: 32rpx;
18
- text-align: center;
19
- line-height: 32rpx;
20
- color: @white;
21
- background-color: @red;
22
- border-radius: 32rpx;
11
+ .@{prefix}-arrow {
12
+ position: absolute;
13
+ right: 12px;
14
+ top: 50%;
15
+ transform: translateY(-50%);
16
+ width: 14px;
17
+ height: 14px
18
+ }
19
+
20
+ .@{prefix}-arrow {
21
+ &-name {
22
+ position: absolute;
23
+ right: 28px;
24
+ top: 50%;
25
+ transform: translateY(-50%);
26
+ font-size: 12px;
27
+ color: #808080;
28
+ }
29
+ .arrow-icon {
30
+ position: absolute;
31
+ right: 12px;
32
+ top: 50%;
33
+ transform: translateY(-50%);
34
+ width: 14px;
35
+ height: 14px
23
36
  }
24
37
  }
25
- .cell-body-minor {
26
- color: #9d9d9d;
27
- font-size: @font-size-sm;
28
- margin-top: 6rpx;
38
+
39
+ .cell-body {
40
+ &--disabled {
41
+ opacity: 0.4;
42
+ }
43
+
44
+ &-major {
45
+ &__meta {
46
+ display: inline-block;
47
+ padding: 0 8rpx;
48
+ margin-left: 16rpx;
49
+ min-width: 32rpx;
50
+ height: 32rpx;
51
+ text-align: center;
52
+ line-height: 32rpx;
53
+ color: @white;
54
+ background-color: @red;
55
+ border-radius: 32rpx;
56
+ }
57
+ }
58
+
59
+ &-minor {
60
+ color: #9d9d9d;
61
+ font-size: @font-size-sm;
62
+ margin-top: 6rpx;
63
+ }
29
64
  }
@@ -108,6 +108,12 @@ Component({
108
108
  });
109
109
  }
110
110
  },
111
+ bindCellTapHandler() {
112
+ const VALID_Type = ['arrow'];
113
+ if (VALID_Type.includes(this.data.type)) {
114
+ this.bindTapHandler();
115
+ }
116
+ },
111
117
  emit(opt) {
112
118
  this.setData(opt);
113
119
  },
@@ -1,11 +1,15 @@
1
- <cell-item>
2
- <view slot="body">
1
+ <cell-item catchtap="bindCellTapHandler">
2
+ <view slot="body" class="{{state.disabled ? 'cell-body--disabled' : ''}}">
3
3
  <view class="cell-body-major">
4
4
  {{title}}
5
5
  <view class="cell-body-major__meta" wx:if="{{meta}}">{{meta}}</view>
6
6
  </view>
7
7
  <view class="cell-body-minor">{{desc}}</view>
8
8
  </view>
9
- <switch class="w-switch" wx:if="{{type === 'switch'}}" slot="foot" checked="{{state.checked}}" disabled="{{state.disabled}}" bindchange="bindChangeHandler" color="#4ea766" />
10
- <view wx:else slot="foot" class="w-btn {{state.disabled ? 'w-btn--disabled' : 'w-btn--default'}}" bindtap="bindTapHandler">{{state.name || '获取'}}</view>
9
+ <switch class="w-switch" wx:if="{{type === 'switch'}}" slot="foot" checked="{{state.checked}}" disabled="{{state.disabled}}" catchchange="bindChangeHandler" color="#07c160" />
10
+ <view wx:if="{{type === 'button'}}" slot="foot" class="w-btn {{state.disabled ? 'w-btn--disabled' : 'w-btn--default'}}" catchtap="bindTapHandler">{{state.name || '获取'}}</view>
11
+ <view wx:if="{{type === 'arrow'}}" slot="foot" class="w-arrow">
12
+ <view class="w-arrow-name">{{state.name}}</view>
13
+ <image class="arrow-icon" src="../icon/arrow.svg" />
14
+ </view>
11
15
  </cell-item>
@@ -6,10 +6,10 @@
6
6
  font-weight: 500;
7
7
  border-radius: 4px;
8
8
  color: #fff;
9
- background-color: #1AAD19;
9
+ background-color: #07c160;
10
10
  }
11
11
  .w-btn--default {
12
- background-color: #1AAD19;
12
+ background-color: #07c160;
13
13
  color: #fff;
14
14
  }
15
15
  .w-btn--brightgreen {
@@ -49,6 +49,33 @@
49
49
  .w-switch[disabled] {
50
50
  opacity: 0.4;
51
51
  }
52
+ .w-arrow {
53
+ position: absolute;
54
+ right: 12px;
55
+ top: 50%;
56
+ transform: translateY(-50%);
57
+ width: 14px;
58
+ height: 14px;
59
+ }
60
+ .w-arrow-name {
61
+ position: absolute;
62
+ right: 28px;
63
+ top: 50%;
64
+ transform: translateY(-50%);
65
+ font-size: 12px;
66
+ color: #808080;
67
+ }
68
+ .w-arrow .arrow-icon {
69
+ position: absolute;
70
+ right: 12px;
71
+ top: 50%;
72
+ transform: translateY(-50%);
73
+ width: 14px;
74
+ height: 14px;
75
+ }
76
+ .cell-body--disabled {
77
+ opacity: 0.4;
78
+ }
52
79
  .cell-body-major__meta {
53
80
  display: inline-block;
54
81
  padding: 0 8rpx;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@we-debug/miniprogram",
3
- "version": "0.23.0",
3
+ "version": "0.24.0",
4
4
  "description": "we-debug miniprogram component",
5
5
  "author": {
6
6
  "name": "dlhandsome"
@@ -25,16 +25,16 @@
25
25
  },
26
26
  "license": "MIT",
27
27
  "dependencies": {
28
- "@we-debug/core": "0.23.0",
29
- "@we-debug/plugin-error": "0.23.0",
30
- "@we-debug/plugin-launcher": "0.23.0",
31
- "@we-debug/plugin-network": "0.23.0",
32
- "@we-debug/plugin-router": "0.23.0",
33
- "@we-debug/plugin-ui-check": "0.23.0",
28
+ "@we-debug/core": "0.24.0",
29
+ "@we-debug/plugin-error": "0.24.0",
30
+ "@we-debug/plugin-launcher": "0.24.0",
31
+ "@we-debug/plugin-network": "0.24.0",
32
+ "@we-debug/plugin-router": "0.24.0",
33
+ "@we-debug/plugin-ui-check": "0.24.0",
34
34
  "deepmerge": "^4.2.2"
35
35
  },
36
36
  "readme": "ERROR: No README data found!",
37
37
  "_id": "@we-debug/core@0.3.5",
38
38
  "_commitid": "6c3f04b",
39
- "gitHead": "9c7e9eef46cceb92d984d5a96caa935223cc8450"
39
+ "gitHead": "5c871730d2bca62bef98a75b7ef755b71002f66f"
40
40
  }