Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@splidejs/vue-splide",
"version": "0.6.12",
"version": "0.6.13",
"description": "The Splide component for Vue.",
"author": "Naotoshi Fujita",
"license": "MIT",
Expand Down
4 changes: 2 additions & 2 deletions src/js/components/Splide/Splide.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
</template>

<script lang="ts">
import { ComponentConstructor, Options, Splide } from '@splidejs/splide';
import { computed, defineComponent, onBeforeUnmount, onMounted, PropType, provide, Ref, ref, watch } from 'vue';
import { type ComponentConstructor, type Options, Splide } from '@splidejs/splide';
import { computed, defineComponent, onBeforeUnmount, onMounted, type PropType, provide, type Ref, ref, watch } from 'vue';
import { EVENTS } from '../../constants/events';
import { SPLIDE_INJECTION_KEY } from '../../constants/keys';
import { merge } from '../../utils';
Expand Down
20 changes: 10 additions & 10 deletions src/js/components/SplideTrack/SplideTrack.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@
</template>

<script lang="ts">
import { defineComponent, onUpdated, inject, Ref } from 'vue';
import { SPLIDE_INJECTION_KEY } from '../../constants/keys';
import { Splide } from '@splidejs/splide';
import { defineComponent, onUpdated, inject, type Ref } from "vue";
import { SPLIDE_INJECTION_KEY } from "../../constants/keys";
import { Splide } from "@splidejs/splide";

/**
* The component for the Splide track element.
*
* @since 0.6.0
*/
export default defineComponent( {
name: 'SplideTrack',
export default defineComponent({
name: "SplideTrack",

setup() {
onUpdated( () => {
const splide = inject<Ref<Splide | undefined>>( SPLIDE_INJECTION_KEY );
onUpdated(() => {
const splide = inject<Ref<Splide | undefined>>(SPLIDE_INJECTION_KEY);
splide?.value?.refresh();
} );
}
} );
});
},
});
</script>
2 changes: 1 addition & 1 deletion src/js/constants/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {
EVENT_SCROLLED,
EVENT_UPDATED,
EVENT_VISIBLE,
EventMap,
type EventMap,
} from '@splidejs/splide';


Expand Down
2 changes: 1 addition & 1 deletion src/js/plugin/plugin.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { App } from 'vue';
import { type App } from 'vue';
import { Splide, SplideSlide } from '../components';


Expand Down