ntl-ui

0.1.34 • Public • Published

international ui

This is ntl-ui, a set of ui libraries for internationalization. For Vue 2.x. (But Now there is only one component: national-input)

How to install

npm install ntl-ui -S

Quick Start

import Vue from 'vue'
import Ntl from 'ntl-ui'

Vue.use(Ntl)

// or
import {
  NtlInput,
  // ...
} from 'ntl-ui'

Vue.component(NtlInput.name, NtlInput)

Explain

  <itl-input v-model="phoneValue" />
  
  // itl-input main options:
  
  props: {
    value: { // International number
      default() {
        return ''
      }
    },
    options: {
      default() {
        return {
          iso: '', // National iso code
          hoverStatus: true, // Whether to display specific information when opening the floating flag
          focusStatus: true, // Whether to turn on focus display of head text
          placeholder: 'Enter Number', // Input box placeholder
          errorSlot: false, // Whether to enable the placeholder of error prompt
          errorMsg: 'Please input validate PhoneNumber!', // Verification failure error message
          validate: true // Enable verification
        }
      }
    },
  },
  methods: {
    PhoneNumber // Receive a number and return the corresponding international information, specific documents:https://www.npmjs.com/package/libphonenumber-js#min-vs-max-vs-mobile-vs-core
    isValidPhoneNumber:// Check the number
    ...
  }
  

Package Sidebar

Install

npm i ntl-ui

Weekly Downloads

1

Version

0.1.34

License

MIT

Unpacked Size

419 kB

Total Files

267

Last publish

Collaborators

  • coderxh