@cloudbase/weda-ui-mp 3.7.13 → 3.7.14

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.
@@ -50,6 +50,10 @@ Component({
50
50
  this.setData({
51
51
  currentIndex: e.detail,
52
52
  });
53
+ const idx = e.detail;
54
+ this.triggerEvent('change', {
55
+ value: this.data.tabsData?.[idx]?.value,
56
+ });
53
57
  },
54
58
  choooseTab: function (params) {
55
59
  const value = params?.value;
@@ -91,7 +95,7 @@ Component({
91
95
  ]),
92
96
  },
93
97
  observers: {
94
- selectedValue: function (selectedValue) {
98
+ 'selectedValue, list': function (selectedValue) {
95
99
  this.setCurrentIndex(selectedValue);
96
100
  },
97
101
  'currentIndex, list': function (currentIndex, list) {
@@ -104,9 +108,6 @@ Component({
104
108
  this.setData({
105
109
  tabsData: tabData,
106
110
  });
107
- this.triggerEvent('change', {
108
- value: tabData.find((v) => v.selected)?.value,
109
- });
110
111
  this.updateWidgetAPI();
111
112
  },
112
113
  },
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "miniprogram": "./",
4
4
  "packageManager": "yarn@3.0.2",
5
5
  "dependencies": {},
6
- "version": "3.7.13",
6
+ "version": "3.7.14",
7
7
  "main": "./",
8
8
  "publishConfig": {
9
9
  "access": "public"