pukaad-ui-lib 1.289.0 → 1.291.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 +1 -1
- package/dist/runtime/components/card/card-place.d.vue.ts +5 -6
- package/dist/runtime/components/card/card-place.vue +39 -14
- package/dist/runtime/components/card/card-place.vue.d.ts +5 -6
- package/dist/runtime/components/image/image-cropper.d.vue.ts +2 -2
- package/dist/runtime/components/image/image-cropper.vue.d.ts +2 -2
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
export interface PlaceAddress {
|
|
2
|
-
full_address?: string;
|
|
3
|
-
}
|
|
4
1
|
export interface PlaceItem {
|
|
5
2
|
id?: string;
|
|
3
|
+
name?: string;
|
|
4
|
+
cover_image?: string;
|
|
5
|
+
address?: string;
|
|
6
6
|
business_name?: string;
|
|
7
|
+
image_cover?: string;
|
|
8
|
+
full_address?: string;
|
|
7
9
|
description?: string;
|
|
8
|
-
address?: PlaceAddress;
|
|
9
10
|
rating?: number;
|
|
10
|
-
image_cover?: string;
|
|
11
|
-
review_count?: number;
|
|
12
11
|
like_count?: number;
|
|
13
12
|
}
|
|
14
13
|
type __VLS_Props = {
|
|
@@ -1,28 +1,42 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="flex gap-[16px] items-center">
|
|
3
|
-
<Image
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
<Image
|
|
4
|
+
v-if="coverImage"
|
|
5
|
+
:src="coverImage"
|
|
6
|
+
width="227"
|
|
7
|
+
height="128"
|
|
8
|
+
class="rounded-[4px] flex-shrink-0 object-cover"
|
|
9
|
+
/>
|
|
10
|
+
<div
|
|
11
|
+
v-else
|
|
12
|
+
class="w-[227px] h-[128px] rounded-[4px] flex-shrink-0 bg-cloud flex items-center justify-center"
|
|
13
|
+
>
|
|
6
14
|
<Icon name="pukaad:map-location-dot" :size="36" class="text-gray" />
|
|
7
15
|
</div>
|
|
8
16
|
<div class="flex flex-col gap-[4px]">
|
|
9
|
-
<div v-if="
|
|
10
|
-
{{
|
|
17
|
+
<div v-if="placeName" class="font-title-small-promient">
|
|
18
|
+
{{ placeName }}
|
|
11
19
|
</div>
|
|
12
20
|
|
|
13
21
|
<div class="flex items-center gap-[4px] font-body-medium text-gray">
|
|
14
|
-
<InputRating
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
22
|
+
<InputRating
|
|
23
|
+
:size="10"
|
|
24
|
+
readonly
|
|
25
|
+
:model-value="props.item?.rating || 0"
|
|
26
|
+
/>
|
|
27
|
+
<template v-if="props.item?.like_count !== void 0">
|
|
28
|
+
<span>•</span>
|
|
29
|
+
<span>ถูกใจ {{ convertNumber(props.item.like_count) }}</span>
|
|
30
|
+
</template>
|
|
20
31
|
</div>
|
|
21
32
|
|
|
22
|
-
<div v-if="
|
|
23
|
-
{{
|
|
33
|
+
<div v-if="placeAddress" class="font-body-medium text-gray">
|
|
34
|
+
{{ placeAddress }}
|
|
24
35
|
</div>
|
|
25
|
-
<div
|
|
36
|
+
<div
|
|
37
|
+
v-if="props.item?.description"
|
|
38
|
+
class="font-body-medium text-gray line-clamp-2"
|
|
39
|
+
>
|
|
26
40
|
{{ props.item.description }}
|
|
27
41
|
</div>
|
|
28
42
|
</div>
|
|
@@ -30,9 +44,20 @@
|
|
|
30
44
|
</template>
|
|
31
45
|
|
|
32
46
|
<script setup>
|
|
47
|
+
import { computed } from "vue";
|
|
33
48
|
import { useConvert } from "../../composables/useConvert";
|
|
34
49
|
const { convertNumber } = useConvert();
|
|
35
50
|
const props = defineProps({
|
|
36
51
|
item: { type: Object, required: false, default: () => ({}) }
|
|
37
52
|
});
|
|
53
|
+
const coverImage = computed(
|
|
54
|
+
() => props.item?.cover_image || props.item?.image_cover || ""
|
|
55
|
+
);
|
|
56
|
+
const placeName = computed(
|
|
57
|
+
() => props.item?.name || props.item?.business_name || ""
|
|
58
|
+
);
|
|
59
|
+
const placeAddress = computed(() => {
|
|
60
|
+
if (typeof props.item?.address === "string") return props.item.address;
|
|
61
|
+
return props.item?.full_address || "";
|
|
62
|
+
});
|
|
38
63
|
</script>
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
export interface PlaceAddress {
|
|
2
|
-
full_address?: string;
|
|
3
|
-
}
|
|
4
1
|
export interface PlaceItem {
|
|
5
2
|
id?: string;
|
|
3
|
+
name?: string;
|
|
4
|
+
cover_image?: string;
|
|
5
|
+
address?: string;
|
|
6
6
|
business_name?: string;
|
|
7
|
+
image_cover?: string;
|
|
8
|
+
full_address?: string;
|
|
7
9
|
description?: string;
|
|
8
|
-
address?: PlaceAddress;
|
|
9
10
|
rating?: number;
|
|
10
|
-
image_cover?: string;
|
|
11
|
-
review_count?: number;
|
|
12
11
|
like_count?: number;
|
|
13
12
|
}
|
|
14
13
|
type __VLS_Props = {
|
|
@@ -64,15 +64,15 @@ declare const __VLS_export: import("vue").DefineComponent<ImageCropperProps, {
|
|
|
64
64
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ImageCropperProps> & Readonly<{}>, {
|
|
65
65
|
src: string;
|
|
66
66
|
center: boolean;
|
|
67
|
-
background: boolean;
|
|
68
|
-
modal: boolean;
|
|
69
67
|
responsive: boolean;
|
|
70
68
|
restore: boolean;
|
|
71
69
|
checkCrossOrigin: boolean;
|
|
72
70
|
checkOrientation: boolean;
|
|
73
71
|
crossorigin: "" | "anonymous" | "use-credentials";
|
|
72
|
+
modal: boolean;
|
|
74
73
|
guides: boolean;
|
|
75
74
|
highlight: boolean;
|
|
75
|
+
background: boolean;
|
|
76
76
|
autoCrop: boolean;
|
|
77
77
|
movable: boolean;
|
|
78
78
|
rotatable: boolean;
|
|
@@ -64,15 +64,15 @@ declare const __VLS_export: import("vue").DefineComponent<ImageCropperProps, {
|
|
|
64
64
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ImageCropperProps> & Readonly<{}>, {
|
|
65
65
|
src: string;
|
|
66
66
|
center: boolean;
|
|
67
|
-
background: boolean;
|
|
68
|
-
modal: boolean;
|
|
69
67
|
responsive: boolean;
|
|
70
68
|
restore: boolean;
|
|
71
69
|
checkCrossOrigin: boolean;
|
|
72
70
|
checkOrientation: boolean;
|
|
73
71
|
crossorigin: "" | "anonymous" | "use-credentials";
|
|
72
|
+
modal: boolean;
|
|
74
73
|
guides: boolean;
|
|
75
74
|
highlight: boolean;
|
|
75
|
+
background: boolean;
|
|
76
76
|
autoCrop: boolean;
|
|
77
77
|
movable: boolean;
|
|
78
78
|
rotatable: boolean;
|