Home  >  Article  >  Web Front-end  >  Introduction to the use of VUE-region selector (V-Distpicker) component

Introduction to the use of VUE-region selector (V-Distpicker) component

不言
不言Original
2018-06-29 15:34:391757browse

This article mainly introduces the detailed experience of using the VUE-region selector (V-Distpicker) component. The content is quite good. I will share it with you now and give it as a reference.

Without further ado, let’s get straight to the point.

Installation and citation are copied directly from the official website, so I won’t go into details.

1. Installation

Use npm to install:

npm install v-distpicker --save

Use yarn to install

yarn add v-distpicker --save

##2. Use

to register Component


Register global component

import VDistpicker from 'v-distpicker'
Vue.component('v-distpicker', VDistpicker);

Register component

import VDistpicker from 'v-distpicker'
export default {
 components: { VDistpicker }
}

Simple to use


Basic

Default value

Mobile terminal

3. The following are the key points

Get Selected value

Define several methods in the parent component where you reference v-distpicker to get the selected value.