vc-popup-over
模仿antd-mobile的popover~
添加依赖
> yarn add vc-popup-over || npm i vc-popup-over || cnpm i vc-popup-over --by=yarn
引入
// 这里名字可以随意 Vue
在具体页面中使用
thisover = ...config propsData: {} thisover thisover
e为事件Event, 比如click时候取得的evt, 与一些定位方法相关 config可参考popup-base/readme.md
propsData配置定义
e: Object // 从open(e, {})传进来的e items: type: Array required: true example: name: String src: String click: Function name: '扫描' console src: 'https://gw.alipayobjects.com/zos/rmsportal/tOtXhkIWzwotgGSeptou.svg' ...
小三角自适应config的refCorner, relativeToCorner
thisPopover = refDom: this$refsbtn16 refCorner: 'bottom right' relativeToCorner: 'below before' propsData: items: name: '扫描' console src: 'https://gw.alipayobjects.com/zos/rmsportal/tOtXhkIWzwotgGSeptou.svg'
效果预览
License
MIT 一起来扣细节~