Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup with vue + inertiajs #206

Open
guihallmann opened this issue Oct 31, 2023 · 1 comment
Open

Setup with vue + inertiajs #206

guihallmann opened this issue Oct 31, 2023 · 1 comment

Comments

@guihallmann
Copy link

Does anyone know to setup this library in a vue + inertiajs app? I'm having troubles making it work

@abdurrahmanseyidoglu
Copy link

abdurrahmanseyidoglu commented Nov 29, 2023

in you app.js file :

import {createApp, h} from 'vue';
import { createInertiaApp } from '@inertiajs/vue3'

import VueTheMask from 'vue-the-mask'

createInertiaApp({

    resolve: name => {
        const pages = import.meta.glob('./Pages/**/*.vue', { eager: true })
        return pages[`./Pages/${name}.vue`]
    },

    setup({el, App, props, plugin}) {
        createApp({render: () => h(App, props)})
            .use(plugin)
            .use(VueTheMask)
            .mount(el)
    }
});

in your component :


<template>
  <input v-model="min_price" v-mask="'###,###,###'"  masked="false" name="min" type="text"/>
<template/>


<script setup>
import 'vue-tel-input/vue-tel-input.css';
</script>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants