@we-debug/miniprogram 0.21.0 → 0.22.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 +13 -0
- package/dist/index/index.js +11 -1
- package/dist/index/index.wxml +5 -1
- package/dist/index/index.wxss +22 -0
- package/dist/less/index.less +25 -0
- package/dist/less/mask.less +1 -34
- package/dist/mask/index.js +4 -21
- package/dist/mask/index.wxml +8 -5
- package/dist/mask/index.wxss +1 -81
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,19 @@
|
|
|
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.0](https://github.com/dlhandsome/we-debug/compare/v0.21.0...v0.22.0) (2023-12-19)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **runtime/miniprogram:** 使用 page-container 重构半屏弹窗 ([508201a](https://github.com/dlhandsome/we-debug/commit/508201aa8c091076c4bf492b6b628d01a17880a5))
|
|
12
|
+
* **runtime/miniprogram:** 支持插件搜索能力 ([7c3d93d](https://github.com/dlhandsome/we-debug/commit/7c3d93dae1fe739cb7f802e64689494359cefce4))
|
|
13
|
+
* **runtime/miniprogram:** 调整 panel 高度 ([fee62be](https://github.com/dlhandsome/we-debug/commit/fee62bee5ac0d28bc9345f194ab3961b0cfd09fa))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
6
19
|
# [0.21.0](https://github.com/dlhandsome/we-debug/compare/v0.20.0...v0.21.0) (2023-12-12)
|
|
7
20
|
|
|
8
21
|
|
package/dist/index/index.js
CHANGED
|
@@ -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:
|
|
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: {
|
package/dist/index/index.wxml
CHANGED
|
@@ -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>
|
package/dist/index/index.wxss
CHANGED
|
@@ -14,6 +14,28 @@
|
|
|
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 16px;
|
|
27
|
+
margin: 14px;
|
|
28
|
+
font-size: 14px;
|
|
29
|
+
}
|
|
30
|
+
.w-mask__modal-content--empty {
|
|
31
|
+
width: 100%;
|
|
32
|
+
height: 100%;
|
|
33
|
+
color: #d9d9d9;
|
|
34
|
+
font-size: 24px;
|
|
35
|
+
text-align: center;
|
|
36
|
+
padding-top: 50%;
|
|
37
|
+
box-sizing: border-box;
|
|
38
|
+
}
|
|
17
39
|
.w-mask__modal-logo {
|
|
18
40
|
height: 64rpx;
|
|
19
41
|
}
|
package/dist/less/index.less
CHANGED
|
@@ -18,6 +18,31 @@
|
|
|
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 16px;
|
|
31
|
+
margin: 14px;
|
|
32
|
+
font-size: 14px;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
&__modal-content {
|
|
36
|
+
&--empty {
|
|
37
|
+
width: 100%;
|
|
38
|
+
height: 100%;
|
|
39
|
+
color: #d9d9d9;
|
|
40
|
+
font-size: 24px;
|
|
41
|
+
text-align: center;
|
|
42
|
+
padding-top: 50%;
|
|
43
|
+
box-sizing: border-box;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
21
46
|
&__modal-logo {
|
|
22
47
|
height: 64rpx;
|
|
23
48
|
}
|
package/dist/less/mask.less
CHANGED
|
@@ -1,34 +1 @@
|
|
|
1
|
-
|
|
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 */
|
package/dist/mask/index.js
CHANGED
|
@@ -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
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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
|
package/dist/mask/index.wxml
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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>
|
package/dist/mask/index.wxss
CHANGED
|
@@ -1,81 +1 @@
|
|
|
1
|
-
|
|
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.
|
|
3
|
+
"version": "0.22.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.
|
|
29
|
-
"@we-debug/plugin-error": "0.
|
|
30
|
-
"@we-debug/plugin-launcher": "0.
|
|
31
|
-
"@we-debug/plugin-network": "0.
|
|
32
|
-
"@we-debug/plugin-router": "0.
|
|
33
|
-
"@we-debug/plugin-ui-check": "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": "
|
|
39
|
+
"gitHead": "ea232e5edf335178ab434f99741fdfc7202ff351"
|
|
40
40
|
}
|