@we-debug/miniprogram 0.23.1 → 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,17 @@
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
+
6
17
  ## [0.23.1](https://github.com/dlhandsome/we-debug/compare/v0.23.0...v0.23.1) (2023-12-20)
7
18
 
8
19
 
@@ -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>
@@ -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;
@@ -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.1",
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": "4694d454f59ffdf615ec1a0d0cbcc38cce4038bd"
39
+ "gitHead": "5c871730d2bca62bef98a75b7ef755b71002f66f"
40
40
  }