Coder Social home page Coder Social logo

blackteay / vux Goto Github PK

View Code? Open in Web Editor NEW

This project forked from airyland/vux

0.0 2.0 0.0 23.08 MB

Mobile web UI Components based on Vue and WeUI. Be Cool with Vue & WeUI.

Home Page: https://vux.li/

JavaScript 42.64% CSS 13.16% Vue 44.16% HTML 0.04%

vux's Introduction

Be Cool with Vue and WeUI.

Vux = Vue + WeUI + A Bunch of Components

Docs

Importance notice

  • This is not an Official Project of Wechat.
  • 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/dist/components/group'
import Cell from 'vux/dist/components/cell'

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

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

Usage by importing .vue file

make sure less and less-loader are installed

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/dist/group/index.js"></script>
<script src="vux/components/dist/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
}

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

Maintainers

Vux is Inspired or Powered By:

License

MIT

Donate

It takes much time and energy to maintain and improve this project. It Vux helps you, you may want to buy me a coffee :).

vux's People

Contributors

airyland avatar lichunqiang avatar graysheeep avatar fundon avatar flynntsc avatar unclay avatar coffcer avatar t0ny-peng avatar donlzx avatar tianyong90 avatar blue5tar avatar datoulei avatar webjyh avatar bluemsn avatar iflamed avatar maoqxxmm avatar susan-github avatar leolu9527 avatar

Watchers

James Cloos avatar BlackTeay 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.