Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ash-sc/vue-simple-assistive-ball
a simple vue assistive ball component
https://github.com/ash-sc/vue-simple-assistive-ball
Last synced: 5 days ago
JSON representation
a simple vue assistive ball component
- Host: GitHub
- URL: https://github.com/ash-sc/vue-simple-assistive-ball
- Owner: Ash-sc
- Created: 2018-01-31T09:06:28.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-02-22T09:11:25.000Z (almost 7 years ago)
- Last Synced: 2024-04-26T04:43:43.575Z (10 months ago)
- Language: Vue
- Size: 127 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# vue-simple-assistive-ball
a simple vue assistive ball component for WebApp.> a simple vue assistive ball component for WebApp.
> demo:
### 1. Install
``` bash
npm install vue-simple-assistive-ball
```#### 2. Usage
```
# global injection
import AssistiveBall from 'vue-simple-assistive-ball'
Vue.use(AssistiveBall)
...
``````
# component injection
...import { AssistiveBall } from 'vue-simple-assistive-ball'
export default {
components: { AssistiveBall },
...
}
``````
<template>
<div>
<assistive-ball :data-list="dataList" v-on:ball-touch="touchEvent">
</assistive-ball>
</div>
</template>
<script>
export default {
data() {
return {
dataList: ['icon-movie', 'icon-zhihu', 'icon-weibo']
}
},methods: {
touchEvent(icon) {
// do something...
}
}
}```
#### 3. options
* **dataList**
* icon class list
* type **Array**
* required **Yes**#### 4. emit function
use 'v-on:ball-touch="your-function"' to catch the ball touch event.