mirror of https://github.com/ElemeFE/element
				
				
				
			|  a906a5fccb | ||
|---|---|---|
| .. | ||
| src | ||
| README.md | ||
| cooking.conf.js | ||
| index.js | ||
| package.json | ||
		
			
				
				README.md
			
		
		
			
			
		
	
	element-popover
A element-popover component for Vue.js.
Demo
http://element-component.github.io/element-popover
Installation
npm i element-popover -D
Usage
import Vue from 'vue'
import ElPopover from 'element-popover'
import 'element-theme-default/dist/popover.css'
Vue.use(ElPopover)
or
import Vue from 'vue'
import ElPopover from 'element-popover'
Vue.component('el-popover', ElPopover)
Attributes
| 参数 | 说明 | 类型 | 可选值 | 默认值 | 
|---|---|---|---|---|
| trigger | 触发方式 | String | click/focus/hover/manual | click | 
| title | 标题 | String | — | — | 
| content | 显示的内容,也可以通过 slot传入 DOM | String | — | — | 
| width | 宽度 | String, Number | — | 最小宽度 150px | 
| placement | 出现位置 | String | top/top-start/top-end/bottom/bottom-start/bottom-end/left/left-start/left-end/right/right-start/right-end | bottom | 
| value(v-model) | 状态是否可见 | Boolean | — | false | 
| offset | 出现位置的偏移量 | Number | — | 0 | 
| transition | 定义渐变动画 | String | — | fade-in-linear | 
| visible-arrow | 是否显示 Tooltip 箭头,更多参数可见Vue-popper | Boolean | — | true | 
| options | popper.js 的参数 | Object | 参考 popper.js 文档 | { boundariesElement: 'body', gpuAcceleration: false } | 
| popper-class | 为 popper 添加类名 | String | - | - | 
Slot
| 参数 | 说明 | 
|---|---|
| — | Popover 内嵌 HTML 文本 | 
| reference | 触发 Popover 显示的 HTML 元素 | 
Events
| 事件名称 | 说明 | 回调参数 | 
|---|---|---|
| show | 显示时触发 | — | 
| hide | 隐藏时触发 | — | 
Development
make dev
## test
make test
## build
make build