From 53b8e674b5046709b57aa2122cea1a9e8c9b1182 Mon Sep 17 00:00:00 2001 From: snepsnepy Date: Tue, 15 Jul 2025 17:05:43 +0300 Subject: [PATCH] Added defineModel support for PreviewSlider component. --- src/components/common/PreviewSlider.vue | 20 +--- src/demo/Animations/AnimatedContentDemo.vue | 6 -- src/demo/Animations/BlobCursorDemo.vue | 93 ++----------------- src/demo/Animations/ClickSparkDemo.vue | 47 ++-------- src/demo/Animations/FadeContentDemo.vue | 4 - src/demo/Animations/MagnetDemo.vue | 2 - src/demo/Animations/MetaBallsDemo.vue | 30 ------ src/demo/Animations/MetallicPaintDemo.vue | 5 - src/demo/Animations/PixelTransitionDemo.vue | 13 +-- src/demo/Backgrounds/AuroraDemo.vue | 36 +------ src/demo/Backgrounds/BeamsDemo.vue | 63 ++----------- src/demo/Backgrounds/DotGridDemo.vue | 76 ++------------- src/demo/Backgrounds/IridescenceDemo.vue | 3 +- src/demo/Backgrounds/LetterGlitchDemo.vue | 9 +- src/demo/Backgrounds/LightningDemo.vue | 45 +-------- src/demo/Backgrounds/ParticlesDemo.vue | 36 +------ src/demo/Backgrounds/SilkDemo.vue | 12 +-- src/demo/Backgrounds/WavesDemo.vue | 3 +- src/demo/Components/CarouselDemo.vue | 10 +- src/demo/Components/CircularGalleryDemo.vue | 38 +------- src/demo/Components/DockDemo.vue | 48 ++-------- src/demo/Components/FlyingPostersDemo.vue | 56 ++--------- src/demo/Components/GooeyNavDemo.vue | 29 +----- src/demo/Components/MasonryDemo.vue | 27 +----- src/demo/Components/StackDemo.vue | 3 - src/demo/TextAnimations/AsciiTextDemo.vue | 5 +- src/demo/TextAnimations/BlurTextDemo.vue | 3 - src/demo/TextAnimations/CircularTextDemo.vue | 9 +- src/demo/TextAnimations/CurvedLoopDemo.vue | 2 - src/demo/TextAnimations/DecryptedTextDemo.vue | 19 +--- src/demo/TextAnimations/FallingTextDemo.vue | 12 +-- src/demo/TextAnimations/FuzzyTextDemo.vue | 2 - src/demo/TextAnimations/SplitTextDemo.vue | 27 +----- src/demo/TextAnimations/TextTrailDemo.vue | 40 ++------ src/demo/TextAnimations/TrueFocusDemo.vue | 12 +-- 35 files changed, 97 insertions(+), 748 deletions(-) diff --git a/src/components/common/PreviewSlider.vue b/src/components/common/PreviewSlider.vue index 6692928..ae4b5ca 100644 --- a/src/components/common/PreviewSlider.vue +++ b/src/components/common/PreviewSlider.vue @@ -2,15 +2,7 @@
{{ title }} - + {{ modelValue }}{{ valueUnit }}
@@ -21,7 +13,6 @@ import Slider from 'primevue/slider'; defineProps<{ title: string; - modelValue: number; min?: number; max?: number; step?: number; @@ -29,14 +20,7 @@ defineProps<{ disabled?: boolean; }>(); -const emit = defineEmits<{ - 'update:modelValue': [value: number]; -}>(); - -const handleSliderChange = (value: number | number[]) => { - const numValue = Array.isArray(value) ? value[0] : value; - emit('update:modelValue', numValue); -}; +const model = defineModel();