Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vue 3 + typescript: Uncaught (in promise) TypeError: t is not a function when use tiny slider #87

Open
Bashar-AlhajHamad opened this issue Jul 31, 2022 · 2 comments

Comments

@Bashar-AlhajHamad
Copy link

Bashar-AlhajHamad commented Jul 31, 2022

vue-tiny-slider.ts:

import { App } from "vue";
import VueTinySlider from "vue-tiny-slider";

export function initVTinySlider(app: App<Element>) {
	app.component("tiny-slider", VueTinySlider);
}

usage:

<tiny-slider :mouse-drag="true" :loop="false" :items="2">
	<div>Slider item #1</div>
	<div>Slider item #2</div>
	<div>Slider item #3</div>
	<div>Slider item #4</div>
	<div>Slider item #5</div>
	<div>Slider item #6</div>
</tiny-slider>
@awsomplak
Copy link

commented here

@alexgrek96
Copy link

import { defineComponent, h } from "vue";
import VueTinySlider from "vue-tiny-slider";

export default defineComponent({
extends: VueTinySlider,
render() {
return h(
"div",
this.$slots?.default ? this.$slots.default() : {} as any);
},
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants