update dist and lib

This commit is contained in:
jiaming743
2020-06-10 09:50:30 +08:00
parent 330815d90a
commit 3d3de766e3
3 changed files with 62 additions and 10 deletions

View File

@ -37,7 +37,9 @@
:style="`width: ${widths[ci]}px;`"
:align="aligns[ci]"
v-html="ceil"
@click="emitEvent(ri, ci, row, ceil)"
@click="emitEvent('click', ri, ci, row, ceil)"
@mouseenter="handleHover(true, ri, ci, row, ceil)"
@mouseleave="handleHover(false)"
/>
</div>
@ -146,7 +148,14 @@ export default {
* @default carousel = 'single'
* @example carousel = 'single' | 'page'
*/
carousel: 'single'
carousel: 'single',
/**
* @description Pause scroll when mouse hovered
* @type {Boolean}
* @default hoverPause = true
* @example hoverPause = true | false
*/
hoverPause: true
},
mergedConfig: null,
@ -182,6 +191,18 @@ export default {
}
},
methods: {
handleHover(enter, ri, ci, row, ceil){
const { mergedConfig, emitEvent, stopAnimation, animation } = this
if (enter) emitEvent('mouseover', ri, ci, row, ceil)
if (!mergedConfig.hoverPause) return
if (enter) {
stopAnimation()
} else {
animation(true)
}
},
afterAutoResizeMixinInit () {
const { calcData } = this
@ -355,10 +376,10 @@ export default {
clearTimeout(animationHandler)
},
emitEvent (ri, ci, row, ceil) {
emitEvent (type, ri, ci, row, ceil) {
const { ceils, rowIndex } = row
this.$emit('click', {
this.$emit(type, {
row: ceils,
ceil,
rowIndex,