dfish-widget 1.0.99 → 1.0.100
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/lib/index.esm.js +36 -10
- package/lib/index.esm.js.map +1 -1
- package/package.json +1 -1
package/lib/index.esm.js
CHANGED
|
@@ -5667,7 +5667,12 @@ const props = __props;
|
|
|
5667
5667
|
return Array.isArray(props.current) ? props.current.includes(item[propValue]) : (props.current === item[propValue])
|
|
5668
5668
|
};
|
|
5669
5669
|
|
|
5670
|
+
let autoFocus = true;
|
|
5671
|
+
let autoFocusTimer;
|
|
5670
5672
|
const clickItem = (e, item) => {
|
|
5673
|
+
autoFocus = false;
|
|
5674
|
+
clearTimeout(autoFocusTimer);
|
|
5675
|
+
autoFocusTimer = setTimeout(() => autoFocus = true, 500);
|
|
5671
5676
|
emits('click:item', e, item);
|
|
5672
5677
|
};
|
|
5673
5678
|
|
|
@@ -5839,7 +5844,9 @@ const props = __props;
|
|
|
5839
5844
|
expandTo(v);
|
|
5840
5845
|
}
|
|
5841
5846
|
}
|
|
5842
|
-
|
|
5847
|
+
if (autoFocus) {
|
|
5848
|
+
focus(val[0]);
|
|
5849
|
+
}
|
|
5843
5850
|
};
|
|
5844
5851
|
|
|
5845
5852
|
onMounted(async () => {
|
|
@@ -6294,14 +6301,24 @@ var script$K = {
|
|
|
6294
6301
|
ref: 'quickCloseButton',
|
|
6295
6302
|
data: {isQuickCloseButton: true},
|
|
6296
6303
|
showDropIcon: false,
|
|
6297
|
-
icon: '.f-i .f-i-
|
|
6304
|
+
icon: '.f-i .f-i-close',
|
|
6298
6305
|
class: 'w-tabbar-quickclosebutton',
|
|
6299
|
-
|
|
6300
|
-
|
|
6301
|
-
|
|
6302
|
-
h(script$11, {text: '关闭全部标签', onClick: this.closeAll, disabled: closeAllDisabled})
|
|
6303
|
-
]
|
|
6306
|
+
onClick: this.closeAll,
|
|
6307
|
+
disabled: closeAllDisabled,
|
|
6308
|
+
title: '关闭全部标签'
|
|
6304
6309
|
}));
|
|
6310
|
+
// gut.push(h(Button, {
|
|
6311
|
+
// ref: 'quickCloseButton',
|
|
6312
|
+
// data: {isQuickCloseButton: true},
|
|
6313
|
+
// showDropIcon: false,
|
|
6314
|
+
// icon: '.f-i .f-i-ellipsis',
|
|
6315
|
+
// class: 'w-tabbar-quickclosebutton',
|
|
6316
|
+
// onDropClose: this.onMouseleave
|
|
6317
|
+
// }, {
|
|
6318
|
+
// default: () => [
|
|
6319
|
+
// h(Button, {text: '关闭全部标签', onClick: this.closeAll, disabled: closeAllDisabled})
|
|
6320
|
+
// ]
|
|
6321
|
+
// }))
|
|
6305
6322
|
}
|
|
6306
6323
|
}
|
|
6307
6324
|
return this.html_scroll_slots(gut)
|
|
@@ -6723,9 +6740,16 @@ const props = __props;
|
|
|
6723
6740
|
const isDisabled = (item, index) => {
|
|
6724
6741
|
return typeof propDisabled === 'function' ? propDisabled(item, index) : item[propDisabled]
|
|
6725
6742
|
};
|
|
6726
|
-
|
|
6743
|
+
|
|
6744
|
+
let autoFocus = true;
|
|
6745
|
+
let autoFocusTimer;
|
|
6727
6746
|
const clickItem = (e, item) => {
|
|
6728
|
-
if (!isDisabled(item))
|
|
6747
|
+
if (!isDisabled(item)) {
|
|
6748
|
+
autoFocus = false;
|
|
6749
|
+
clearTimeout(autoFocusTimer);
|
|
6750
|
+
autoFocusTimer = setTimeout(() => autoFocus = true, 500);
|
|
6751
|
+
emits('click:item', e, item);
|
|
6752
|
+
}
|
|
6729
6753
|
};
|
|
6730
6754
|
|
|
6731
6755
|
const clickToggle = (e, item) => {
|
|
@@ -6898,7 +6922,9 @@ const props = __props;
|
|
|
6898
6922
|
expandTo(v);
|
|
6899
6923
|
}
|
|
6900
6924
|
}
|
|
6901
|
-
|
|
6925
|
+
if (autoFocus) {
|
|
6926
|
+
focus(val[0]);
|
|
6927
|
+
}
|
|
6902
6928
|
};
|
|
6903
6929
|
|
|
6904
6930
|
onMounted(async () => {
|