Giter Club home page Giter Club logo

weapp-demo-mpvue's Introduction

mp_weapp_demo

基于 mpvue 的微信小程序项目 demo

引入扩展组件库 weui

  1. 引入样式表 @/plugins/style/weui.wxss
  2. 引入组件到 /static/weui
  3. 使用方法参考 腾讯小程序开放文档

状态与缓存

  1. 引入全局 vuex

     import store from './store.js'
     Vue.prototype.$store = store
    
  2. 配置全局缓存 storage

     import storage from './plugins/storage.js'
     Vue.prototype.$storage = storage
    

网络请求

  1. npm 引入 fly.js,设置 /build/webpack.base.conf.js 别名,具体使用方法参考 fly.js

     alias: {
         'vue': 'mpvue',
         '@': resolve('src'),
         flyio: 'flyio/dist/npm/wx',
     },
    
  2. 封装请求方法,配置全局请求拦截与加载动画

项目配置

  1. 设定项目根据模式变量变化相关配置,参见 /desc-config

时间格式化

  1. npm 引入 dayjs,使用方法参考 dayjs

表单验证 demo

  1. 参考拓展组件 mp-form

日历组件 mpvue-calendar

使用 less

    npm install less less-loader

weapp-demo-mpvue's People

Contributors

yangqqi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.