vue-scroller下拉刷新上拉加载

Step 1: create vue project and install vue-scroller via npm. (we use vue webpack-simple template here)

$ vue init webpack-simple#1.0 my-project
$ cd my-project
$ npm install
$ npm install vue-scroller
Step 2: add resolve option and loader in webpack.config.js as below.

    module.exports = {
    // ...

   resolve: {
   extensions: ['', '.js', '.vue'],
    fallback: [path.join(__dirname, './node_modules')]
     },

    // ...

     module: {
       loaders: [
         // ...

         {
           test: /vue-scroller.src.*?js$/,
           loader: 'babel'
         }
       ]
     },

            // ...

   }
   Step 3: copy codes below to overwrite App.vue

   

   

   

你可能感兴趣的:(vue-scroller下拉刷新上拉加载)