vue-zone

0.0.3 • Public • Published

vue-zone

Vue-based zone selection component

Screenshots

vue-zone

Install

Get source from npm or yarn.

# Npm
$ npm install vue-zone --save
 
# Yarn (recommend)
$ yarn add vue-zone

Support UMD library and individual CSS file.

./lib/
├── vue-zone.js
└── vue-zone.css
./src/
├── /components/
│   ├── area.vue
│   └── area-country.vue
│   └── area-zone.vue
│   └── area-province.vue
└── index.js
// For ES6 module
import Zone from 'vue-zone'
 
// Import from src code for debugging or self building
import Zone from 'vue-zone/src';

And import CSS file:

require('vue-zone/lib/vue-zone.css');

Usage

<template>
    <div id="app">
        <zone
            @change="handleChange">
        </zone>
    </div>
</template>
export default {
    name: 'app',
    data () {
      return {
        week: []
      }
    },
    methods: {
      handleChange ({ choose }) {
        this.choose = choose
      }
    }
}

API

Events

Event Name Description Return Value
change Callback when clicking checkbox. []

Build Setup

# install dependencies
npm install / yarn install
 
# serve with hot reload at localhost:8080
npm run demo:dev
 
# build for demo with minification
npm run demo:build
 
# build for gh-pages with minification
npm run demo:prepublish
 
# build for production with minification
npm run build

TODO

  • Remove the dependency on element-ui

License

MIT

Package Sidebar

Install

npm i vue-zone

Weekly Downloads

3

Version

0.0.3

License

MIT

Last publish

Collaborators

  • savoygu