1 line
9.7 KiB
JSON
1 line
9.7 KiB
JSON
|
{"ast":null,"code":"'use strict';\n\nrequire(\"core-js/modules/es.error.cause.js\");\n\nexports.__esModule = true;\n\nvar _dom = require('element-ui/lib/utils/dom');\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nvar Transition = function () {\n function Transition() {\n _classCallCheck(this, Transition);\n }\n\n Transition.prototype.beforeEnter = function beforeEnter(el) {\n (0, _dom.addClass)(el, 'collapse-transition');\n if (!el.dataset) el.dataset = {};\n el.dataset.oldPaddingTop = el.style.paddingTop;\n el.dataset.oldPaddingBottom = el.style.paddingBottom;\n el.style.height = '0';\n el.style.paddingTop = 0;\n el.style.paddingBottom = 0;\n };\n\n Transition.prototype.enter = function enter(el) {\n el.dataset.oldOverflow = el.style.overflow;\n\n if (el.scrollHeight !== 0) {\n el.style.height = el.scrollHeight + 'px';\n el.style.paddingTop = el.dataset.oldPaddingTop;\n el.style.paddingBottom = el.dataset.oldPaddingBottom;\n } else {\n el.style.height = '';\n el.style.paddingTop = el.dataset.oldPaddingTop;\n el.style.paddingBottom = el.dataset.oldPaddingBottom;\n }\n\n el.style.overflow = 'hidden';\n };\n\n Transition.prototype.afterEnter = function afterEnter(el) {\n // for safari: remove class then reset height is necessary\n (0, _dom.removeClass)(el, 'collapse-transition');\n el.style.height = '';\n el.style.overflow = el.dataset.oldOverflow;\n };\n\n Transition.prototype.beforeLeave = function beforeLeave(el) {\n if (!el.dataset) el.dataset = {};\n el.dataset.oldPaddingTop = el.style.paddingTop;\n el.dataset.oldPaddingBottom = el.style.paddingBottom;\n el.dataset.oldOverflow = el.style.overflow;\n el.style.height = el.scrollHeight + 'px';\n el.style.overflow = 'hidden';\n };\n\n Transition.prototype.leave = function leave(el) {\n if (el.scrollHeight !== 0) {\n // for safari: add class after set height, or it will jump to zero height suddenly, weired\n (0, _dom.addClass)(el, 'collapse-transition');\n el.style.height = 0;\n el.style.paddingTop = 0;\n el.style.paddingBottom = 0;\n }\n };\n\n Transition.prototype.afterLeave = function afterLeave(el) {\n (0, _dom.removeClass)(el, 'collapse-transition');\n el.style.height = '';\n el.style.overflow = el.dataset.oldOverflow;\n el.style.paddingTop = el.dataset.oldPaddingTop;\n el.style.paddingBottom = el.dataset.oldPaddingBottom;\n };\n\n return Transition;\n}();\n\nexports.default = {\n name: 'ElCollapseTransition',\n functional: true,\n render: function render(h, _ref) {\n var children = _ref.children;\n var data = {\n on: new Transition()\n };\n return h('transition', data, children);\n }\n};","map":{"version":3,"sources":["D:/Work/WorkSpace/GitWorkSpace/TenShop/resource/ElectronicMall/src/qingge-Market/qingge-vue/vue/node_modules/element-ui/lib/transitions/collapse-transition.js"],"names":["exports","__esModule","_dom","require","_classCallCheck","instance","Constructor","TypeError","Transition","prototype","beforeEnter","el","addClass","dataset","oldPaddingTop","style","paddingTop","oldPaddingBottom","paddingBottom","height","enter","oldOverflow","overflow","scrollHeight","afterEnter","removeClass","beforeLeave","leave","afterLeave","default","name","functional","render","h","_ref","children","data","on"],"mappings":"AAAA;;;;AAEAA,OAAO,CAACC,UAAR,GAAqB,IAArB;;AAEA,IAAIC,IAAI,GAAGC,OAAO,CAAC,0BAAD,CAAlB;;AAEA,SAASC,eAAT,CAAyBC,QAAzB,EAAmCC,WAAnC,EAAgD;AAAE,MAAI,EAAED,QAAQ,YAAYC,WAAtB,CAAJ,EAAwC;AAAE,UAAM,IAAIC,SAAJ,CAAc,mCAAd,CAAN;AAA2D;AAAE;;AAEzJ,IAAIC,UAAU,GAAG,YAAY;AAC3B,WAASA,UAAT,GAAsB;AACpBJ,IAAAA,eAAe,CAAC,IAAD,EAAOI,UAAP,CAAf;AACD;;AAEDA,EAAAA,UAAU,CAACC,SAAX,CAAqBC,WAArB,GAAmC,SAASA,WAAT,CAAqBC,EAArB,EAAyB;AAC1D,KAAC,GAAGT,IAAI,CAACU,QAAT,EAAmBD,EAAnB,EAAuB,qBAAvB;AACA,QAAI,CAACA,EAAE,CAACE,OAAR,EAAiBF,EAAE,CAACE,OAAH,GAAa,EAAb;AAEjBF,IAAAA,EAAE,CAACE,OAAH,C
|