8.0.0 • Published 2 years ago
circle-menu-cyez v8.0.0
CircleMenu
安装
npm i circle-menu-cyez
使用
js
import CircleMenu from 'circle-menu-cyez'
export default {
components: { CircleMenu },
data() {
return {
commands: [
{
content: '全选',
submenu: [
{
content: '反选节点',
select: () => // 自定义方法
}
]
}
]
}
}
}
html
<CircleMenu ref="CircleMenu" :commands="commands">
</CircleMenu>
props
props: {
// 菜单
commands: {
type: Array,
default: () => []
},
// canvas高度
height: {
type: String,
default: '100%'
},
// 当前页面的高度是否固定
// 若固定,传值weitrue/不传值
// 不固定,传值为false,height必传一个固定值
// 为解决页面可滚动时,菜单监听鼠标的区域出现偏移的问题
heightFixed: {
type: Boolean,
default: true
}
},