@we-debug/plugin-error 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 +11 -0
- package/dist/index.js +10 -1
- package/package.json +2 -2
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.51.0](https://github.com/dlhandsome/we-debug/compare/v0.50.0...v0.51.0) (2026-12-01)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **miniprogram:** responsive debug panel and floating launcher ([eb08b8c](https://github.com/dlhandsome/we-debug/commit/eb08b8c6b09faab4ad2cb4aa25ae0141c347c912))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [0.50.0](https://github.com/dlhandsome/we-debug/compare/v0.49.2...v0.50.0) (2026-11-27)
|
|
7
18
|
|
|
8
19
|
|
package/dist/index.js
CHANGED
|
@@ -35,13 +35,20 @@ ErrorPlugin.install = function (weDebug, options) {
|
|
|
35
35
|
return;
|
|
36
36
|
ErrorPlugin.installed = true;
|
|
37
37
|
var badgeOption = options.badge || {};
|
|
38
|
+
var hasLauncher = function () {
|
|
39
|
+
return weDebug
|
|
40
|
+
.getBadge()
|
|
41
|
+
.some(function (badge) {
|
|
42
|
+
return badge.type === 'launcher' && (typeof badge.show === 'function' ? badge.show() : badge.show);
|
|
43
|
+
});
|
|
44
|
+
};
|
|
38
45
|
var copyOption = options.copyRule || {};
|
|
39
46
|
var clearOption = options.clearRule || {};
|
|
40
47
|
var errorBadge = weDebug.createBadge(Object.assign({}, {
|
|
41
48
|
key: 'error',
|
|
42
49
|
value: 0,
|
|
43
50
|
color: 'red',
|
|
44
|
-
show: function () { return
|
|
51
|
+
show: function () { return !hasLauncher(); },
|
|
45
52
|
draggable: true,
|
|
46
53
|
position: {
|
|
47
54
|
right: 0,
|
|
@@ -80,6 +87,7 @@ ErrorPlugin.install = function (weDebug, options) {
|
|
|
80
87
|
if (!state.disabled) {
|
|
81
88
|
errManage.clear();
|
|
82
89
|
updateState();
|
|
90
|
+
weDebug.hideLauncherDot('error');
|
|
83
91
|
}
|
|
84
92
|
}
|
|
85
93
|
}
|
|
@@ -102,6 +110,7 @@ ErrorPlugin.install = function (weDebug, options) {
|
|
|
102
110
|
wx.onError(function (err) {
|
|
103
111
|
errManage.add(err);
|
|
104
112
|
updateState();
|
|
113
|
+
weDebug.showLauncherDot('error', { group: weDebug.DEFAULT_GROUP.SYSTEM });
|
|
105
114
|
});
|
|
106
115
|
wx.onAppRoute &&
|
|
107
116
|
wx.onAppRoute(function () {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@we-debug/plugin-error",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.51.0",
|
|
4
4
|
"description": "error plugin for we-debug",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/types.d.ts",
|
|
@@ -17,5 +17,5 @@
|
|
|
17
17
|
"readme": "ERROR: No README data found!",
|
|
18
18
|
"_id": "@we-debug/plugin-error@0.1.6",
|
|
19
19
|
"_commitid": "ea9904d",
|
|
20
|
-
"gitHead": "
|
|
20
|
+
"gitHead": "22641ac4972a154619c6dc8f44b1bfdcbb92c8eb"
|
|
21
21
|
}
|