news-analyze/components/ui/progress/Progress.vue
吳元皓 e081c54624 feat: update footer link formatting and add shadcn-nuxt integration
- Refactored footer.vue to improve link formatting.
- Updated nuxt.config.ts to include shadcn-nuxt and added necessary HTML attributes and meta tags for SEO.
- Added new dependencies in package.json for class-variance-authority, clsx, lucide-vue-next, reka-ui, shadcn-nuxt, tailwind-merge, and tailwindcss-animate.
- Cleaned up unused template tags in headlines.vue, index.vue, and news/[provider]/[slug].vue.
- Simplified sources.vue template structure.
- Improved login.vue styles for better animation.
- Enhanced google.ts API handler for better error handling and code clarity.
- Updated find/newsOrg.ts to ensure consistent code style.
- Added CSS variables and improved Tailwind configuration in main.css and tailwind.config.js.
- Created components.json for shadcn integration and added new UI components (Alert, Button, Progress) with respective styles and variants.
- Implemented utility functions in utils.ts for class name merging and value updating.
2025-05-08 20:48:51 +08:00

39 lines
845 B
Vue

<script setup lang="ts">
import { cn } from "@/lib/utils";
import {
ProgressIndicator,
ProgressRoot,
type ProgressRootProps,
} from "reka-ui";
import { computed, type HTMLAttributes } from "vue";
const props = withDefaults(
defineProps<ProgressRootProps & { class?: HTMLAttributes["class"] }>(),
{
modelValue: 0,
},
);
const delegatedProps = computed(() => {
const { class: _, ...delegated } = props;
return delegated;
});
</script>
<template>
<ProgressRoot
v-bind="delegatedProps"
:class="
cn(
'relative h-2 w-full overflow-hidden rounded-full bg-primary/20',
props.class,
)
"
>
<ProgressIndicator
class="h-full w-full flex-1 bg-primary transition-all"
:style="`transform: translateX(-${100 - (props.modelValue ?? 0)}%);`"
/>
</ProgressRoot>
</template>