3 lines
12 KiB
JavaScript
3 lines
12 KiB
JavaScript
/*! @ncctag {"provider":"test","date":"2020-5-11 22:12:48"} */
|
|
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n(require("react")):"function"==typeof define&&define.amd?define(["react"],n):"object"==typeof exports?exports["cmp/bank/commom/DragContainer/index"]=n(require("react")):e["cmp/bank/commom/DragContainer/index"]=n(e.React)}(window,(function(e){return function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="../../../../",t(t.s=182)}({139:function(e,n){e.exports=function(e){var n="undefined"!=typeof window&&window.location;if(!n)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var t=n.protocol+"//"+n.host,r=t+n.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(e,n){var o,i=n.trim().replace(/^"(.*)"$/,(function(e,n){return n})).replace(/^'(.*)'$/,(function(e,n){return n}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(i)?e:(o=0===i.indexOf("//")?i:0===i.indexOf("/")?t+i:r+i.replace(/^\.\//,""),"url("+JSON.stringify(o)+")")}))}},182:function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r,o,i,a=function(){function e(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(n,t,r){return t&&e(n.prototype,t),r&&e(n,r),n}}(),c=t(2),s=(i=c)&&i.__esModule?i:{default:i};function u(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}t(183);var l=(o=r=function(e){function n(e){!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n);var t=function(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?e:n}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e));return t.check=function(e){"horizon"===e?t.clientWid=t.divDom.clientWidth:t.clientHei=t.divDom.clientHeight,t.onMouseDown(e)},t.onMouseDown=function(e){document.documentElement.onmousemove=function(n){if(n.stopPropagation(),"horizon"===e){if(t.mouseDown){var r=t.clientWid+(n.x-t.beginX);r>=t.box.clientWidth-20||r<=50?t.divDom.style.width=t.divDom.clientWidth+"px":t.divDom.style.width=r+"px"}}else if(t.mouseDown){var o=t.clientHei+(n.y-t.beginY);o>=t.box.clientHeight-20||o<=50?t.divDom.style.height=t.divDom.clientHeight+"px":t.divDom.style.height=o+"px"}},document.documentElement.onmouseup=function(n){t.mouseDown=!1,"horizon"===e?t.clientWid=t.divDom.clientWidth:t.clientHei=t.divDom.clientHeight},t.spanDom.onmousedown=function(n){"horizon"===e?t.beginX=n.x:t.beginY=n.y,t.mouseDown=!0}},t.state={styleObj:{horizon:"width",vertical:"height"}},t.mouseDown=!1,t}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}(n,e),a(n,[{key:"componentDidMount",value:function(){this.check(this.props.type)}},{key:"componentWillReceiveProps",value:function(e){e.type!==this.props.type&&this.check(e.type)}},{key:"render",value:function(){var e=this,n=this.props,t=n.Dom1,r=n.Dom2,o=n.type,i=n.size,a=this.state.styleObj;return s.default.createElement("div",{className:"drag-container "+("vertical"===o?"vertical":"horizon"),style:function(e){return"black"===window.top.nccColor?e:{}}({backgroundColor:"#27272a"}),ref:function(n){e.box=n}},s.default.createElement("div",{className:"drag-container-dom1",style:u({height:"100%"},a[o],i),ref:function(n){e.divDom=n}},t),s.default.createElement("div",{ref:function(n){e.spanDom=n},className:"drag-container-seperate"},s.default.createElement("div",{className:"drag-container-seperate-lines"})),s.default.createElement("div",{className:"drag-container-dom2"},r))}}]),n}(c.Component),r.defaultProps={type:"horizon",percent:"50%"},o);n.default=l},183:function(e,n,t){var r=t(184);"string"==typeof r&&(r=[[e.i,r,""]]);var o={transform:void 0};t(4)(r,o);r.locals&&(e.exports=r.locals)},184:function(e,n,t){(e.exports=t(3)(!1)).push([e.i,".drag-container {\n width: 100%;\n height: 100%;\n background-color: #fff;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n.drag-container .drag-container-seperate {\n width: 4px;\n cursor: col-resize;\n}\n.drag-container .drag-container-seperate .drag-container-seperate-lines {\n width: 2px;\n height: 100%;\n background-color: #d0d0d0;\n}\n.drag-container.vertical {\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.drag-container.vertical .drag-container-seperate {\n height: 4px;\n width: 100%;\n cursor: row-resize;\n}\n.drag-container.vertical .drag-container-seperate .drag-container-seperate-lines {\n height: 2px;\n width: 100%;\n background-color: #d0d0d0;\n}\n.drag-container .drag-container-dom1 {\n overflow: auto;\n}\n.drag-container .drag-container-dom1::-webkit-scrollbar {\n /*滚动条整体样式*/\n width: 10px;\n /*高宽分别对应横竖滚动条的尺寸*/\n height: 10px;\n}\n.drag-container .drag-container-dom1::-webkit-scrollbar-thumb {\n /*滚动条里面小方块*/\n border-radius: 10px;\n -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);\n box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);\n background: #9e9e9e;\n}\n.drag-container .drag-container-dom1::-webkit-scrollbar-track {\n /*滚动条里面轨道*/\n -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);\n box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);\n border-radius: 10px;\n background: #f5f5f5;\n}\n.drag-container .drag-container-dom2 {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n overflow: auto;\n}\n.drag-container .drag-container-dom2::-webkit-scrollbar {\n /*滚动条整体样式*/\n width: 10px;\n /*高宽分别对应横竖滚动条的尺寸*/\n height: 10px;\n}\n.drag-container .drag-container-dom2::-webkit-scrollbar-thumb {\n /*滚动条里面小方块*/\n border-radius: 10px;\n -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);\n box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);\n background: #9e9e9e;\n}\n.drag-container .drag-container-dom2::-webkit-scrollbar-track {\n /*滚动条里面轨道*/\n -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);\n box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);\n border-radius: 10px;\n background: #f5f5f5;\n}\n",""])},2:function(n,t){n.exports=e},3:function(e,n){e.exports=function(e){var n=[];return n.toString=function(){return this.map((function(n){var t=function(e,n){var t=e[1]||"",r=e[3];if(!r)return t;if(n&&"function"==typeof btoa){var o=(a=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),i=r.sources.map((function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"}));return[t].concat(i).concat([o]).join("\n")}var a;return[t].join("\n")}(n,e);return n[2]?"@media "+n[2]+"{"+t+"}":t})).join("")},n.i=function(e,t){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},o=0;o<this.length;o++){var i=this[o][0];"number"==typeof i&&(r[i]=!0)}for(o=0;o<e.length;o++){var a=e[o];"number"==typeof a[0]&&r[a[0]]||(t&&!a[2]?a[2]=t:t&&(a[2]="("+a[2]+") and ("+t+")"),n.push(a))}},n}},4:function(e,n,t){var r,o,i={},a=(r=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===o&&(o=r.apply(this,arguments)),o}),c=function(e){var n={};return function(t){return void 0===n[t]&&(n[t]=e.call(this,t)),n[t]}}((function(e){return document.querySelector(e)})),s=null,u=0,l=[],d=t(139);function f(e,n){for(var t=0;t<e.length;t++){var r=e[t],o=i[r.id];if(o){o.refs++;for(var a=0;a<o.parts.length;a++)o.parts[a](r.parts[a]);for(;a<r.parts.length;a++)o.parts.push(v(r.parts[a],n))}else{var c=[];for(a=0;a<r.parts.length;a++)c.push(v(r.parts[a],n));i[r.id]={id:r.id,refs:1,parts:c}}}}function p(e,n){for(var t=[],r={},o=0;o<e.length;o++){var i=e[o],a=n.base?i[0]+n.base:i[0],c={css:i[1],media:i[2],sourceMap:i[3]};r[a]?r[a].parts.push(c):t.push(r[a]={id:a,parts:[c]})}return t}function b(e,n){var t=c(e.insertInto);if(!t)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=l[l.length-1];if("top"===e.insertAt)r?r.nextSibling?t.insertBefore(n,r.nextSibling):t.appendChild(n):t.insertBefore(n,t.firstChild),l.push(n);else{if("bottom"!==e.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");t.appendChild(n)}}function h(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var n=l.indexOf(e);n>=0&&l.splice(n,1)}function m(e){var n=document.createElement("style");return e.attrs.type="text/css",g(n,e.attrs),b(e,n),n}function g(e,n){Object.keys(n).forEach((function(t){e.setAttribute(t,n[t])}))}function v(e,n){var t,r,o,i;if(n.transform&&e.css){if(!(i=n.transform(e.css)))return function(){};e.css=i}if(n.singleton){var a=u++;t=s||(s=m(n)),r=w.bind(null,t,a,!1),o=w.bind(null,t,a,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(t=function(e){var n=document.createElement("link");return e.attrs.type="text/css",e.attrs.rel="stylesheet",g(n,e.attrs),b(e,n),n}(n),r=j.bind(null,t,n),o=function(){h(t),t.href&&URL.revokeObjectURL(t.href)}):(t=m(n),r=k.bind(null,t),o=function(){h(t)});return r(e),function(n){if(n){if(n.css===e.css&&n.media===e.media&&n.sourceMap===e.sourceMap)return;r(e=n)}else o()}}e.exports=function(e,n){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(n=n||{}).attrs="object"==typeof n.attrs?n.attrs:{},n.singleton||(n.singleton=a()),n.insertInto||(n.insertInto="head"),n.insertAt||(n.insertAt="bottom");var t=p(e,n);return f(t,n),function(e){for(var r=[],o=0;o<t.length;o++){var a=t[o];(c=i[a.id]).refs--,r.push(c)}e&&f(p(e,n),n);for(o=0;o<r.length;o++){var c;if(0===(c=r[o]).refs){for(var s=0;s<c.parts.length;s++)c.parts[s]();delete i[c.id]}}}};var y,x=(y=[],function(e,n){return y[e]=n,y.filter(Boolean).join("\n")});function w(e,n,t,r){var o=t?"":r.css;if(e.styleSheet)e.styleSheet.cssText=x(n,o);else{var i=document.createTextNode(o),a=e.childNodes;a[n]&&e.removeChild(a[n]),a.length?e.insertBefore(i,a[n]):e.appendChild(i)}}function k(e,n){var t=n.css,r=n.media;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}function j(e,n,t){var r=t.css,o=t.sourceMap,i=void 0===n.convertToAbsoluteUrls&&o;(n.convertToAbsoluteUrls||i)&&(r=d(r)),o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var a=new Blob([r],{type:"text/css"}),c=e.href;e.href=URL.createObjectURL(a),c&&URL.revokeObjectURL(c)}}})}));
|
|
//# sourceMappingURL=index.95f17d55.js.map
|