Home  >  Article  >  Web Front-end  >  About how to use datepicker in vue2.0

About how to use datepicker in vue2.0

亚连
亚连Original
2018-06-07 17:06:262894browse

This article mainly introduces how to use vue2.0 datepicker. It is very good and has reference value. Friends who need it can refer to it

1. Use vue-cli scaffolding to create a vue project. Use vue-datepicker on the order list page. Follow the documentation. After installation, use the
myDatepicker from ‘vue-datepicker’ command to import the component. But the console prompts exports is not defined.

2. Use the webpack package management tool

1. Import the code

import myDatepicker from ‘vue-datepicker'
export default{
components: {
  VSelection,
  myDatepicker
},
  }

The browser console prompts as follows

vue-datepicker-1.vue?268e:436 Uncaught ReferenceError: exports is not defined
at eval (eval at <anonymous> (app.js:1778), <anonymous>:12:23)
at Object.<anonymous> (app.js:1778)
at webpack_require (app.js:660)
at fn (app.js:84)
at eval (eval at <anonymous> (app.js:2211), <anonymous>:7:3)
at Object.<anonymous> (app.js:2211)
at webpack_require (app.js:660)
at fn (app.js:84)
at eval (eval at <anonymous> (app.js:1904), <anonymous>:4:94)
at Object.<anonymous> (app.js:1904)

The above is what I compiled for everyone. I hope it will be helpful to everyone in the future.

Related articles:

Use vue to implement secondary route setting method

Use mint-ui to achieve the three-level linkage effect of provinces and cities

Using vue2.0.js to implement multi-level linkage selectors

The above is the detailed content of About how to use datepicker in vue2.0. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn