{"remainingRequest":"D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\eslint-loader\\index.js??ref--13-0!D:\\jenkins\\workspace\\cssc-fvue\\src\\components\\border\\js\\autoResize.js","dependencies":[{"path":"D:\\jenkins\\workspace\\cssc-fvue\\src\\components\\border\\js\\autoResize.js","mtime":1667804638509},{"path":"D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\eslint-loader\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"regenerator-runtime/runtime\";\nimport _asyncToGenerator from \"D:/jenkins/workspace/cssc-fvue/node_modules/@babel/runtime/helpers/esm/asyncToGenerator\";\nimport { debounce, observerDomResize } from \"./index.js\";\nexport default {\n data: function data() {\n return {\n dom: '',\n width: 0,\n height: 0,\n debounceInitWHFun: '',\n domObserver: ''\n };\n },\n methods: {\n autoResizeMixinInit: function () {\n var _autoResizeMixinInit = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n var initWH, getDebounceInitWHFun, bindDomResizeCallback, afterAutoResizeMixinInit;\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n initWH = this.initWH, getDebounceInitWHFun = this.getDebounceInitWHFun, bindDomResizeCallback = this.bindDomResizeCallback, afterAutoResizeMixinInit = this.afterAutoResizeMixinInit;\n _context.next = 3;\n return initWH(false);\n\n case 3:\n getDebounceInitWHFun();\n bindDomResizeCallback();\n if (typeof afterAutoResizeMixinInit === 'function') afterAutoResizeMixinInit();\n\n case 6:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n\n function autoResizeMixinInit() {\n return _autoResizeMixinInit.apply(this, arguments);\n }\n\n return autoResizeMixinInit;\n }(),\n initWH: function initWH() {\n var _this = this;\n\n var resize = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n var $nextTick = this.$nextTick,\n $refs = this.$refs,\n ref = this.ref,\n onResize = this.onResize;\n return new Promise(function (resolve) {\n $nextTick(function (_) {\n var dom = _this.dom = $refs[ref];\n _this.width = dom ? dom.clientWidth : 0;\n _this.height = dom ? dom.clientHeight : 0;\n\n if (!dom) {\n console.warn('DataV: Failed to get dom node, component rendering may be abnormal!');\n } else if (!_this.width || !_this.height) {\n console.warn('DataV: Component width or height is 0px, rendering abnormality may occur!');\n }\n\n if (typeof onResize === 'function' && resize) onResize();\n resolve();\n });\n });\n },\n getDebounceInitWHFun: function getDebounceInitWHFun() {\n var initWH = this.initWH;\n this.debounceInitWHFun = debounce(100, initWH);\n },\n bindDomResizeCallback: function bindDomResizeCallback() {\n var dom = this.dom,\n debounceInitWHFun = this.debounceInitWHFun;\n this.domObserver = observerDomResize(dom, debounceInitWHFun);\n window.addEventListener('resize', debounceInitWHFun);\n },\n unbindDomResizeCallback: function unbindDomResizeCallback() {\n var domObserver = this.domObserver,\n debounceInitWHFun = this.debounceInitWHFun;\n if (!domObserver) return;\n domObserver.disconnect();\n domObserver.takeRecords();\n domObserver = null;\n window.removeEventListener('resize', debounceInitWHFun);\n }\n },\n mounted: function mounted() {\n var autoResizeMixinInit = this.autoResizeMixinInit;\n autoResizeMixinInit();\n },\n beforeDestroy: function beforeDestroy() {\n var unbindDomResizeCallback = this.unbindDomResizeCallback;\n unbindDomResizeCallback();\n }\n};",null]}