UNPKG

ant-design-vue

Version:

An enterprise-class UI design language and Vue-based implementation

37 lines (30 loc) 783 B
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); function enhancer(Component) { return { mixins: [Component], updated: function updated() { var _this = this; var now = Date.now(); var updated = false; Object.keys(this.paths).forEach(function (key) { var path = _this.paths[key]; if (!path) { return; } updated = true; var pathStyle = path.style; pathStyle.transitionDuration = '.3s, .3s, .3s, .06s'; if (_this.prevTimeStamp && now - _this.prevTimeStamp < 100) { pathStyle.transitionDuration = '0s, 0s'; } }); if (updated) { this.prevTimeStamp = Date.now(); } } }; } exports['default'] = enhancer;