How to implement v-model for custom components in Vue2 and Vue3

This article demonstrates how to implement v-model functionality in custom components, using input as an example. We'll create a custom component named z-input that can be used with v-model in a parent component like this: <template> <z-input v-model="msg" /> </template> <!-- JS code omitted --> Both Vue 2 ...

Posted on Sun, 12 Jul 2026 17:21:25 +0000 by chaiwei

Vue.js Core Concepts: Directives, Lifecycle, and Axios Integration

Vue Directives Overview Vue directives are special attributes with the v- prefix that allow you to apply reactive behavior to DOM elements. These directives provide powerful capabilities for data binding, conditional rendering, and event handling. v-for Directive The v-for directive is used for list rendering, allowing you to iterate over array ...

Posted on Wed, 27 May 2026 18:49:08 +0000 by cesar_ser

Vue 3 Core Concepts and Foundational Syntax

Vue is a progressive JavaScript framwork designed for building user interfaces. It adopts a declarative and component-based architecture, enabling developers to create responsive and maintainable front-end applications with simplicity and efficiency. Getting Started with Vue 3 1. Including Vue in Your Project To begin, fetch Vue 3 from the offi ...

Posted on Wed, 20 May 2026 01:30:44 +0000 by adamgram