@we-debug/miniprogram 0.21.0 → 0.22.1

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,31 @@
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.22.1](https://github.com/dlhandsome/we-debug/compare/v0.22.0...v0.22.1) (2023-12-20)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **runtime:** 使用 variable less 变量 ([f2325d8](https://github.com/dlhandsome/we-debug/commit/f2325d8b8d5e7fa3a93a2a6571fc3da0592f23f7))
12
+ * **runtime/miniprogram:** 修复 cell 样式问题 ([13717eb](https://github.com/dlhandsome/we-debug/commit/13717eb043e87657695df8432023e89bd2dc3f2d))
13
+
14
+
15
+
16
+
17
+
18
+ # [0.22.0](https://github.com/dlhandsome/we-debug/compare/v0.21.0...v0.22.0) (2023-12-19)
19
+
20
+
21
+ ### Features
22
+
23
+ * **runtime/miniprogram:** 使用 page-container 重构半屏弹窗 ([508201a](https://github.com/dlhandsome/we-debug/commit/508201aa8c091076c4bf492b6b628d01a17880a5))
24
+ * **runtime/miniprogram:** 支持插件搜索能力 ([7c3d93d](https://github.com/dlhandsome/we-debug/commit/7c3d93dae1fe739cb7f802e64689494359cefce4))
25
+ * **runtime/miniprogram:** 调整 panel 高度 ([fee62be](https://github.com/dlhandsome/we-debug/commit/fee62bee5ac0d28bc9345f194ab3961b0cfd09fa))
26
+
27
+
28
+
29
+
30
+
6
31
  # [0.21.0](https://github.com/dlhandsome/we-debug/compare/v0.20.0...v0.21.0) (2023-12-12)
7
32
 
8
33
 
@@ -4,7 +4,16 @@
4
4
  padding: 12px 16px 12px 0;
5
5
  margin-left: 34rpx;
6
6
  font-size: 14px;
7
- border-bottom: 1rpx solid #dddddd;
7
+ }
8
+ .w-cell-item:after {
9
+ position: absolute;
10
+ content: '';
11
+ left: 0;
12
+ right: 0;
13
+ bottom: 0;
14
+ height: 1px;
15
+ background-color: #ebedf0;
16
+ transform: scaleY(0.5);
8
17
  }
9
18
  .w-cell-item:last-child {
10
19
  border-bottom-width: 0;
@@ -1,6 +1,7 @@
1
1
  import Debug from '@we-debug/core';
2
2
 
3
3
  const store = Debug.store;
4
+ const sys = store.sys.get();
4
5
 
5
6
  Component({
6
7
  options: {
@@ -35,7 +36,7 @@ Component({
35
36
  badges: store.badges.get(),
36
37
  modal: {
37
38
  logo: './logo.png',
38
- scrollHeight: 500
39
+ scrollHeight: ((sys.screenHeight * 3) / 5) * (750 / sys.screenWidth)
39
40
  }
40
41
  },
41
42
  methods: {
@@ -47,6 +48,15 @@ Component({
47
48
  },
48
49
  setBadges() {
49
50
  this.setData({ badges: store.badges.get() });
51
+ },
52
+ searchConfirmHandler(e) {
53
+ const rules = store.rules.get();
54
+ const searchStr = e.detail.value;
55
+
56
+ const filterRules = rules.filter(i => i.title.indexOf(searchStr) > -1);
57
+ this.setData({
58
+ rules: filterRules
59
+ });
50
60
  }
51
61
  },
52
62
  lifetimes: {
@@ -5,14 +5,18 @@
5
5
  <view class="w-mask__modal-header">
6
6
  <image class="w-mask__modal-logo" src="{{modal.logo}}" mode="aspectFit" lazy-load="false" binderror="" bindload=""></image>
7
7
  </view>
8
+ <view class="w-mask__modal-search">
9
+ <input placeholder="搜索" catchconfirm="searchConfirmHandler"/>
10
+ </view>
8
11
  <scroll-view class="w-mask__modal-content" scroll-y="true" style="height:{{modal.scrollHeight}}rpx;">
9
- <w-cell>
12
+ <w-cell wx:if="{{rules.length > 0}}">
10
13
  <w-rule
11
14
  wx:for="{{rules}}"
12
15
  wx:key="id"
13
16
  config="{{item}}"
14
17
  />
15
18
  </w-cell>
19
+ <view wx:else class="w-mask__modal-content--empty">暂无搜索内容</view>
16
20
  <slot name="modal-body"></slot>
17
21
  </scroll-view>
18
22
  <slot name="modal-footer"></slot>
@@ -14,6 +14,39 @@
14
14
  font-size: 16px;
15
15
  height: 66rpx;
16
16
  }
17
+ .w-mask__modal-search {
18
+ display: flex;
19
+ justify-content: center;
20
+ align-items: center;
21
+ }
22
+ .w-mask__modal-search input {
23
+ width: 100%;
24
+ background: #f8f8f8;
25
+ border-radius: 4px;
26
+ padding: 4px 24px;
27
+ margin: 14px;
28
+ font-size: 14px;
29
+ }
30
+ .w-mask__modal-search input:before {
31
+ position: absolute;
32
+ content: '';
33
+ 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>');
34
+ background-size: 16px;
35
+ left: 4px;
36
+ top: 50%;
37
+ transform: translateY(-50%);
38
+ width: 16px;
39
+ height: 16px;
40
+ }
41
+ .w-mask__modal-content--empty {
42
+ width: 100%;
43
+ height: 100%;
44
+ color: #d9d9d9;
45
+ font-size: 24px;
46
+ text-align: center;
47
+ padding-top: 50%;
48
+ box-sizing: border-box;
49
+ }
17
50
  .w-mask__modal-logo {
18
51
  height: 64rpx;
19
52
  }
@@ -25,6 +25,8 @@
25
25
  @gray-7: #646566;
26
26
  @gray-8: #323233;
27
27
 
28
+ @border-color: #d7d7d7;
29
+
28
30
  // Component Colors
29
31
  @text-color: @gray-8;
30
32
  @active-color: @gray-2;
@@ -6,7 +6,17 @@
6
6
  padding: @padding-sm @padding-md @padding-sm 0;
7
7
  margin-left: 34rpx;
8
8
  font-size: @font-size-md;
9
- border-bottom: 1rpx solid #dddddd;
9
+
10
+ &:after {
11
+ position: absolute;
12
+ content: '';
13
+ left: 0;
14
+ right: 0;
15
+ bottom: 0;
16
+ height: 1px;
17
+ background-color: @border-color;
18
+ transform: scaleY(0.5);
19
+ }
10
20
 
11
21
  &:last-child {
12
22
  border-bottom-width: 0;
@@ -18,6 +18,43 @@
18
18
  font-size: @font-size-lg;
19
19
  height: 66rpx;
20
20
  }
21
+ &__modal-search {
22
+ display: flex;
23
+ justify-content: center;
24
+ align-items: center;
25
+
26
+ input {
27
+ width: 100%;
28
+ background: #f8f8f8;
29
+ border-radius: 4px;
30
+ padding: 4px 24px;
31
+ margin: 14px;
32
+ font-size: 14px;
33
+
34
+ &:before{
35
+ position: absolute;
36
+ content: '';
37
+ 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>');
38
+ background-size: 16px;
39
+ left: 4px;
40
+ top: 50%;
41
+ transform: translateY(-50%);
42
+ width: 16px;
43
+ height: 16px;
44
+ }
45
+ }
46
+ }
47
+ &__modal-content {
48
+ &--empty {
49
+ width: 100%;
50
+ height: 100%;
51
+ color: #d9d9d9;
52
+ font-size: 24px;
53
+ text-align: center;
54
+ padding-top: 50%;
55
+ box-sizing: border-box;
56
+ }
57
+ }
21
58
  &__modal-logo {
22
59
  height: 64rpx;
23
60
  }
@@ -1,34 +1 @@
1
- @import './_variable.less';
2
- @import './animate.less';
3
-
4
- .@{prefix}-mask {
5
- opacity: 0;
6
- position: fixed;
7
- z-index: @zindex-mask;
8
- left: 0;
9
- top: 0;
10
- width: 100%;
11
- height: 100%;
12
- background-color: @mask-background;
13
-
14
- &__modal {
15
- position: fixed;
16
- background: @mask-modal-background;
17
- border-radius: @border-radius-lg @border-radius-lg 0 0;
18
- padding: @padding-sm @padding-lg @padding-lg @padding-lg;
19
- left: 0;
20
- right: 0;
21
- bottom: 0;
22
- z-index: @zindex-modal;
23
- padding-bottom: constant(safe-area-inset-bottom); /* iOS < 11.2 */
24
- padding-bottom: env(safe-area-inset-bottom); /* iOS >= 11.2 */
25
- }
26
-
27
- &__modal-title {
28
- color: @mask-modal-title-color;
29
- font-size: @font-size-lg;
30
- line-height: 66rpx;
31
- height: 66rpx;
32
- text-align: center;
33
- }
34
- }
1
+ /** empty file */
@@ -3,12 +3,6 @@ import Debug from '@we-debug/core';
3
3
  const store = Debug.store;
4
4
 
5
5
  const animateDuration = 300;
6
- const animateClassName = {
7
- fadeIn: 'fadeIn',
8
- fadeOut: 'fadeOut',
9
- slideInUp: 'slideInUp',
10
- slideOutDown: 'slideOutDown'
11
- };
12
6
 
13
7
  Component({
14
8
  properties: {
@@ -25,10 +19,10 @@ Component({
25
19
  data: {
26
20
  // 是否展示浮层
27
21
  showMask: false,
28
- // 动画类
29
- animateClassName: {
30
- mask: animateClassName.fadeIn,
31
- modal: animateClassName.slideInUp
22
+ styles: {
23
+ zIndex: 999991,
24
+ customStyle:
25
+ 'padding: 12px 24px 24px 24px;padding-bottom: constant(safe-area-inset-bottom);padding-bottom: env(safe-area-inset-bottom);'
32
26
  }
33
27
  },
34
28
  externalClasses: ['my-class'],
@@ -42,21 +36,10 @@ Component({
42
36
  },
43
37
  showMask() {
44
38
  this.setData({
45
- animateClassName: {
46
- mask: animateClassName.fadeIn,
47
- modal: animateClassName.slideInUp
48
- },
49
39
  showMask: true
50
40
  });
51
41
  },
52
42
  closeMask() {
53
- this.setData({
54
- animateClassName: {
55
- mask: animateClassName.fadeOut,
56
- modal: animateClassName.slideOutDown
57
- }
58
- });
59
-
60
43
  setTimeout(() => {
61
44
  this.setData({
62
45
  showMask: false
@@ -1,5 +1,8 @@
1
- <view class="w-mask animated {{animateClassName.mask}}" hidden="{{!showMask}}" bindtap="closeMaskHandler">
2
- <view class="w-mask__modal animated {{animateClassName.modal}}" catchtap="noop">
3
- <slot></slot>
4
- </view>
5
- </view>
1
+ <page-container
2
+ show="{{showMask}}"
3
+ round="{{true}}"
4
+ z-index="{{styles.zIndex}}"
5
+ custom-style="{{styles.customStyle}}"
6
+ >
7
+ <slot></slot>
8
+ </page-container>
@@ -1,81 +1 @@
1
- .animated {
2
- animation-duration: 0.3s;
3
- animation-fill-mode: both;
4
- }
5
- @keyframes fadeIn {
6
- from {
7
- opacity: 0;
8
- }
9
- to {
10
- opacity: 1;
11
- }
12
- }
13
- .fadeOut {
14
- animation-name: fadeOut;
15
- }
16
- @keyframes fadeOut {
17
- from {
18
- opacity: 1;
19
- }
20
- to {
21
- opacity: 0;
22
- }
23
- }
24
- .fadeIn {
25
- animation-name: fadeIn;
26
- }
27
- @keyframes slideInUp {
28
- from {
29
- transform: translate3d(0, 100%, 0);
30
- visibility: visible;
31
- }
32
- to {
33
- transform: translate3d(0, 0, 0);
34
- }
35
- }
36
- .slideInUp {
37
- animation-name: slideInUp;
38
- }
39
- @keyframes slideOutDown {
40
- from {
41
- transform: translate3d(0, 0, 0);
42
- visibility: visible;
43
- }
44
- to {
45
- transform: translate3d(0, 100%, 0);
46
- }
47
- }
48
- .slideOutDown {
49
- animation-name: slideOutDown;
50
- }
51
- .w-mask {
52
- opacity: 0;
53
- position: fixed;
54
- z-index: 999991;
55
- left: 0;
56
- top: 0;
57
- width: 100%;
58
- height: 100%;
59
- background-color: rgba(0, 0, 0, 0.5);
60
- }
61
- .w-mask__modal {
62
- position: fixed;
63
- background: #fff;
64
- border-radius: 8px 8px 0 0;
65
- padding: 12px 24px 24px 24px;
66
- left: 0;
67
- right: 0;
68
- bottom: 0;
69
- z-index: 999992;
70
- padding-bottom: constant(safe-area-inset-bottom);
71
- /* iOS < 11.2 */
72
- padding-bottom: env(safe-area-inset-bottom);
73
- /* iOS >= 11.2 */
74
- }
75
- .w-mask__modal-title {
76
- color: rgba(0, 0, 0, 0.8);
77
- font-size: 16px;
78
- line-height: 66rpx;
79
- height: 66rpx;
80
- text-align: center;
81
- }
1
+ /** empty file */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@we-debug/miniprogram",
3
- "version": "0.21.0",
3
+ "version": "0.22.1",
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.21.0",
29
- "@we-debug/plugin-error": "0.21.0",
30
- "@we-debug/plugin-launcher": "0.21.0",
31
- "@we-debug/plugin-network": "0.21.0",
32
- "@we-debug/plugin-router": "0.21.0",
33
- "@we-debug/plugin-ui-check": "0.21.0",
28
+ "@we-debug/core": "0.22.0",
29
+ "@we-debug/plugin-error": "0.22.0",
30
+ "@we-debug/plugin-launcher": "0.22.0",
31
+ "@we-debug/plugin-network": "0.22.0",
32
+ "@we-debug/plugin-router": "0.22.0",
33
+ "@we-debug/plugin-ui-check": "0.22.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": "6a347349f4fd9cd616e9678bffccdee7bf163a56"
39
+ "gitHead": "302c0908527e058f31773bc269f97e4df956e866"
40
40
  }