Home  >  Article  >  Web Front-end  >  Detailed explanation of the use of region selector (V-Distpicker) component

Detailed explanation of the use of region selector (V-Distpicker) component

php中世界最好的语言
php中世界最好的语言Original
2018-05-12 10:45:266231browse

This time I will bring you a detailed explanation of the use of the region selector (V-Distpicker) component. What are the precautions when using the region selector (V-Distpicker) component. The following is a practical case, let’s take a look together. take a look.

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

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 use

Basic

Default value

Mobile terminal

3. The following are the key points

Get the selected value

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