fixed ui and some bugs

This commit is contained in:
2026-06-28 21:48:17 +03:30
parent 34be7a66dc
commit 218d3e9f5e
25 changed files with 1374 additions and 371 deletions
@@ -31,6 +31,18 @@
</a-select-option>
</a-select>
<a-time-picker
v-else-if="fieldType === 'time'"
:value="modelValue || undefined"
:disabled="disabled"
class="w-full"
format="HH:mm"
value-format="HH:mm:ss"
:minute-step="5"
placeholder="انتخاب ساعت"
@update:value="onTimeChange"
/>
<a-input-number
v-else-if="fieldType === 'price'"
:value="priceValue"
@@ -130,6 +142,12 @@ function onSelectChange(val: string | undefined) {
emit('update:value', val ?? '')
}
function onTimeChange(val: string | string[] | undefined) {
const v = Array.isArray(val) ? val[0] : val
emit('update:value', v ?? '')
emit('blur')
}
const priceValue = computed(() => {
const n = parseFloat(String(props.modelValue || '').replace(/,/g, ''))
return Number.isFinite(n) ? n : undefined