@we-debug/miniprogram 0.31.18 → 0.32.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 +11 -0
- package/dist/less/mask.less +34 -1
- package/dist/mask/index.js +14 -1
- package/dist/mask/index.wxml +7 -1
- package/dist/mask/index.wxss +81 -1
- package/package.json +8 -8
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.32.0](https://github.com/dlhandsome/we-debug/compare/v0.31.18...v0.32.0) (2024-06-24)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* 自定义 tabbar 模式下使用 自定义 mask ([154085b](https://github.com/dlhandsome/we-debug/commit/154085b9b6e2468fa44ff701f1925519d82fe6d5))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [0.31.18](https://github.com/dlhandsome/we-debug/compare/v0.31.17...v0.31.18) (2024-06-21)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @we-debug/miniprogram
|
package/dist/less/mask.less
CHANGED
|
@@ -1 +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
|
+
}
|
package/dist/mask/index.js
CHANGED
|
@@ -3,6 +3,12 @@ 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
|
+
};
|
|
6
12
|
|
|
7
13
|
Component({
|
|
8
14
|
properties: {
|
|
@@ -19,11 +25,18 @@ Component({
|
|
|
19
25
|
data: {
|
|
20
26
|
// 是否展示浮层
|
|
21
27
|
showMask: false,
|
|
28
|
+
// 动画类
|
|
29
|
+
animateClassName: {
|
|
30
|
+
mask: animateClassName.fadeIn,
|
|
31
|
+
modal: animateClassName.slideInUp
|
|
32
|
+
},
|
|
22
33
|
styles: {
|
|
23
34
|
zIndex: 999991,
|
|
24
35
|
customStyle:
|
|
25
36
|
'padding: 12px 24px 24px 24px;padding-bottom: constant(safe-area-inset-bottom);padding-bottom: env(safe-area-inset-bottom);'
|
|
26
|
-
}
|
|
37
|
+
},
|
|
38
|
+
// eslint-disable-next-line no-undef
|
|
39
|
+
useCustomMask: __wxConfig.tabBar.custom
|
|
27
40
|
},
|
|
28
41
|
externalClasses: ['my-class'],
|
|
29
42
|
methods: {
|
package/dist/mask/index.wxml
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
<page-container
|
|
2
|
+
wx:if="{{!useCustomMask}}"
|
|
2
3
|
show="{{showMask}}"
|
|
3
4
|
round="{{true}}"
|
|
4
5
|
z-index="{{styles.zIndex}}"
|
|
5
6
|
custom-style="{{styles.customStyle}}"
|
|
6
7
|
>
|
|
7
8
|
<slot></slot>
|
|
8
|
-
</page-container>
|
|
9
|
+
</page-container>
|
|
10
|
+
<view wx:else class="w-mask animated {{animateClassName.mask}}" hidden="{{!showMask}}" bindtap="closeMaskHandler">
|
|
11
|
+
<view class="w-mask__modal animated {{animateClassName.modal}}" catchtap="noop">
|
|
12
|
+
<slot></slot>
|
|
13
|
+
</view>
|
|
14
|
+
</view>
|
package/dist/mask/index.wxss
CHANGED
|
@@ -1 +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
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@we-debug/miniprogram",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.32.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.32.0",
|
|
29
|
+
"@we-debug/plugin-error": "0.32.0",
|
|
30
|
+
"@we-debug/plugin-launcher": "0.32.0",
|
|
31
|
+
"@we-debug/plugin-network": "0.32.0",
|
|
32
|
+
"@we-debug/plugin-router": "0.32.0",
|
|
33
|
+
"@we-debug/plugin-ui-check": "0.32.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": "f5cb28acb9cecc2463c6f1a9307646274f3aafee"
|
|
40
40
|
}
|