pukaad-ui-lib 1.188.1 → 1.189.0
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/dist/module.json
CHANGED
|
@@ -16,9 +16,11 @@ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
|
16
16
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
17
|
select: (province: Province) => any;
|
|
18
18
|
"update:modelValue": (value: Province | undefined) => any;
|
|
19
|
+
open: () => any;
|
|
19
20
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
20
21
|
onSelect?: ((province: Province) => any) | undefined;
|
|
21
22
|
"onUpdate:modelValue"?: ((value: Province | undefined) => any) | undefined;
|
|
23
|
+
onOpen?: (() => any) | undefined;
|
|
22
24
|
}>, {
|
|
23
25
|
items: Province[];
|
|
24
26
|
itemsPopular: Province[];
|
|
@@ -98,15 +98,20 @@
|
|
|
98
98
|
</template>
|
|
99
99
|
|
|
100
100
|
<script setup>
|
|
101
|
-
import { ref, computed } from "vue";
|
|
101
|
+
import { ref, computed, watch } from "vue";
|
|
102
102
|
const props = defineProps({
|
|
103
103
|
items: { type: Array, required: false, default: () => [] },
|
|
104
104
|
itemsPopular: { type: Array, required: false, default: () => [] }
|
|
105
105
|
});
|
|
106
|
-
const emit = defineEmits(["select"]);
|
|
106
|
+
const emit = defineEmits(["select", "open"]);
|
|
107
107
|
const modelValue = defineModel({ type: Object });
|
|
108
108
|
const open = ref(false);
|
|
109
109
|
const search = ref("");
|
|
110
|
+
watch(open, (isOpen) => {
|
|
111
|
+
if (isOpen) {
|
|
112
|
+
emit("open");
|
|
113
|
+
}
|
|
114
|
+
});
|
|
110
115
|
const selectedLabel = computed(() => {
|
|
111
116
|
return modelValue.value?.name_th || "";
|
|
112
117
|
});
|
|
@@ -16,9 +16,11 @@ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
|
16
16
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
17
|
select: (province: Province) => any;
|
|
18
18
|
"update:modelValue": (value: Province | undefined) => any;
|
|
19
|
+
open: () => any;
|
|
19
20
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
20
21
|
onSelect?: ((province: Province) => any) | undefined;
|
|
21
22
|
"onUpdate:modelValue"?: ((value: Province | undefined) => any) | undefined;
|
|
23
|
+
onOpen?: (() => any) | undefined;
|
|
22
24
|
}>, {
|
|
23
25
|
items: Province[];
|
|
24
26
|
itemsPopular: Province[];
|