Skip to content

v-model hard #Directives

By webfansplz @webfansplz

Take the Challenge    简体中文

For this challenge, we're going to implement a simple v-model directive. Lets go 👇:

<script setup lang='ts'>

import { ref } from "vue"

/**
 * Implement a custom directive
 * Create a two-way binding on a form input element
 *
*/
const VOhModel = {

}

const value = ref("Hello Vue.js")

</script>

<template>
  <input v-oh-model="value" type="text" />
</template>

Share your Solutions Check out Solutions