LouisMazel / vue-phone-number-input

A phone number input made with Vue JS (format & valid phone number)
https://louismazel.github.io/vue-phone-number-input
MIT License
606 stars 153 forks source link

Cannot be used with Vue3? #176

Closed dreamz89 closed 2 years ago

dreamz89 commented 2 years ago
import VuePhoneNumberInput from 'vue-phone-number-input'
import 'vue-phone-number-input/dist/vue-phone-number-input.css'

<VuePhoneNumberInput v-model="phone" />

export default {
  components: { VuePhoneNumberInput },
  data() {
    return { phone: null }
  }

My error messages: _[Vue warn]: Property "$createElement" was accessed during render but is not defined on instance. at runtime-core.esm-bundler.js?5c40:6584 [Vue warn]: Property "_self" was accessed during render but is not defined on instance. at runtime-core.esm-bundler.js?5c40:6584 [Vue warn]: Unhandled error during execution of render function at runtime-core.esm-bundler.js?5c40:6584 [Vue warn]: Unhandled error during execution of scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/vue-next vue-phone-number-input.common.js?7bec:7071 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'c')

LouisMazel commented 2 years ago

Hi @dreamz89,

Vue 2

This plugin is only for vue 2 and unmaintained. The maintained version is in my other library maz-ui

Vue 3

For the vue 3 version, you should use the beta version of MazUi

Getting Started: https://louismazel.github.io/maz-ui-3/guide/getting-started.html MazPhoneNumberInput: https://louismazel.github.io/maz-ui-3/components/maz-phone-number-input.html

Please note that this is the beta version and some things may change in the future.