vue-inputmask icon indicating copy to clipboard operation
vue-inputmask copied to clipboard

Usage in Vue 3 without this package

Open Healyhatman opened this issue 1 year ago • 0 comments

I was unable to make this work in typescript it just kept whingeing at me and refused to build.

Just in case someone else tries to google how to make this work in Vue 3 with typescript, do the following.

Step 1: Install inputmask npm i inputmask

Step 2: Set up your app.ts

import Inputmask from "inputmask";
import createApp from "vue";

const app = createApp({});

app.directive("mask", (el, binding) => Inputmask(binding.value).mask(el));

Step 3: That's it. Use it with <input v-mask="{put all your normal RobinHerbots options here}"

Healyhatman avatar Nov 29 '23 07:11 Healyhatman