Replace the inline SVG icon set with the vuesax linear pack, add skeleton primitives for loading states, and keep page scroll inside the app shell. Co-authored-by: Cursor <cursoragent@cursor.com>
27 lines
550 B
Vue
27 lines
550 B
Vue
<script setup lang="ts">
|
|
import { toRef } from 'vue';
|
|
import { Skeleton as ASkeleton } from 'ant-design-vue';
|
|
import { useCrmSkeletonLoading } from './context';
|
|
|
|
const props = withDefaults(
|
|
defineProps<{
|
|
loading?: boolean;
|
|
rows?: number;
|
|
width?: string | number | Array<string | number>;
|
|
}>(),
|
|
{ rows: 3 },
|
|
);
|
|
|
|
const isLoading = useCrmSkeletonLoading(toRef(props, 'loading'));
|
|
</script>
|
|
|
|
<template>
|
|
<a-skeleton
|
|
v-if="isLoading"
|
|
active
|
|
:title="false"
|
|
:paragraph="{ rows, width }"
|
|
/>
|
|
<slot v-else />
|
|
</template>
|