Vue.component('security-check-skill', { template:`
{{i<10?'0'+(i+1):(i+1)}}
{{item.project_name}}
未通过
通过
变更名称:{{item.change_name}}
变更内容:
{{item.change_content}}
变更发起时间:{{item.change_time}}
`, props: { data:{ type:Array } }, data() { return { srcList:[], index:0, interval:'', }; }, mounted(){ this.init() }, created() { }, methods: { init(){ if(this.data.length > 3){ this.interval = setInterval(this.scrollRoll, 5000); } }, imagesAmplify(arr){ this.srcList = arr }, scrollRoll(){ var height = this.$refs.min[0].clientHeight; if(this.index == this.data.length - 2){ this.$refs.max.scrollTop = 0 this.index = 1 }else{ this.index+=1 } $(this.$refs.max).animate({scrollTop:(height * this.index)+'px'}) }, mouseEnter() {//鼠标移入停止滚动 clearInterval(this.interval); }, mouseLeave() {//鼠标离开继续滚动 if(this.data.length > 3) { this.interval = setInterval(this.scrollRoll, 5000); } }, onWorkOrderTitle(e){ this.$emit('item',e); } }, watch:{ data:function () { this.init() } } })