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: "
|
|
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(
|
|
294
|
-
|
|
295
|
-
|
|
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