@fy-/fws-vue 1.3.2 → 1.3.4
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.
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { LinkIcon } from "@heroicons/vue/24/solid";
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
computed,
|
|
5
|
+
defineAsyncComponent,
|
|
6
|
+
onMounted,
|
|
7
|
+
onUnmounted,
|
|
8
|
+
ref,
|
|
9
|
+
toRef,
|
|
10
|
+
} from "vue";
|
|
4
11
|
import type { ErrorObject } from "@vuelidate/core";
|
|
5
12
|
import { useTranslation } from "../../composables/translations";
|
|
6
13
|
import DefaultTagInput from "./DefaultTagInput.vue";
|
|
@@ -96,12 +103,12 @@ const modelCheckbox = computed({
|
|
|
96
103
|
});
|
|
97
104
|
defineExpose({ focus, blur, getInputRef });
|
|
98
105
|
const dpComponent = ref<any | null>(null);
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}
|
|
106
|
+
|
|
107
|
+
if (!import.meta.env.SSR) {
|
|
108
|
+
dpComponent.value = defineAsyncComponent(
|
|
109
|
+
() => import("@vuepic/vue-datepicker"),
|
|
110
|
+
);
|
|
111
|
+
}
|
|
105
112
|
</script>
|
|
106
113
|
<template>
|
|
107
114
|
<div>
|
|
@@ -63,7 +63,6 @@ const removeTag = (index: number) => {
|
|
|
63
63
|
focusInput();
|
|
64
64
|
};
|
|
65
65
|
|
|
66
|
-
/*
|
|
67
66
|
const removeLastTag = () => {
|
|
68
67
|
if (!textInput.value) return;
|
|
69
68
|
if (textInput.value.innerText === "") {
|
|
@@ -85,7 +84,7 @@ const removeLastTag = () => {
|
|
|
85
84
|
}
|
|
86
85
|
}
|
|
87
86
|
};
|
|
88
|
-
|
|
87
|
+
|
|
89
88
|
const focusInput = () => {
|
|
90
89
|
if (!textInput.value) return;
|
|
91
90
|
|
|
@@ -110,6 +109,7 @@ const handlePaste = (e: any) => {
|
|
|
110
109
|
:class="`tags-input ${$props.error ? 'error' : ''}`"
|
|
111
110
|
@click="focusInput"
|
|
112
111
|
@keydown.enter.prevent="addTag"
|
|
112
|
+
@keydown.backspace.prevent="removeLastTag"
|
|
113
113
|
>
|
|
114
114
|
<span
|
|
115
115
|
v-for="(tag, index) in model"
|