vue-expand-ball

1.0.0 • Public • Published

vue-expand-ball

======================= NPM version

A damn easy expandable menu without any extra dependency for vue.

Read full documentation here: documentation

Getting started

This is a component requires vue ^2.1.10. And ease the way to display a draggable menu item on your page.

Requirements

Install

from npm

npm install --save vue vue-expand-ball

from bower

bower install --save vue vue-expand-ball

Import

ES2015

import {VueExpandBall} from 'vue-expand-ball';

CommonJS

const {VueExpandBall} = require('vue-expand-ball');

script

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>DEMO</title>
</head>
<body>
 
    <script type="text/javascript" src="node_modules/vue/dist/vue.min.js"></script> 
    <script type="text/javascript" src="node_modules/vue-expand-ball/dist/vue-expand-ball.min.js"></script> 
    <script type="text/javascript">
        var VueExpandBall = window.VueExpandBall;
    </script> 
</body>
</html>

Basic Usage

.ball-pos {
    bottom: 200px;
    right: 200px;
}
<expand-ball class="ball-pos">
    <span slot="menu" @click="clicked('M1')">M1</span>
    <span slot="menu" @click="clicked('M2')">M2</span>
</expand-ball>
export default {
    methods: {
        clicked(str) {
            alert(str + ' is just clicked!!');
        }
    }
};

LICENSE

GPL v3 License

Readme

Keywords

Package Sidebar

Install

npm i vue-expand-ball

Weekly Downloads

8

Version

1.0.0

License

GPL-3.0

Last publish

Collaborators

  • howard.zuo