GithubHelp home page GithubHelp logo

henrynight / vantweappmpvuedemo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from haodaohong/vantweappmpvuedemo

0.0 0.0 0.0 1.47 MB

mpvue中使用Vant Weapp

JavaScript 60.71% HTML 0.09% Vue 38.34% CSS 0.86%

vantweappmpvuedemo's Introduction

mpvue中使用Vant Weapp




1.从Vant Weapp官网github克隆一份代码下来
https://github.com/youzan/vant-weapp 


2.把克隆代码的dist目录下的所有文件复制到我们自己项目的/static/vant/目录下
这里注意,好像一定要是这个目录 static/vant



3.在需要引入的页面目录下的main.json文件中
{ 
  "usingComponents": {
      "van-button": "/static/vant/button/index",
      "van-cell": "/static/vant/cell/index",
      "van-cell-group": "/static/vant/cell-group/index"
  }
}

也可以配置在app.json文件中(这样就不用每个页面都去配置,并且用户组件中也可以使用的)
"usingComponents": {
      "van-button": "/static/vant/button/index",
      "van-cell": "/static/vant/cell/index",
      "van-cell-group": "/static/vant/cell-group/index"
}

4.使用
<van-button>测试</van-button>





参考:
https://github.com/Rychou/mpvue-vant
Vant Weapp官网:
https://youzan.github.io/vant-weapp 


 

  • 功能预览

vantweappmpvuedemo's People

Contributors

aierong 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.