Toast light prompt for using vant component library in Vue
Record the toast light prompt in vant today, and use it according to the methods in the official documents. It can’t be used if an error is found
this is what the document says
Toast.success('success');
Toast.fail('fail');
After referencing vant in main.js, directly call toast to report an error
the actual usage is as follows:
this.$toast.success("success");
this.$toast.fail("fail");
Like calling routing, you need to click this.
Read More:
- Vant Applet: The Usage of Vant-dialog in Before-close
- [Solved] Vue Element Date plug-in reports an error in form validation
- After Vue is packaged to the server, the static resource path reports an error
- Vue installs sass loader directly, and node sass reports an error
- NPM run dev runs the Vue project and reports an error: Node Sass does not yet support your current environment
- Solve the problem of repeatedly clicking the same route console in Vue to report an error
- [Solved] Uniapp project use vant icon Error: (module build failed from./node_modules/postcss loader/SRC/index)
- [Solved] vue3vite Error: Failed to resolve import “@vue/server-renderer from “src\App.vue“. Does the file exist
- [Solved] vant-weapp ui SwipeCell Error: Ignored attempt to cancel a touchmove event with cancelable=false…
- [Solved] Vant quoted lazload error: Failed to Resolve directive: lazy
- Such a simple serialization system.text.json.serialization also reports an error?
- VUE Error: Vue Error in nextTick: “RangeError: Maximum call stack size exceeded“
- After installing NPM, NRM LS reports an error throw new err_INVALID_ARG_TYPE(name, ‘string‘, value)
- [Solved] Vue Error: Uncaught TypeError: Vue.createApp is not a function
- [Solved] Vue Startup Error: Emitted value instead of an instance of Error
- [Solved] Vue3 Error: Cannot use ‘in‘ operator to search for ‘path‘ in undefined
- How to solve Uncaught (in promise) error in VUE?
- Vue installation @ Vue/cli error: npmerr gyp err
- How to open a page in a new window by Vue router
- [Solved] Vue Error: Duplicate keys detected: ‘74004’. This may cause an update error