Skip to content

Usage in Vue 3 without this package #26

@Healyhatman

Description

@Healyhatman

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}"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions