dev: hotfix, moved combobox and datepicker

This commit is contained in:
2025-10-11 00:25:44 +07:00
parent f94b6d273a
commit 3a4b2aa6fb
25 changed files with 53 additions and 33 deletions
@@ -1,16 +1,11 @@
<script setup lang="ts">
import { cn } from '~/lib/utils'
interface Item {
value: string | number
label: string
code?: string
priority?: number
}
import { type Item } from './index'
const props = defineProps<{
id: string
modelValue?: string | number
id?: string
modelValue?: string
items: Item[]
placeholder?: string
searchPlaceholder?: string
@@ -20,7 +15,7 @@ const props = defineProps<{
}>()
const emit = defineEmits<{
'update:modelValue': [value: string | number]
'update:modelValue': [value: string]
}>()
const open = ref(false)
@@ -0,0 +1,25 @@
export interface Item {
value: string
label: string
code?: string
priority?: number
}
export function recStrToItem(input: Record<string, string>): Item[] {
console.log(input)
const items: Item[] = []
let idx = 0;
for (const key in input) {
if (input.hasOwnProperty(key)) {
const value = input[key]
items.push({
value: key || ('unknown-' + idx),
label: input[key] || ('unknown-' + idx),
})
}
idx++
}
return items
}
export { default as Combobox } from './combobox.vue'