Ki-vue-context
A customizable context menu component built for Vue2, supporting fontawesome icons, auto right/bottom boundary detection.
Demo
A built demo is provided in the directory /demo
. Use any static website server to check it.
Install
Usage Example
Global Registration
Import fontawesome icons
Import fontawesome and all the icons you need in main.js
.
Use it in your Vue project
Props
prop | type | required | default | example from demo |
---|---|---|---|---|
minWidth | String | No | 10em | 10em |
maxWidth | String | No | 18em | 15em |
backgroundColor | String | No | #ffffff | #fbfbfb |
fontSize | String | No | inherit | 15px |
textColor | String | No | inherit | #35495e |
iconColor | String | No | inherit | #41b883 |
borderRadius | String | No | null | 0.1em |
Items
The array items
defining the context menu consists of several item
. The properties of item
are listed here.
prop | type | required |
---|---|---|
text | String | Yes |
icon | String | No |
click | function | No |
divider | boolean | No |
disabled | boolean | No |