| | |
| | | <i :class="iconList[index].icon" class="icon-font"></i> |
| | | </div> |
| | | <div class="data-info"> |
| | | <div class="data-num">{{ item.value }}</div> |
| | | <div class="data-num" v-inserted :value="item.value">{{ item.value }}</div> |
| | | <div class="data-lable">{{ item.name }}</div> |
| | | </div> |
| | | </div> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import gsap from 'gsap'; |
| | | const nameList = { |
| | | data1: '工单数', |
| | | data2: '恢复数', |
| | |
| | | data4: '产生违约事项数', |
| | | data5: '产生违约责任数', |
| | | } |
| | | |
| | | |
| | | |
| | | export default { |
| | |
| | | immediate: true, |
| | | } |
| | | }, |
| | | directives: { |
| | | inserted: { |
| | | bind(el, binding) { |
| | | let target = { |
| | | count: 0 |
| | | }; |
| | | let finalNumber = el.innerText; |
| | | gsap.to(target, { |
| | | count: finalNumber, |
| | | duration: 1, |
| | | ease: "power2.out", |
| | | onUpdate: () => { |
| | | el.innerText = target.count.toFixed(0); |
| | | } |
| | | }) |
| | | }, |
| | | update(el, binding) { |
| | | let target = { |
| | | count: el.innerText |
| | | }; |
| | | let finalNumber = el.getAttribute('value'); |
| | | gsap.to(target, { |
| | | count: finalNumber, |
| | | duration: 1, |
| | | ease: "power2.out", |
| | | onUpdate: () => { |
| | | el.innerText = target.count.toFixed(0); |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |