mirror of
https://github.com/DavidHDev/vue-bits.git
synced 2026-03-07 22:49:31 -07:00
Added defineModel support for PreviewSelect component
This commit is contained in:
@@ -25,29 +25,9 @@
|
||||
</div>
|
||||
|
||||
<Customize>
|
||||
<PreviewSelect
|
||||
title="Animation Direction"
|
||||
v-model="direction"
|
||||
:options="directionOptions"
|
||||
@update:model-value="
|
||||
val => {
|
||||
direction = val as 'vertical' | 'horizontal';
|
||||
forceRerender();
|
||||
}
|
||||
"
|
||||
/>
|
||||
<PreviewSelect title="Animation Direction" v-model="direction" :options="directionOptions" />
|
||||
|
||||
<PreviewSelect
|
||||
title="Easing Function"
|
||||
v-model="ease"
|
||||
:options="easeOptions"
|
||||
@update:model-value="
|
||||
val => {
|
||||
ease = val as string;
|
||||
forceRerender();
|
||||
}
|
||||
"
|
||||
/>
|
||||
<PreviewSelect title="Easing Function" v-model="ease" :options="easeOptions" />
|
||||
|
||||
<PreviewSlider
|
||||
title="Distance"
|
||||
@@ -126,7 +106,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue';
|
||||
import { ref, watch } from 'vue';
|
||||
import TabbedLayout from '../../components/common/TabbedLayout.vue';
|
||||
import PropTable from '../../components/common/PropTable.vue';
|
||||
import Dependencies from '../../components/code/Dependencies.vue';
|
||||
@@ -233,6 +213,10 @@ const propData = [
|
||||
description: 'Additional CSS classes for styling.'
|
||||
}
|
||||
];
|
||||
|
||||
watch([direction, ease], () => {
|
||||
forceRerender();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
Reference in New Issue
Block a user