distinctui-uni 0.1.5 → 0.2.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.
@@ -156,7 +156,7 @@ export default {
156
156
  // 按钮字体颜色
157
157
  color: {
158
158
  type: String,
159
- default: "#FFFFFF"
159
+ default: ""
160
160
  },
161
161
  // 是否显示加载图标
162
162
  loading: {
@@ -307,7 +307,7 @@ export default {
307
307
  return radius;
308
308
  },
309
309
  getColor() {
310
- return this.getButtonStyle?.color || "#FFFFFF";
310
+ return this.color || this.getButtonStyle?.color || "#FFFFFF";
311
311
  },
312
312
  getFontSize() {
313
313
  const fontSize = this.fontSize || BTN_SIZE[this.size].fontSize || BTN_SIZE.normal.fontSize;
@@ -21,7 +21,7 @@
21
21
  :class="{ 'd-tabs__full': !alignLeft }"
22
22
  :id="tab.d_s_id"
23
23
  :data-ui-test="dataUiTestName"
24
- @tap="switchTab(index)"
24
+ @tap="switchTab(index, true)"
25
25
  >
26
26
  <view
27
27
  class="d-tabs__text-wrap"
@@ -217,8 +217,8 @@ export default {
217
217
  // item data-ui-test name
218
218
  dataUiTestName: {
219
219
  type: [String],
220
- default: ''
221
- },
220
+ default: ""
221
+ }
222
222
  },
223
223
  watch: {
224
224
  tabs(vals) {
@@ -281,7 +281,7 @@ export default {
281
281
  });
282
282
  }
283
283
  },
284
- switchTab(index) {
284
+ switchTab(index, isManual = false) {
285
285
  const item = {
286
286
  ...this.vals[index]
287
287
  };
@@ -290,10 +290,14 @@ export default {
290
290
  let scrollIndex = index - 1 < 0 ? 0 : index - 1;
291
291
  this.scrollInto = this.vals[scrollIndex].d_s_id;
292
292
  delete item.d_s_id;
293
- this.$emit("change", {
294
- index: index,
295
- ...item
296
- });
293
+ this.$emit(
294
+ "change",
295
+ {
296
+ index: index,
297
+ ...item
298
+ },
299
+ isManual
300
+ );
297
301
  }
298
302
  }
299
303
  };
package/lib/index.js CHANGED
@@ -13,7 +13,7 @@ import DTabs from './components/d-tabs/d-tabs.vue';
13
13
  }
14
14
  });
15
15
  }
16
- const version = '0.1.4';
16
+ const version = '0.1.5';
17
17
  export { install, version };
18
18
 
19
19
  export default { install, version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "distinctui-uni",
3
- "version": "0.1.5",
3
+ "version": "0.2.0",
4
4
  "description": "Distinct MiniProgram UI",
5
5
  "author": "benzheng <benzheng@distinctclinic.com>",
6
6
  "scripts": {