vux-rem
Mobile web UI based on Vue and Weui
Last updated 4 years ago by acmeid .
Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install vux-rem 
SYNC missed versions from official npm registry.

v0.1 will be released on 0601.

Be Cool with Vue and WeUI.

Vux = Vue + WeUI + A Bunch of Components

Importance notice

  • This is not an Official Project of Wechat.
  • :warning: Before vux@0.1.0, Components' API may change any time.
  • If you are interested in improving vux, just email me to join Vux@Teambition

Demo

https://vux.li

Component List

If you need a new component, don't hesitate to raise an issue.

Usage by importing UMD modules

# install vue-cli
npm install -g vue-cli

# init a webpack project
vue init webpack my-project
cd my-project
npm install
npm install vux
npm run dev
<template>
  <div>
    <group>
      <cell title="vue" value="cool"></cell>
    </group>
  </div>
</template>

<script>
import Group from 'vux/components/group'
import Cell from 'vux/components/cell'

export default {
  components: {
    Group,
    Cell
  }
}
</script>

<style>
@import '~vux/vux.css';
</style>

Usage by importing .vue file

add a js loader in webpack.base.conf.js

{
  test: /vux.src.*?js$/,
  loader: 'babel'
}

import the components you need

import Group from 'vux/src/components/group'
import Cell from 'vux/src/components/cell'

you can use a shorter path by adding resolve.alias in webpack.base.conf.js

resolve: {
  alias: {
    'vux-components': 'vux/src/components/'
  }
}

now you can import like this:

import Group from 'vux-components/group'
import Cell from 'vux-components/cell'

Usage by including scripts

You can download vux from the releases

or install from bower bower install vux

checkout examples/scripts.html

<!--include Vux style-->
<link rel="stylesheet" href="vux/vux.css">
<!--include Vue yourself-->
<script src="vue.js"></script>

<div id="demo">
  <group>
    <cell title="vue" value="cool"></cell>
  </group>
</div>

<!--include the components you need-->
<script src="vux/components/group/index.js"></script>
<script src="vux/components/cell/index.js"></script>

<script>
// register components
Vue.component('group', vuxGroup)
Vue.component('cell', vuxCell)

new Vue({
  el: '#demo'
})
</script>

Remove click delays

const FastClick = require('fastclick')
FastClick.attach(document.body)

Async loading Components

// import Countup from './demos/Countup'

const Countup = function (resolve) {
  require(['./demos/Countup'], resolve) // webpack will do the rest things
}

Work in Progress

This project is still in progress, so do not rely on this for anything important before production-ready version released. And pull requests are welcome.

Development Setup

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build

# build components before publishing
npm run xbuild

# publish and deploy to gh-pages
npm run xpublish

# run unit tests
npm test

For detailed explanation on how things work, consult the docs for vue-loader.

Components

Liscence

MIT

Current Tags

  • 0.0.118                                ...           latest (4 years ago)

2 Versions

  • 0.0.118                                ...           4 years ago
  • 0.0.117                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (13)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |