Comments (4)
Thanks a lot for your help!
For the future I leave my solution for vue3+vite+typescript
I have to declare module in file vite-env.d.ts and the export it
declare module "v3-infinite-loading" {
import type {DefineComponent} from 'vue'
const component: DefineComponent<{}, {}, any>
export default component
}
Now, everything works as expected :)
from vue3-infinite-loading.
v3-infinite-loading is generated in javaScript for now that's why, but will use typescript instead very soon.
You can add this line to your env.d.ts
file or create one if you haven't already to suppress the error
declare module "v3-infinite-loading";
from vue3-infinite-loading.
Thanks for your reply.
I've added declaration for env.d.ts - issue dissapeared, but unfortunately infinite-loading is still unrecognized.
<template>
<v-table id="intftable">
<tbody>
<tr v-for="item in store.dataset" :key="item.id">
<td> {{ item.name}} </td>
</tr>
</tbody>
</v-table>
<InfiniteLoading @infinite="load" target="#intftable"></InfiniteLoading>
</template>
<script setup lang=ts>
const PER_PAGE = 5
const page = ref(1)
const load = ($state: any) => {
console.log('loading....')
if (page.value <= state.dataset.length){
page.value += PER_PAGE
$state.loaded()
}
else{
$state.complete()
}
}
</script>
I choosed option with global importing.
My component is rendered properly but Infinite loading is not starting, console log in function load does not print
from vue3-infinite-loading.
Just because you registered it as infinite-loading
not InfiniteLoading
try to rename it the template
from vue3-infinite-loading.
Related Issues (20)
- How to trigger by ref's dom node $state.complete() HOT 5
- Data not consistently being loaded to the end during scroll (using demo code from docs in Nuxt3 app) HOT 2
- Expose function to reset the state HOT 2
- Error when component already has explicitly named default slot HOT 1
- the loader doesn't load nicely only half of the circle can be seen. HOT 1
- Compiler error when running demo project from dev branch
- Add spinning wheel slot option HOT 2
- Identifier doesn't trigger reload upon data change HOT 2
- [HELP] Does it support typescript import? HOT 2
- Issues with inverted/top infinite load. HOT 10
- Reset to the top when scrolling with infinite loading HOT 1
- export 'default' (imported as 'InfiniteLoading') was not found in 'v3-infinite-loading' (module has no exports) HOT 8
- Cannot read properties of null (reading 'getBoundingClientRect') HOT 3
- Identifier change triggers reload twice HOT 1
- Slot for name="complete" doesn't work HOT 4
- Potential for duplicate observers activation HOT 1
- Issues with top scroll HOT 1
- Manually trigger infinite HOT 4
- Documentation and Demo pages do not work
- infiniteHandler doesn't trigger initial loading on mobile portrait screens
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue3-infinite-loading.