Category · 59 articles

Script

Articles in the category Script.

Vue Tip: Check Version at Runtime Image

Vue Tip: Check Version at Runtime

You can easily check the Vue version at runtime.
Vue Tip: Use v-bind to Pass Multiple Props to Components Image

Vue Tip: Use v-bind to Pass Multiple Props to Components

Instead of passing each property individually to a component, you can bind an object to it.
Vue Tip: Watch Nested Values Image

Vue Tip: Watch Nested Values

The watch options support a dot-delimited path as key to watch nested values.
Vue Tip: Use Two Script Blocks  Image

Vue Tip: Use Two Script Blocks

<script setup> can be used alongside normal <script>. A normal <script> may be needed in special cases.
Vue Tip: Automatic Global Registration of Base Components Image

Vue Tip: Automatic Global Registration of Base Components

We can use webpack to register our Vue.js base components globally.
Vue Tip: Assign Handler for Uncaught Errors Image

Vue Tip: Assign Handler for Uncaught Errors

Error monitoring is important in production, and we can use the errorHandler function to send errors to error tracking services.
Vue Tip: Trigger Watcher Immediately Image

Vue Tip: Trigger Watcher Immediately

The watch hook provides an option that the callback is called immediately.
Vue Tip: Props and Context in Setup Method Image

Vue Tip: Props and Context in Setup Method

Access props and context in setup method using Composition API in Vue 3
Vue Tip: Detailed Prop Definitions Image

Vue Tip: Detailed Prop Definitions

Define your Vue prop definitions as detailed as possible.