search

Home  >  Q&A  >  body text

VueJS: "once" event modifier, check if clicked

I have a simple question that I haven't answered so far.

In VueJS, there is .once event modifier, which can work normally. The problem is that I'm using @click.once on the autocomplete input component to query my database and populate its available items.

What I want to achieve is to provide some kind of additional icon to call the query after clicking the input once.

Because:

Is there a way to obtain this information?

Thanks in advance!

P粉541551230P粉541551230299 days ago451

reply all(1)I'll reply

  • P粉043295337

    P粉0432953372024-02-26 09:47:07

    I think you should create a state (data) that is set to false and when the button is clicked it changes to false. Then conditionally display the refresh icon with the set value. Click Refresh to reset the value to false.

    
    
    

    reply
    0
  • Cancelreply