xm-select/dist/xm-select.js

8 lines
98 KiB
JavaScript
Raw Normal View History

2019-11-20 18:47:49 +08:00
/*!
* @Title: xm-select
2021-07-22 13:16:36 +08:00
* @Version: 1.2.4
2019-11-20 18:47:49 +08:00
* @Description基于layui的多选解决方案
* @Site: https://gitee.com/maplemei/xm-select
* @Author: maplemei
* @LicenseApache License 2.0
2021-07-22 13:16:36 +08:00
*/!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="./",n(n.s=214)}({1:function(e,t,n){"use strict";function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function l(e){return e.nodeType?e:document.querySelector(e)}function s(){for(var e=[],t=0;t<arguments.length;t++)e.push("".concat(t+1,". ").concat(arguments[t]));console.warn(e.join("\n"))}function c(e){return"[object Array]"==Object.prototype.toString.call(e)}function u(e){return"[object Function]"==Object.prototype.toString.call(e)}function p(e){return e-=0,isNaN(e)&&(e=0),e}function f(e,t){var n;for(n in t)e[n]=e[n]&&"[object Object]"===e[n].toString()&&t[n]&&"[object Object]"===t[n].toString()?f(e[n],t[n]):e[n]=t[n];return e}function d(e,t,n){for(var o=n.value,r=i(t),a=function(n){var i=e[n];t.find((function(e){return e[o]==i[o]}))||r.push(i)},l=0;l<e.length;l++)a(l);return r}function h(){return-1!=navigator.userAgent.indexOf("Mac OS")?"mac":"win"}function m(e,t,n,o){if(e&&c(e)){var r=o.children,i=o.selected,a=o.value;e.forEach((function(e){e.__node[i]||t.find((function(t){return t[a]===e[a]}))?n.push(e):m(e[r],t,n,o)}))}}function b(e,t,n){if(e&&c(e))return e.map((function(e){return e=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e),n.forEach((function(t){return delete e[t]})),e[t]=b(e[t],t,n),e}))}function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=this,r=!1;return function(){for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];r||(r=!0,!n&&e.call.apply(e,[o].concat(a)),setTimeout((function(){n&&e.call.apply(e,[o].concat(a)),r=!1}),t))}}n.d(t,"g",(function(){return l})),n.d(t,"k",(function(){return s})),n.d(t,"d",(function(){return c})),n.d(t,"e",(function(){return u})),n.d(t,"i",(function(){return p})),n.d(t,"b",(function(){return f})),n.d(t,"f",(function(){return d})),n.d(t,"a",(function(){return h})),n.d