@we-debug/miniprogram 0.42.4 → 0.42.6
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 +22 -0
- package/dist/json-view/index.js +22 -6
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,28 @@
|
|
|
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.42.6](https://github.com/dlhandsome/we-debug/compare/v0.42.5...v0.42.6) (2025-03-10)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **miniprogram:** fixed json view handler ([2e0da5a](https://github.com/dlhandsome/we-debug/commit/2e0da5a317093192c74e020f06a08bc17f78eb15))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [0.42.5](https://github.com/dlhandsome/we-debug/compare/v0.42.4...v0.42.5) (2025-03-09)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* **miniprogram:** fixed json view render ([79edd5e](https://github.com/dlhandsome/we-debug/commit/79edd5ea73dd1279d5873a06b34553b394258123))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
6
28
|
## [0.42.4](https://github.com/dlhandsome/we-debug/compare/v0.42.3...v0.42.4) (2025-03-09)
|
|
7
29
|
|
|
8
30
|
|
package/dist/json-view/index.js
CHANGED
|
@@ -20,7 +20,6 @@ Component({
|
|
|
20
20
|
'config.data'(v) {
|
|
21
21
|
const jsonData = isFunc(v) ? v() : v;
|
|
22
22
|
this.onDataChange(jsonData);
|
|
23
|
-
this.setData({ jsonData });
|
|
24
23
|
},
|
|
25
24
|
'config.editable'(v) {
|
|
26
25
|
const editable = isFunc(v) ? v() : v;
|
|
@@ -58,17 +57,15 @@ Component({
|
|
|
58
57
|
store.event.off(prefix + ':emit', this.emit.bind(this));
|
|
59
58
|
},
|
|
60
59
|
emit(opt) {
|
|
61
|
-
this.setData({
|
|
62
|
-
...this.properties.config,
|
|
63
|
-
...opt
|
|
64
|
-
});
|
|
65
|
-
|
|
66
60
|
if (opt.data) {
|
|
67
61
|
this.onDataChange(opt.data);
|
|
68
62
|
}
|
|
69
63
|
},
|
|
70
64
|
onDataChange(jsonData) {
|
|
71
65
|
if (jsonData) {
|
|
66
|
+
this.setData({
|
|
67
|
+
jsonData
|
|
68
|
+
});
|
|
72
69
|
const formatted = this.formatJson(jsonData);
|
|
73
70
|
this.setData({ formattedData: formatted });
|
|
74
71
|
if (this.data.expandLevel >= 0) {
|
|
@@ -509,6 +506,10 @@ Component({
|
|
|
509
506
|
value: updatedData,
|
|
510
507
|
changes: changedData
|
|
511
508
|
});
|
|
509
|
+
this.bindChangeHandler({
|
|
510
|
+
value: updatedData,
|
|
511
|
+
changes: changedData
|
|
512
|
+
});
|
|
512
513
|
|
|
513
514
|
// 更新显示
|
|
514
515
|
this.setData({
|
|
@@ -669,6 +670,10 @@ Component({
|
|
|
669
670
|
value: newData,
|
|
670
671
|
changes: changedData
|
|
671
672
|
});
|
|
673
|
+
this.bindChangeHandler({
|
|
674
|
+
value: newData,
|
|
675
|
+
changes: changedData
|
|
676
|
+
});
|
|
672
677
|
|
|
673
678
|
this.setData({
|
|
674
679
|
formattedData: newFormattedData
|
|
@@ -711,10 +716,21 @@ Component({
|
|
|
711
716
|
value: newData,
|
|
712
717
|
changes: changedData
|
|
713
718
|
});
|
|
719
|
+
this.bindChangeHandler({
|
|
720
|
+
value: newData,
|
|
721
|
+
changes: changedData
|
|
722
|
+
});
|
|
714
723
|
|
|
715
724
|
this.setData({
|
|
716
725
|
formattedData: restoredData
|
|
717
726
|
});
|
|
727
|
+
},
|
|
728
|
+
bindChangeHandler(data) {
|
|
729
|
+
const handler = this.properties.config.handler;
|
|
730
|
+
|
|
731
|
+
if (handler && handler.bindChange && isFunc(handler.bindChange)) {
|
|
732
|
+
handler.bindChange.call(this, data);
|
|
733
|
+
}
|
|
718
734
|
}
|
|
719
735
|
},
|
|
720
736
|
attached() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@we-debug/miniprogram",
|
|
3
|
-
"version": "0.42.
|
|
3
|
+
"version": "0.42.6",
|
|
4
4
|
"description": "we-debug miniprogram component",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "dlhandsome"
|
|
@@ -31,5 +31,5 @@
|
|
|
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": "ec91eafcec743594fcacd148a27c54e83ce6e14e"
|
|
35
35
|
}
|