Skip to content

How to trigger by ref's dom node $state.complete() #57

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

Open
Hiram-Wong opened this issue Mar 4, 2023 · 5 comments
Open

How to trigger by ref's dom node $state.complete() #57

Hiram-Wong opened this issue Mar 4, 2023 · 5 comments

Comments

@Hiram-Wong
Copy link

Hiram-Wong commented Mar 4, 2023

How to trigger by ref's dom node $state.complete()

@Hiram-Wong Hiram-Wong changed the title 如何通过ref的dom节点触发$state.complete() How to trigger by ref's dom node $state.complete() Mar 4, 2023
@oumoussa98
Copy link
Owner

the $state object is only passed to the infinite event handler and it's not accessible by dom refs.
If you can provide more info about your use case would be helpful.

@Hiram-Wong
Copy link
Author

the $state object is only passed to the infinite event handler and it's not accessible by dom refs. If you can provide more info about your use case would be helpful.

I need to request two api, one api interface is used to get the data, one api is to get the system configuration, the load function contains the api to get the data, get the system configuration I onmounted life cycle in vue, there are other functions to call the api parameters, I want to call the api when the parameters are empty when getting the system configuration api complete

@shexm
Copy link

shexm commented Oct 25, 2023

Same issue. I have a list that varies in length depending on the filter. I change the length of the list, but there is no reaction because i called $state.complete() before. The infinite event no longer works. There's no way to change the state from 'complete' to 'loading'.

@Hiram-Wong
Copy link
Author

Same issue. I have a list that varies in length depending on the filter. I change the length of the list, but there is no reaction because i called $state.complete() before. The infinite event no longer works. There's no way to change the state from 'complete' to 'loading'.

You can use the parameter identifier,If you call $state.complete() this method, change the value of identifier again.
image
image
image

@shexm
Copy link

shexm commented Oct 26, 2023

Thank you, bro! I have solved my problem. I should have been careful to read the document. You are very kind.

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