Giter Site home page Giter Site logo

weexdriver's Introduction

WeexDriver

WeexDriver

getting start

npm install

file structure

  • src/*: all source code
  • app.js: entrance of the Weex page
  • build/*: some build scripts
  • dist/*: where places generated code
  • assets/*: some assets for Web preview
  • index.html: a page with Web preview and qrcode of Weex js bundle
  • weex.html: Web render
  • .babelrc: babel config (preset-2015 by default)
  • .eslintrc: eslint config (standard by default)

npm scripts

# build both two js bundles for Weex and Web
npm run build

# build the two js bundles and watch file changes
npm run dev

# start a Web server at 8080 port
npm run serve

# start weex-devtool for debugging with native
npm run debug

notes

You can config more babel, ESLint and PostCSS plugins in webpack.config.js.

语法

- weex vue
生命周期 ready: function() {} mounted: function() {}
条件指令 if="{{!foo}}" v-if="!foo"
循环指令 repeat="{{item in list}}" v-for="item in list"
样式类名 class="btn btn-{{type}}" :class="['btn', 'btn-' + type]"
内联样式 style="color:{{textColor}}" :style="{ color: textColor }"
事件绑定 onclick="handler" @click="handler"
原生事件 onclick="xxx" @click.native="xxx"
数据绑定 src="{{rightItemSrc}}" :src="rightItemSrc"
数据初始化 data: { value: 'x' } data: function() { return { value: 'x' } }
标签ID id="xxx" ref="xxx"
获取节点 this.$el('xxx') this.$refs.xxx
详细请戳

done

仿饿了么app商户食品页

  • 商户食品列表页
  • 点击menu的时候右侧食品列表滚动到对应项
  • 动画-添加食品按钮点击时的滚动效果

当前效果图

WeexDriver

weexdriver's People

Stargazers

TomLiang avatar

Watchers

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