Giter Site home page Giter Site logo

gankio_weex's Introduction

写在前面

编译,请在当前目录下执行

cnpm i --save 或 npm i --save

这样不会影响本来已存在的weexpack环境

使用命令运行

node node_modules\weexpack\bin\weexpack run android

编译好的apk文件,请下载体验 APK

概述

前一段使用.we的方式做了一个项目,一直没有升级到Vue,感觉升级的过程中的坑会有很多暂没有升级
自己就先写一个Demo测试一下,看看使用Vue2.x开发,有哪些变化
项目基于Weexpack(0.4.2)版本,使用Vue2.x开发,只有Android版本,有兴趣的童鞋可以添加对用的iOS版本
最新的weexpack版本支持Vue开发,之前的版本(0.3.7)
不支持Vue开发(或者说需要自己配置才能支持)

开工

具体的开发环境搭建的过程请参考 搭建开发环境,这里不再累述。使用weexpack创建工程,并添加Android的工程

在开发之前,请先参考 Weex 和 Vue 2.x 的语法差异

然后就是编写Vue的组件,需要注意的是引入组件的方式

Weex版本引入方式

require('../modules/listitem.we')

使用
<listitem></listitem>

Vue2.x版本引入方式

components:{
    listitem:require('../modules/listitem.vue'),
},

使用
<listitem></listitem>

具体的可以参考工程中的源码 组件引入

在开发过程中使用到的组件

tabbar
web
list
image

效果截图

效果图

效果图

效果图

gankio_weex's People

Contributors

coderminer avatar

Stargazers

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