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/README.md
CHANGED
|
@@ -169,6 +169,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
|
|
169
169
|
<td align="center"><a href="https://github.com/qinwencheng"><img src="https://avatars.githubusercontent.com/u/24841685?v=4?s=100" width="100px;" alt=""/><br /><sub><b>qinwencheng</b></sub></a><br /><a href="https://github.com/DevCloudFE/vue-devui/commits?author=qinwencheng" title="Code">💻</a></td>
|
|
170
170
|
<td align="center"><a href="https://github.com/angelanana"><img src="https://avatars.githubusercontent.com/u/63281354?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Angelanana</b></sub></a><br /><a href="https://github.com/DevCloudFE/vue-devui/commits?author=angelanana" title="Code">💻</a></td>
|
|
171
171
|
<td align="center"><a href="https://github.com/joo1es"><img src="https://avatars.githubusercontent.com/u/76929557?v=4?s=100" width="100px;" alt=""/><br /><sub><b>joo1es</b></sub></a><br /><a href="https://github.com/DevCloudFE/vue-devui/commits?author=joo1es" title="Code">💻</a></td>
|
|
172
|
+
<td align="center"><a href="https://github.com/handsomezyw"><img src="https://avatars.githubusercontent.com/u/34366225?v=4?s=100" width="100px;" alt=""/><br /><sub><b>handsomezyw</b></sub></a><br /><a href="https://github.com/DevCloudFE/vue-devui/commits?author=handsomezyw" title="Code">💻</a></td>
|
|
172
173
|
</tr>
|
|
173
174
|
</table>
|
|
174
175
|
|
package/mention/index.es.js
CHANGED
|
@@ -8206,10 +8206,16 @@ var Mention = defineComponent({
|
|
|
8206
8206
|
}
|
|
8207
8207
|
emit("change", val.slice(1));
|
|
8208
8208
|
}, 300);
|
|
8209
|
-
const handleBlur = () => {
|
|
8210
|
-
|
|
8211
|
-
|
|
8212
|
-
}
|
|
8209
|
+
const handleBlur = (e) => {
|
|
8210
|
+
const {
|
|
8211
|
+
target
|
|
8212
|
+
} = e;
|
|
8213
|
+
const ele = document.querySelector(".devui-mention");
|
|
8214
|
+
if (!(ele == null ? void 0 : ele.contains(target))) {
|
|
8215
|
+
setTimeout(() => {
|
|
8216
|
+
showSuggestions.value = false;
|
|
8217
|
+
}, 100);
|
|
8218
|
+
}
|
|
8213
8219
|
};
|
|
8214
8220
|
const handleFocus = () => {
|
|
8215
8221
|
if (props.trigger.includes(textContext.value)) {
|
|
@@ -8221,7 +8227,7 @@ var Mention = defineComponent({
|
|
|
8221
8227
|
e.stopPropagation();
|
|
8222
8228
|
e.preventDefault();
|
|
8223
8229
|
showSuggestions.value = false;
|
|
8224
|
-
textContext.value
|
|
8230
|
+
textContext.value = textContext.value.substring(0, 1) + item[props.dmValueParse.value];
|
|
8225
8231
|
};
|
|
8226
8232
|
const arrowKeyDown = (e) => {
|
|
8227
8233
|
var _a, _b, _c;
|
|
@@ -8255,7 +8261,7 @@ var Mention = defineComponent({
|
|
|
8255
8261
|
e.stopPropagation();
|
|
8256
8262
|
e.preventDefault();
|
|
8257
8263
|
showSuggestions.value = false;
|
|
8258
|
-
textContext.value
|
|
8264
|
+
textContext.value = textContext.value.substring(0, 1) + filteredSuggestions.value[currentIndex.value][props.dmValueParse.value];
|
|
8259
8265
|
emit("select", filteredSuggestions.value[currentIndex.value]);
|
|
8260
8266
|
}
|
|
8261
8267
|
}
|
|
@@ -8270,10 +8276,12 @@ var Mention = defineComponent({
|
|
|
8270
8276
|
onMounted(() => {
|
|
8271
8277
|
window.addEventListener("keydown", arrowKeyDown);
|
|
8272
8278
|
window.addEventListener("keydown", enterKeyDown);
|
|
8279
|
+
document.addEventListener("click", handleBlur);
|
|
8273
8280
|
});
|
|
8274
8281
|
onUnmounted(() => {
|
|
8275
8282
|
window.removeEventListener("keydown", arrowKeyDown);
|
|
8276
8283
|
window.removeEventListener("keydown", enterKeyDown);
|
|
8284
|
+
document.removeEventListener("click", handleBlur);
|
|
8277
8285
|
});
|
|
8278
8286
|
return () => {
|
|
8279
8287
|
var _a;
|
|
@@ -8283,7 +8291,6 @@ var Mention = defineComponent({
|
|
|
8283
8291
|
"modelValue": textContext.value,
|
|
8284
8292
|
"onUpdate:modelValue": ($event) => textContext.value = $event,
|
|
8285
8293
|
"onUpdate": handleUpdate,
|
|
8286
|
-
"onBlur": handleBlur,
|
|
8287
8294
|
"onFocus": handleFocus
|
|
8288
8295
|
}, null), showSuggestions.value ? loading.value ? createVNode("div", {
|
|
8289
8296
|
"class": [`${ns2.e("suggestions")} ${ns2.e("suggestions-loading")}`]
|