vue-devui 1.0.1 → 1.0.2
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/README.md +1 -0
- package/mention/index.es.js +14 -7
- package/mention/index.umd.js +9 -9
- package/modal/style.css +1 -1
- package/package.json +1 -1
- package/pagination/index.es.js +2 -2
- package/pagination/index.umd.js +3 -3
- package/select/index.es.js +2 -2
- package/select/index.umd.js +3 -3
- package/style.css +1 -1
- package/tabs/index.es.js +42 -3
- package/tabs/index.umd.js +1 -1
- package/tabs/style.css +1 -1
- package/time-select/index.es.js +7 -4
- package/time-select/index.umd.js +3 -3
- package/vue-devui.es.js +63 -14
- package/vue-devui.umd.js +10 -10
package/vue-devui.es.js
CHANGED
|
@@ -16995,10 +16995,16 @@ var Mention = defineComponent({
|
|
|
16995
16995
|
}
|
|
16996
16996
|
emit("change", val.slice(1));
|
|
16997
16997
|
}, 300);
|
|
16998
|
-
const handleBlur = () => {
|
|
16999
|
-
|
|
17000
|
-
|
|
17001
|
-
}
|
|
16998
|
+
const handleBlur = (e) => {
|
|
16999
|
+
const {
|
|
17000
|
+
target
|
|
17001
|
+
} = e;
|
|
17002
|
+
const ele = document.querySelector(".devui-mention");
|
|
17003
|
+
if (!(ele == null ? void 0 : ele.contains(target))) {
|
|
17004
|
+
setTimeout(() => {
|
|
17005
|
+
showSuggestions.value = false;
|
|
17006
|
+
}, 100);
|
|
17007
|
+
}
|
|
17002
17008
|
};
|
|
17003
17009
|
const handleFocus = () => {
|
|
17004
17010
|
if (props.trigger.includes(textContext.value)) {
|
|
@@ -17010,7 +17016,7 @@ var Mention = defineComponent({
|
|
|
17010
17016
|
e.stopPropagation();
|
|
17011
17017
|
e.preventDefault();
|
|
17012
17018
|
showSuggestions.value = false;
|
|
17013
|
-
textContext.value
|
|
17019
|
+
textContext.value = textContext.value.substring(0, 1) + item[props.dmValueParse.value];
|
|
17014
17020
|
};
|
|
17015
17021
|
const arrowKeyDown = (e) => {
|
|
17016
17022
|
var _a, _b, _c;
|
|
@@ -17044,7 +17050,7 @@ var Mention = defineComponent({
|
|
|
17044
17050
|
e.stopPropagation();
|
|
17045
17051
|
e.preventDefault();
|
|
17046
17052
|
showSuggestions.value = false;
|
|
17047
|
-
textContext.value
|
|
17053
|
+
textContext.value = textContext.value.substring(0, 1) + filteredSuggestions.value[currentIndex.value][props.dmValueParse.value];
|
|
17048
17054
|
emit("select", filteredSuggestions.value[currentIndex.value]);
|
|
17049
17055
|
}
|
|
17050
17056
|
}
|
|
@@ -17059,10 +17065,12 @@ var Mention = defineComponent({
|
|
|
17059
17065
|
onMounted(() => {
|
|
17060
17066
|
window.addEventListener("keydown", arrowKeyDown);
|
|
17061
17067
|
window.addEventListener("keydown", enterKeyDown);
|
|
17068
|
+
document.addEventListener("click", handleBlur);
|
|
17062
17069
|
});
|
|
17063
17070
|
onUnmounted(() => {
|
|
17064
17071
|
window.removeEventListener("keydown", arrowKeyDown);
|
|
17065
17072
|
window.removeEventListener("keydown", enterKeyDown);
|
|
17073
|
+
document.removeEventListener("click", handleBlur);
|
|
17066
17074
|
});
|
|
17067
17075
|
return () => {
|
|
17068
17076
|
var _a;
|
|
@@ -17072,7 +17080,6 @@ var Mention = defineComponent({
|
|
|
17072
17080
|
"modelValue": textContext.value,
|
|
17073
17081
|
"onUpdate:modelValue": ($event) => textContext.value = $event,
|
|
17074
17082
|
"onUpdate": handleUpdate,
|
|
17075
|
-
"onBlur": handleBlur,
|
|
17076
17083
|
"onFocus": handleFocus
|
|
17077
17084
|
}, null), showSuggestions.value ? loading2.value ? createVNode("div", {
|
|
17078
17085
|
"class": [`${ns2.e("suggestions")} ${ns2.e("suggestions-loading")}`]
|
|
@@ -19099,7 +19106,7 @@ function useSelect$1(props, selectRef, ctx2, focus, blur, isSelectFocus, t) {
|
|
|
19099
19106
|
const newOption = {
|
|
19100
19107
|
name: value,
|
|
19101
19108
|
value,
|
|
19102
|
-
_checked:
|
|
19109
|
+
_checked: true
|
|
19103
19110
|
};
|
|
19104
19111
|
return value ? newOption : option2;
|
|
19105
19112
|
} else {
|
|
@@ -19191,7 +19198,7 @@ function useSelect$1(props, selectRef, ctx2, focus, blur, isSelectFocus, t) {
|
|
|
19191
19198
|
const tagDelete = (data) => {
|
|
19192
19199
|
let { modelValue } = props;
|
|
19193
19200
|
const checkedItems = [];
|
|
19194
|
-
for (const child of
|
|
19201
|
+
for (const child of selectedOptions.value) {
|
|
19195
19202
|
if (data.value === child.value) {
|
|
19196
19203
|
child._checked = false;
|
|
19197
19204
|
}
|
|
@@ -26092,9 +26099,48 @@ var TabNav = defineComponent({
|
|
|
26092
26099
|
onTabRemove,
|
|
26093
26100
|
onTabAdd
|
|
26094
26101
|
} = useTabNavEvent(ctx2);
|
|
26102
|
+
const handleTabAdd = () => {
|
|
26103
|
+
onTabAdd();
|
|
26104
|
+
nextTick(() => {
|
|
26105
|
+
if (tabsEle.value) {
|
|
26106
|
+
tabsEle.value.scrollLeft = tabsEle.value.scrollWidth;
|
|
26107
|
+
}
|
|
26108
|
+
});
|
|
26109
|
+
};
|
|
26110
|
+
let isSlide = false;
|
|
26111
|
+
const handleSlideTab = (mousedownEvent) => {
|
|
26112
|
+
if (tabsEle.value) {
|
|
26113
|
+
const mousedownX = mousedownEvent.clientX;
|
|
26114
|
+
const scrollLeft = tabsEle.value.scrollLeft;
|
|
26115
|
+
isSlide = true;
|
|
26116
|
+
tabsEle.value.addEventListener("mousemove", (mousemoveEvent) => {
|
|
26117
|
+
if (isSlide && tabsEle.value) {
|
|
26118
|
+
const mousemoveX = mousemoveEvent.clientX;
|
|
26119
|
+
const scrollWidth = mousemoveX - mousedownX;
|
|
26120
|
+
tabsEle.value.scrollLeft = scrollLeft - scrollWidth;
|
|
26121
|
+
}
|
|
26122
|
+
});
|
|
26123
|
+
tabsEle.value.addEventListener("mouseup", () => {
|
|
26124
|
+
isSlide = false;
|
|
26125
|
+
});
|
|
26126
|
+
tabsEle.value.addEventListener("mouseleave", () => {
|
|
26127
|
+
isSlide = false;
|
|
26128
|
+
});
|
|
26129
|
+
}
|
|
26130
|
+
};
|
|
26095
26131
|
onUpdated(() => update());
|
|
26096
26132
|
onBeforeMount(() => beforeMount());
|
|
26097
|
-
onMounted(() =>
|
|
26133
|
+
onMounted(() => {
|
|
26134
|
+
mounted();
|
|
26135
|
+
if (tabsEle.value) {
|
|
26136
|
+
tabsEle.value.addEventListener("mousedown", handleSlideTab);
|
|
26137
|
+
}
|
|
26138
|
+
});
|
|
26139
|
+
onUnmounted(() => {
|
|
26140
|
+
if (tabsEle.value) {
|
|
26141
|
+
tabsEle.value.removeEventListener("mousedown", handleSlideTab);
|
|
26142
|
+
}
|
|
26143
|
+
});
|
|
26098
26144
|
watch(() => props.modelValue, () => {
|
|
26099
26145
|
const tab2 = tabsList.value.find((item) => item.props.id === props.modelValue);
|
|
26100
26146
|
if (tab2) {
|
|
@@ -26113,7 +26159,7 @@ var TabNav = defineComponent({
|
|
|
26113
26159
|
};
|
|
26114
26160
|
const newButton = props.addable ? createVNode("li", {
|
|
26115
26161
|
"class": ns2.e("new-tab"),
|
|
26116
|
-
"onClick":
|
|
26162
|
+
"onClick": handleTabAdd
|
|
26117
26163
|
}, [createVNode(resolveComponent("d-icon"), {
|
|
26118
26164
|
"name": "add"
|
|
26119
26165
|
}, null)]) : null;
|
|
@@ -26752,7 +26798,10 @@ function useTimeSelect(props, ctx2) {
|
|
|
26752
26798
|
});
|
|
26753
26799
|
const step2 = computed(() => {
|
|
26754
26800
|
const stepTime = parseTimeToNumber(props.step);
|
|
26755
|
-
|
|
26801
|
+
if (stepTime && stepTime.hour >= 0 && stepTime.minute >= 0 && stepTime.hour + stepTime.minute > 0) {
|
|
26802
|
+
return formatTime(stepTime);
|
|
26803
|
+
}
|
|
26804
|
+
return "00:30";
|
|
26756
26805
|
});
|
|
26757
26806
|
const minTime = computed(() => {
|
|
26758
26807
|
const min = parseTimeToNumber(props.minTime);
|
|
@@ -26782,7 +26831,7 @@ function useTimeSelect(props, ctx2) {
|
|
|
26782
26831
|
list2.push({
|
|
26783
26832
|
value: currentTime,
|
|
26784
26833
|
name: currentTime,
|
|
26785
|
-
disabled: compareTime(current, minTime.value || "-1:-1")
|
|
26834
|
+
disabled: compareTime(current, minTime.value || "-1:-1") < 0 || compareTime(current, maxTime.value || "24:00") > 0
|
|
26786
26835
|
});
|
|
26787
26836
|
current = nextTime(current, step2.value);
|
|
26788
26837
|
}
|
|
@@ -30046,7 +30095,7 @@ const installs = [
|
|
|
30046
30095
|
UploadInstall
|
|
30047
30096
|
];
|
|
30048
30097
|
var vueDevui = {
|
|
30049
|
-
version: "1.0.
|
|
30098
|
+
version: "1.0.1",
|
|
30050
30099
|
install(app) {
|
|
30051
30100
|
installs.forEach((p) => app.use(p));
|
|
30052
30101
|
}
|