change responsive]

This commit is contained in:
2026-05-31 11:51:52 +03:30
parent 06568c5858
commit 023b8ee5be
124 changed files with 6296 additions and 4233 deletions
@@ -0,0 +1,51 @@
<template>
<MobileCardList
v-model:search="search"
:loading="loading"
:has-more="hasMore"
:show-empty="!loading && items.length === 0"
empty-text="رکوردی یافت نشد"
@search="reload"
@load-more="loadMore"
>
<AccountingMobileListItem
v-for="item in items"
:key="item.id"
:item="item"
@open="openSheet"
/>
</MobileCardList>
<AccountingMobileDetailSheet
v-model:visible="sheetVisible"
:item="selectedItem"
@info="$emit('info', $event)"
@orders="$emit('orders', $event)"
/>
</template>
<script setup lang="ts">
import { getTotalAccountingTable } from '@/api/accounting'
import type { TotalAccounting } from '@/model/accounting'
import MobileCardList from '@/components/mobile/MobileCardList.vue'
import { useMobileDetailSheet } from '@/components/mobile/composables/useMobileDetailSheet'
import { useMobileTableList } from '@/components/mobile/composables/useMobileTableList'
import AccountingMobileDetailSheet from './AccountingMobileDetailSheet.vue'
import AccountingMobileListItem from './AccountingMobileListItem.vue'
defineEmits<{
(e: 'info', item: TotalAccounting): void
(e: 'orders', item: TotalAccounting): void
}>()
const { sheetVisible, selectedItem, openSheet, syncSelectedItem } = useMobileDetailSheet<TotalAccounting>()
const { loading, search, items, hasMore, reload, loadMore, fetch } = useMobileTableList<TotalAccounting>({
fetchApi: getTotalAccountingTable,
onFetched: (rows) => syncSelectedItem(rows)
})
onMounted(() => reload())
defineExpose({ fetch, openSheet })
</script>