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

Building a WeChat Media Resource Selector Component with KnockoutJS

Implementation Examples Below are practical examlpes demonstrating how to integrate the component into your templates: <!-- Basic usage for media ID selection --> <script id="mediaIdTemplate" type="text/html"> <media-choice-button params="bindingValue: media_id"></media-choice-button> &l ...

Posted on Thu, 18 Jun 2026 17:04:19 +0000 by shmony