Add support panel UI, search filters, and money thousand separators.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-08 11:20:26 +03:30
co-authored by Cursor
parent ab4d9ef133
commit d0d621502f
13 changed files with 1169 additions and 132 deletions
+54
View File
@@ -0,0 +1,54 @@
<script setup lang="ts">
import { computed } from 'vue'
import { fromGroupedInput, toGroupedDisplay } from '@/utils/money'
const props = withDefaults(
defineProps<{
value: number | null | undefined
size?: 'large' | 'middle' | 'small'
placeholder?: string
allowNegative?: boolean
disabled?: boolean
}>(),
{
size: 'large',
placeholder: '',
allowNegative: false,
disabled: false,
},
)
const emit = defineEmits<{
(e: 'update:value', value: number): void
}>()
const display = computed(() => toGroupedDisplay(props.value ?? 0))
function onInput(raw: string | number) {
emit('update:value', fromGroupedInput(String(raw ?? ''), props.allowNegative))
}
</script>
<template>
<a-input
class="money-input"
dir="ltr"
:size="size"
:placeholder="placeholder"
:disabled="disabled"
:value="display"
@update:value="onInput"
/>
</template>
<style scoped>
.money-input {
width: 100%;
}
.money-input :deep(input) {
font-variant-numeric: tabular-nums;
text-align: left;
direction: ltr;
}
</style>