forked from github/dataease
commit
54a11a3fea
@ -80,7 +80,6 @@
|
||||
|
||||
<script>
|
||||
import { getStyle } from '@/components/canvas/utils/style'
|
||||
import runAnimation from '@/components/canvas/utils/runAnimation'
|
||||
import { mixins } from '@/components/canvas/utils/events'
|
||||
import { mapState } from 'vuex'
|
||||
import DeOutWidget from '@/components/dataease/DeOutWidget'
|
||||
@ -237,9 +236,6 @@ export default {
|
||||
'panelViewDetailsInfo'
|
||||
])
|
||||
},
|
||||
mounted() {
|
||||
runAnimation(this.$el, this.config.animations)
|
||||
},
|
||||
methods: {
|
||||
triggerFilterLoaded(p) {
|
||||
if (this.config.type === 'de-tabs') {
|
||||
|
@ -37,7 +37,6 @@
|
||||
|
||||
<script>
|
||||
import eventBus from '@/components/canvas/utils/eventBus'
|
||||
import runAnimation from '@/components/canvas/utils/runAnimation'
|
||||
import { mapState } from 'vuex'
|
||||
import calculateComponentPositionAndSize from '@/components/canvas/utils/calculateComponentPositionAndSize'
|
||||
import { mod360 } from '@/components/canvas/utils/translate'
|
||||
@ -107,18 +106,8 @@ export default {
|
||||
this.cursors = this.getCursor() // 根据旋转角度获取光标位置
|
||||
}
|
||||
this.element.type === 'custom' && (this.pointList = ['l', 'r'])
|
||||
|
||||
eventBus.$on('runAnimation', this.runAnimation)
|
||||
},
|
||||
beforeDestroy() {
|
||||
eventBus.$off('runAnimation', this.runAnimation)
|
||||
},
|
||||
methods: {
|
||||
runAnimation() {
|
||||
if (this.element === this.curComponent) {
|
||||
runAnimation(this.$el, this.curComponent.animations)
|
||||
}
|
||||
},
|
||||
// 鼠标移入事件
|
||||
enter() {
|
||||
this.mouseOn = true
|
||||
|
@ -106,6 +106,7 @@ export default {
|
||||
},
|
||||
beforeDestroy() {
|
||||
bus.$off('frameLinksChange-' + this.element.id, this.frameLinksChange)
|
||||
eventBus.$off('startMoveIn', this.frameLinksChange)
|
||||
},
|
||||
methods: {
|
||||
frameLinksChange() {
|
||||
|
@ -1,18 +0,0 @@
|
||||
export default async function runAnimation($el, animations = []) {
|
||||
const play = (animation) => new Promise(resolve => {
|
||||
$el.classList.add(animation.value, 'animated')
|
||||
const removeAnimation = () => {
|
||||
$el.removeEventListener('animationend', removeAnimation)
|
||||
$el.removeEventListener('animationcancel', removeAnimation)
|
||||
$el.classList.remove(animation.value, 'animated')
|
||||
resolve()
|
||||
}
|
||||
|
||||
$el.addEventListener('animationend', removeAnimation)
|
||||
$el.addEventListener('animationcancel', removeAnimation)
|
||||
})
|
||||
|
||||
for (let i = 0, len = animations.length; i < len; i++) {
|
||||
await play(animations[i])
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user