@we-debug/miniprogram 0.50.0 → 0.51.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 +18 -0
- package/dist/cell/index.wxss +1 -1
- package/dist/cell-item/index.wxss +1 -1
- package/dist/host-behavior.js +1 -0
- package/dist/host-empty/index.js +1 -0
- package/dist/host-empty/index.json +3 -0
- package/dist/host-empty/index.wxml +1 -0
- package/dist/index/index.js +130 -26
- package/dist/index/index.json +6 -0
- package/dist/index/index.wxml +61 -31
- package/dist/index/index.wxss +75 -7
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -0
- package/dist/launcher/index.js +193 -0
- package/dist/launcher/index.json +4 -0
- package/dist/launcher/index.less +1 -0
- package/dist/launcher/index.wxml +17 -0
- package/dist/launcher/index.wxss +58 -0
- package/dist/less/_variable.less +8 -0
- package/dist/less/button.less +3 -3
- package/dist/less/cell-item.less +1 -1
- package/dist/less/cell.less +1 -1
- package/dist/less/index.less +90 -9
- package/dist/less/launcher.less +79 -0
- package/dist/less/mask.less +21 -4
- package/dist/less/rule.less +8 -8
- package/dist/mask/index.js +38 -3
- package/dist/mask/index.wxss +20 -4
- package/dist/rule/index.wxss +11 -11
- package/dist/ui-behavior.js +1 -0
- package/package.json +3 -3
- package/test/host-behavior.test.js +27 -0
package/dist/mask/index.wxss
CHANGED
|
@@ -66,16 +66,32 @@
|
|
|
66
66
|
left: 0;
|
|
67
67
|
right: 0;
|
|
68
68
|
bottom: 0;
|
|
69
|
+
max-width: 669px;
|
|
70
|
+
margin: 0 auto;
|
|
69
71
|
z-index: 999992;
|
|
70
|
-
padding-bottom:
|
|
72
|
+
padding-bottom: 16px;
|
|
73
|
+
padding-bottom: max(16px, constant(safe-area-inset-bottom));
|
|
71
74
|
/* iOS < 11.2 */
|
|
72
|
-
padding-bottom: env(safe-area-inset-bottom);
|
|
75
|
+
padding-bottom: max(16px, env(safe-area-inset-bottom));
|
|
73
76
|
/* iOS >= 11.2 */
|
|
77
|
+
box-sizing: border-box;
|
|
78
|
+
max-height: calc(100% - 56px);
|
|
79
|
+
display: flex;
|
|
80
|
+
flex-direction: column;
|
|
81
|
+
overflow: hidden;
|
|
82
|
+
-webkit-text-size-adjust: 100%;
|
|
83
|
+
-moz-text-size-adjust: 100%;
|
|
84
|
+
text-size-adjust: 100%;
|
|
74
85
|
}
|
|
75
86
|
.w-mask__modal-title {
|
|
76
87
|
color: rgba(0, 0, 0, 0.8);
|
|
77
88
|
font-size: 16px;
|
|
78
|
-
line-height:
|
|
79
|
-
height:
|
|
89
|
+
line-height: 33px;
|
|
90
|
+
height: 33px;
|
|
80
91
|
text-align: center;
|
|
81
92
|
}
|
|
93
|
+
@media (max-height: 500px) {
|
|
94
|
+
.w-mask__modal {
|
|
95
|
+
max-height: calc(100% - 16px);
|
|
96
|
+
}
|
|
97
|
+
}
|
package/dist/rule/index.wxss
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
.w-btn {
|
|
2
|
-
width:
|
|
3
|
-
height:
|
|
2
|
+
width: 50px;
|
|
3
|
+
height: 26px;
|
|
4
4
|
text-align: center;
|
|
5
|
-
line-height:
|
|
5
|
+
line-height: 26px;
|
|
6
6
|
font-weight: 500;
|
|
7
7
|
border-radius: 4px;
|
|
8
8
|
color: #fff;
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
opacity: 0.5;
|
|
44
44
|
}
|
|
45
45
|
.w-switch {
|
|
46
|
-
margin:
|
|
46
|
+
margin: 8px -4px 0 0;
|
|
47
47
|
}
|
|
48
48
|
.w-switch[disabled] {
|
|
49
49
|
opacity: 0.4;
|
|
@@ -71,18 +71,18 @@
|
|
|
71
71
|
}
|
|
72
72
|
.cell-body-major__meta {
|
|
73
73
|
display: inline-block;
|
|
74
|
-
padding: 0
|
|
75
|
-
margin-left:
|
|
76
|
-
min-width:
|
|
77
|
-
height:
|
|
74
|
+
padding: 0 4px;
|
|
75
|
+
margin-left: 8px;
|
|
76
|
+
min-width: 16px;
|
|
77
|
+
height: 16px;
|
|
78
78
|
text-align: center;
|
|
79
|
-
line-height:
|
|
79
|
+
line-height: 16px;
|
|
80
80
|
color: #fff;
|
|
81
81
|
background-color: #e05d44;
|
|
82
|
-
border-radius:
|
|
82
|
+
border-radius: 16px;
|
|
83
83
|
}
|
|
84
84
|
.cell-body-minor {
|
|
85
85
|
color: #9d9d9d;
|
|
86
86
|
font-size: 12px;
|
|
87
|
-
margin-top:
|
|
87
|
+
margin-top: 3px;
|
|
88
88
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports=Behavior({properties:{props:{type:Object,value:{}}},methods:{close(e){this.triggerEvent("close",{result:e})}}});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@we-debug/miniprogram",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.51.0",
|
|
4
4
|
"description": "we-debug miniprogram component",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "dlhandsome"
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
},
|
|
27
27
|
"license": "MIT",
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@we-debug/core": "0.
|
|
29
|
+
"@we-debug/core": "0.51.0"
|
|
30
30
|
},
|
|
31
31
|
"readme": "ERROR: No README data found!",
|
|
32
32
|
"_id": "@we-debug/core@0.3.5",
|
|
33
33
|
"_commitid": "6c3f04b",
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "22641ac4972a154619c6dc8f44b1bfdcbb92c8eb"
|
|
35
35
|
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/* eslint-env jest */
|
|
2
|
+
const mockDebug = {
|
|
3
|
+
event: {
|
|
4
|
+
on: jest.fn(),
|
|
5
|
+
off: jest.fn()
|
|
6
|
+
},
|
|
7
|
+
releasePageOverlays: jest.fn(),
|
|
8
|
+
getPageOverlays: jest.fn(() => [])
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
jest.mock('@we-debug/core', () => ({ default: mockDebug }));
|
|
12
|
+
|
|
13
|
+
test('缺少 getPageId 时警告且不注册或释放浮层监听', () => {
|
|
14
|
+
const warn = jest.spyOn(console, 'warn').mockImplementation(() => {});
|
|
15
|
+
global.Behavior = jest.fn(options => options);
|
|
16
|
+
const behavior = require('../src/host-behavior');
|
|
17
|
+
const host = { data: { mode: 'overlay' } };
|
|
18
|
+
|
|
19
|
+
behavior.lifetimes.attached.call(host);
|
|
20
|
+
behavior.lifetimes.detached.call(host);
|
|
21
|
+
|
|
22
|
+
expect(warn).toHaveBeenCalledWith('[we-debug] 当前基础库不支持 getPageId,插件浮层不可用');
|
|
23
|
+
expect(mockDebug.event.on).not.toHaveBeenCalled();
|
|
24
|
+
expect(mockDebug.event.off).not.toHaveBeenCalled();
|
|
25
|
+
expect(mockDebug.releasePageOverlays).not.toHaveBeenCalled();
|
|
26
|
+
warn.mockRestore();
|
|
27
|
+
});
|