@appscode/design-system 2.6.2 → 2.6.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.
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { defineAsyncComponent, ref, watch } from "vue";
|
|
2
|
+
import { defineAsyncComponent, ref, watch, onMounted } from "vue";
|
|
3
3
|
|
|
4
4
|
interface prop {
|
|
5
5
|
name?: string;
|
|
@@ -14,7 +14,7 @@ interface prop {
|
|
|
14
14
|
showStar?: boolean;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
withDefaults(defineProps<prop>(), {
|
|
17
|
+
const props = withDefaults(defineProps<prop>(), {
|
|
18
18
|
name: "",
|
|
19
19
|
inputType: "text",
|
|
20
20
|
customClass: "",
|
|
@@ -39,7 +39,7 @@ function onFocusInput() {
|
|
|
39
39
|
triggerInput();
|
|
40
40
|
}
|
|
41
41
|
function onFocusOutInput() {
|
|
42
|
-
if (!model.value) isLabelHoisted.value = false;
|
|
42
|
+
if (!model.value && props.inputType !== "date" && props.inputType !== "datetime-local") isLabelHoisted.value = false;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
function onClickLabel() {
|
|
@@ -58,6 +58,10 @@ watch(
|
|
|
58
58
|
},
|
|
59
59
|
{ immediate: true },
|
|
60
60
|
);
|
|
61
|
+
|
|
62
|
+
onMounted(() => {
|
|
63
|
+
if (props.inputType === "date" || props.inputType === "datetime-local") triggerInput();
|
|
64
|
+
});
|
|
61
65
|
</script>
|
|
62
66
|
|
|
63
67
|
<template>
|
|
@@ -8,6 +8,7 @@ interface Props {
|
|
|
8
8
|
errorMsg?: string;
|
|
9
9
|
placeholderText?: string;
|
|
10
10
|
disabled?: boolean;
|
|
11
|
+
isMultiSelect?: boolean;
|
|
11
12
|
label?: string;
|
|
12
13
|
taggable?: boolean;
|
|
13
14
|
allowEmpty?: boolean;
|
|
@@ -33,6 +34,7 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
33
34
|
errorMsg: "",
|
|
34
35
|
placeholderText: "",
|
|
35
36
|
disabled: false,
|
|
37
|
+
isMultiSelect: false,
|
|
36
38
|
label: "",
|
|
37
39
|
allowEmpty: false,
|
|
38
40
|
options: () => [],
|
|
@@ -135,6 +137,7 @@ const onSelect = (selectedOption: unknown, id: string) => emit("select", selecte
|
|
|
135
137
|
<multiselect
|
|
136
138
|
ref="multiselectElement"
|
|
137
139
|
v-model="model"
|
|
140
|
+
:multiple="isMultiSelect"
|
|
138
141
|
:track-by="trackBy"
|
|
139
142
|
:label="showBy"
|
|
140
143
|
:class="multiselectCustomClass"
|