0.1.26 • Published 7 years ago
vc-popup-over v0.1.26
vc-popup-over
模仿antd-mobile的popover~
添加依赖
> yarn add vc-popup-over || npm i vc-popup-over || cnpm i vc-popup-over --by=yarn
引入
import Vue from 'vue'
import VcPopupOver from 'vc-popup-over'
// 这里名字可以随意
Vue.use(VcPopupOver)
在具体页面中使用
this.over = new this.$popup.Popover({
...config
propsData: {}
})
this.over.open(e, {
...config
propsData: {}
})
this.over.close()
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: '扫描',
click: e => console.log('btn0 clicked'),
src: 'https://gw.alipayobjects.com/zos/rmsportal/tOtXhkIWzwotgGSeptou.svg'
},
...
]
}
}
小三角自适应config的refCorner, relativeToCorner
this.Popover = new this.$popup.Popover({
refDom: this.$refs.btn16,
refCorner: 'bottom right',
relativeToCorner: 'below before',
propsData: {
items: [
{
name: '扫描',
click: e => console.log('btn0 clicked'),
src: 'https://gw.alipayobjects.com/zos/rmsportal/tOtXhkIWzwotgGSeptou.svg'
},
]
}
})
效果预览
License
MIT 一起来扣细节~
0.1.26
7 years ago
0.1.25
7 years ago
0.1.24
7 years ago
0.1.23
7 years ago
0.1.22
7 years ago
0.1.21
7 years ago
0.1.20
7 years ago
0.1.19
7 years ago
0.1.18
7 years ago
0.1.17
7 years ago
0.1.16
7 years ago
0.1.15
7 years ago
0.1.14
7 years ago
0.1.13
7 years ago
0.1.12
7 years ago
0.1.11
7 years ago
0.1.10
7 years ago
0.1.9
7 years ago
0.1.8
7 years ago
0.1.6
7 years ago
0.1.5
7 years ago
0.1.4
7 years ago
0.1.3
7 years ago
0.1.2
7 years ago
0.1.1
7 years ago
0.1.0-3
7 years ago
0.1.0-2
7 years ago
0.1.0-0
7 years ago
0.1.0-alpha-2
7 years ago
0.1.0
7 years ago
0.0.13
7 years ago
0.0.8
8 years ago
0.0.6
8 years ago
0.0.5
8 years ago
0.0.4
8 years ago
0.0.1
8 years ago