qauMaWeb/node_modules/.cache/babel-loader/eeb260be04142b5621384894f80...

1 line
4.0 KiB
JSON

{"ast":null,"code":"'use strict';\n\nrequire(\"core-js/modules/es.object.to-string.js\");\n\nexports.__esModule = true;\nexports.default = scrollIntoView;\n\nvar _vue = require('vue');\n\nvar _vue2 = _interopRequireDefault(_vue);\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\n\nfunction scrollIntoView(container, selected) {\n if (_vue2.default.prototype.$isServer) return;\n\n if (!selected) {\n container.scrollTop = 0;\n return;\n }\n\n var offsetParents = [];\n var pointer = selected.offsetParent;\n\n while (pointer && container !== pointer && container.contains(pointer)) {\n offsetParents.push(pointer);\n pointer = pointer.offsetParent;\n }\n\n var top = selected.offsetTop + offsetParents.reduce(function (prev, curr) {\n return prev + curr.offsetTop;\n }, 0);\n var bottom = top + selected.offsetHeight;\n var viewRectTop = container.scrollTop;\n var viewRectBottom = viewRectTop + container.clientHeight;\n\n if (top < viewRectTop) {\n container.scrollTop = top;\n } else if (bottom > viewRectBottom) {\n container.scrollTop = bottom - container.clientHeight;\n }\n}","map":{"version":3,"sources":["D:/Work/WorkSpace/GitWorkSpace/TenShop/resource/ElectronicMall/src/qingge-Market/qingge-vue/vue/node_modules/element-ui/lib/utils/scroll-into-view.js"],"names":["exports","__esModule","default","scrollIntoView","_vue","require","_vue2","_interopRequireDefault","obj","container","selected","prototype","$isServer","scrollTop","offsetParents","pointer","offsetParent","contains","push","top","offsetTop","reduce","prev","curr","bottom","offsetHeight","viewRectTop","viewRectBottom","clientHeight"],"mappings":"AAAA;;;;AAEAA,OAAO,CAACC,UAAR,GAAqB,IAArB;AACAD,OAAO,CAACE,OAAR,GAAkBC,cAAlB;;AAEA,IAAIC,IAAI,GAAGC,OAAO,CAAC,KAAD,CAAlB;;AAEA,IAAIC,KAAK,GAAGC,sBAAsB,CAACH,IAAD,CAAlC;;AAEA,SAASG,sBAAT,CAAgCC,GAAhC,EAAqC;AAA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= scrollIntoView;\n\nvar _vue = require('vue');\n\nvar _vue2 = _interopRequireDefault(_vue);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction scrollIntoView(container, selected) {\n if (_vue2.default.prototype.$isServer) return;\n\n if (!selected) {\n container.scrollTop = 0;\n return;\n }\n\n var offsetParents = [];\n var pointer = selected.offsetParent;\n while (pointer && container !== pointer && container.contains(pointer)) {\n offsetParents.push(pointer);\n pointer = pointer.offsetParent;\n }\n var top = selected.offsetTop + offsetParents.reduce(function (prev, curr) {\n return prev + curr.offsetTop;\n }, 0);\n var bottom = top + selected.offsetHeight;\n var viewRectTop = container.scrollTop;\n var viewRectBottom = viewRectTop + container.clientHeight;\n\n if (top < viewRectTop) {\n container.scrollTop = top;\n } else if (bottom > viewRectBottom) {\n container.scrollTop = bottom - container.clientHeight;\n }\n}"]},"metadata":{},"sourceType":"script"}