@xlaoyu/enhanced-el-tree
Advanced tools
Comparing version 1.1.2 to 1.2.0
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define(["vue"],t):"object"==typeof exports?exports.EnhancedElTree=t(require("vue")):e.EnhancedElTree=t(e.vue)}(window,function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},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=3)}([function(t,n){t.exports=e},function(e,t,n){"use strict";var r=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===i}(e)}(e)},i="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function o(e,t){var n;return t&&!0===t.clone&&r(e)?s((n=e,Array.isArray(n)?[]:{}),e,t):e}function a(e,t,n){var i=e.slice();return t.forEach(function(t,a){void 0===i[a]?i[a]=o(t,n):r(t)?i[a]=s(e[a],t,n):-1===e.indexOf(t)&&i.push(o(t,n))}),i}function s(e,t,n){var i=Array.isArray(t);return i===Array.isArray(e)?i?((n||{arrayMerge:a}).arrayMerge||a)(e,t,n):function(e,t,n){var i={};return r(e)&&Object.keys(e).forEach(function(t){i[t]=o(e[t],n)}),Object.keys(t).forEach(function(a){r(t[a])&&e[a]?i[a]=s(e[a],t[a],n):i[a]=o(t[a],n)}),i}(e,t,n):o(t,n)}s.all=function(e,t){if(!Array.isArray(e)||e.length<2)throw new Error("first argument should be an array with at least two elements");return e.reduce(function(e,n){return s(e,n,t)})};var d=s;e.exports=d},function(e,t,n){"use strict";function r(e,t){for(var n=[],r={},i=0;i<t.length;i++){var o=t[i],a=o[0],s={id:e+":"+i,css:o[1],media:o[2],sourceMap:o[3]};r[a]?r[a].parts.push(s):n.push(r[a]={id:a,parts:[s]})}return n}n.r(t),n.d(t,"default",function(){return p});var i="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!i)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var o={},a=i&&(document.head||document.getElementsByTagName("head")[0]),s=null,d=0,l=!1,c=function(){},h=null,u="data-vue-ssr-id",f="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function p(e,t,n,i){l=n,h=i||{};var a=r(e,t);return v(a),function(t){for(var n=[],i=0;i<a.length;i++){var s=a[i];(d=o[s.id]).refs--,n.push(d)}for(t?v(a=r(e,t)):a=[],i=0;i<n.length;i++){var d;if(0===(d=n[i]).refs){for(var l=0;l<d.parts.length;l++)d.parts[l]();delete o[d.id]}}}}function v(e){for(var t=0;t<e.length;t++){var n=e[t],r=o[n.id];if(r){r.refs++;for(var i=0;i<r.parts.length;i++)r.parts[i](n.parts[i]);for(;i<n.parts.length;i++)r.parts.push(m(n.parts[i]));r.parts.length>n.parts.length&&(r.parts.length=n.parts.length)}else{var a=[];for(i=0;i<n.parts.length;i++)a.push(m(n.parts[i]));o[n.id]={id:n.id,refs:1,parts:a}}}}function y(){var e=document.createElement("style");return e.type="text/css",a.appendChild(e),e}function m(e){var t,n,r=document.querySelector("style["+u+'~="'+e.id+'"]');if(r){if(l)return c;r.parentNode.removeChild(r)}if(f){var i=d++;r=s||(s=y()),t=C.bind(null,r,i,!1),n=C.bind(null,r,i,!0)}else r=y(),t=function(e,t){var n=t.css,r=t.media,i=t.sourceMap;if(r&&e.setAttribute("media",r),h.ssrId&&e.setAttribute(u,t.id),i&&(n+="\n/*# sourceURL="+i.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,r),n=function(){r.parentNode.removeChild(r)};return t(e),function(r){if(r){if(r.css===e.css&&r.media===e.media&&r.sourceMap===e.sourceMap)return;t(e=r)}else n()}}var k,g=(k=[],function(e,t){return k[e]=t,k.filter(Boolean).join("\n")});function C(e,t,n,r){var i=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=g(t,i);else{var o=document.createTextNode(i),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(o,a[t]):e.appendChild(o)}}},function(e,t,n){"use strict";n.r(t);var r=function(e){for(let t=1,n=arguments.length;t<n;t++){let n=arguments[t]||{};for(let t in n)if(n.hasOwnProperty(t)){let r=n[t];void 0!==r&&(e[t]=r)}}return e},i="$treeNodeId",o=function(e,t){return e?t[e]:t[i]},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=function(e){for(var t=!0,n=!0,r=!0,i=0,o=e.length;i<o;i++){var a=e[i];(!0!==a.checked||a.indeterminate)&&(t=!1,a.disabled||(r=!1)),(!1!==a.checked||a.indeterminate)&&(n=!1)}return{all:t,none:n,allWithoutDisable:r,half:!t&&!n}},d=function e(t){if(0!==t.childNodes.length){var n=s(t.childNodes),r=n.all,i=n.none,o=n.half;r?(t.checked=!0,t.indeterminate=!1):o?(t.checked=!1,t.indeterminate=!0):i&&(t.checked=!1,t.indeterminate=!1);var a=t.parent;a&&0!==a.level&&(t.store.checkStrictly||e(a))}},l=function(e,t){var n=e.store.props,r=e.data||{},i=n[t];if("function"==typeof i)return i(r,e);if("string"==typeof i)return r[i];if(void 0===i){var o=r[t];return void 0===o?"":o}},c=0,h=function(){function e(t){for(var n in function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.id=c++,this.text=null,this.checked=!1,this.indeterminate=!1,this.data=null,this.expanded=!1,this.parent=null,this.visible=!0,t)t.hasOwnProperty(n)&&(this[n]=t[n]);this.level=0,this.loaded=!1,this.childNodes=[],this.loading=!1,this.parent&&(this.level=this.parent.level+1);var r=this.store;if(!r)throw new Error("[Node]store is required!");r.registerNode(this);var i=r.props;if(i&&void 0!==i.isLeaf){var o=l(this,"isLeaf");"boolean"==typeof o&&(this.isLeafByUser=o)}if(!0!==r.lazy&&this.data?(this.setData(this.data),r.defaultExpandAll&&(this.expanded=!0)):this.level>0&&r.lazy&&r.defaultExpandAll&&this.expand(),this.data){var a=r.defaultExpandedKeys,s=r.key;s&&a&&-1!==a.indexOf(this.key)&&this.expand(null,r.autoExpandParent),s&&void 0!==r.currentNodeKey&&this.key===r.currentNodeKey&&(r.currentNode=this),r.lazy&&r._initDefaultCheckedNode(this),this.updateLeafState()}}return a(e,[{key:"setData",value:function(e){Array.isArray(e)||function(e,t){t[i]||Object.defineProperty(t,i,{value:e.id,enumerable:!1,configurable:!1,writable:!1})}(this,e),this.data=e,this.childNodes=[];for(var t,n=0,r=(t=0===this.level&&this.data instanceof Array?this.data:l(this,"children")||[]).length;n<r;n++)this.insertChild({data:t[n]})}},{key:"insertChild",value:function(t,n,i){if(!t)throw new Error("insertChild error: child is required.");if(!(t instanceof e)){if(!i){var o=this.getChildren()||[];-1===o.indexOf(t.data)&&(void 0===n||n<0?o.push(t.data):o.splice(n,0,t.data))}r(t,{parent:this,store:this.store}),t=new e(t)}t.level=this.level+1,void 0===n||n<0?this.childNodes.push(t):this.childNodes.splice(n,0,t),this.updateLeafState()}},{key:"insertBefore",value:function(e,t){var n=void 0;t&&(n=this.childNodes.indexOf(t)),this.insertChild(e,n)}},{key:"insertAfter",value:function(e,t){var n=void 0;t&&-1!==(n=this.childNodes.indexOf(t))&&(n+=1),this.insertChild(e,n)}},{key:"removeChild",value:function(e){var t=this.getChildren()||[],n=t.indexOf(e.data);n>-1&&t.splice(n,1);var r=this.childNodes.indexOf(e);r>-1&&(this.store&&this.store.deregisterNode(e),e.parent=null,this.childNodes.splice(r,1)),this.updateLeafState()}},{key:"removeChildByData",value:function(e){var t=null;this.childNodes.forEach(function(n){n.data===e&&(t=n)}),t&&this.removeChild(t)}},{key:"expand",value:function(e,t){var n=this,r=function(){if(t)for(var r=n.parent;r.level>0;)r.expanded=!0,r=r.parent;n.expanded=!0,e&&e()};this.shouldLoadData()?this.loadData(function(e){e instanceof Array&&(n.checked?n.setChecked(!0,!0):d(n),r())}):r()}},{key:"doCreateChildren",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.forEach(function(e){t.insertChild(r({data:e},n),void 0,!0)})}},{key:"collapse",value:function(){this.expanded=!1}},{key:"shouldLoadData",value:function(){return!0===this.store.lazy&&this.store.load&&!this.loaded}},{key:"updateLeafState",value:function(){if(!0!==this.store.lazy||!0===this.loaded||void 0===this.isLeafByUser){var e=this.childNodes;!this.store.lazy||!0===this.store.lazy&&!0===this.loaded?this.isLeaf=!e||0===e.length:this.isLeaf=!1}else this.isLeaf=this.isLeafByUser}},{key:"setChecked",value:function(e,t,n,r){var i=this;if(this.indeterminate="half"===e,this.checked=!0===e,!this.store.checkStrictly){if(!this.shouldLoadData()||this.store.checkDescendants){var o=s(this.childNodes),a=o.all,l=o.allWithoutDisable;this.isLeaf||a||!l||(this.checked=!1,e=!1);var c=function(){if(t){for(var n=i.childNodes,o=0,a=n.length;o<a;o++){var d=n[o];r=r||!1!==e;var l=d.disabled?d.checked:r;d.setChecked(l,t,!0,r)}var c=s(n),h=c.half,u=c.all;u||(i.checked=u,i.indeterminate=h)}};if(this.shouldLoadData())return void this.loadData(function(){c(),d(i)},{checked:!1!==e});c()}var h=this.parent;h&&0!==h.level&&(n||d(h))}}},{key:"getChildren",value:function(){if(0===this.level)return this.data;var e=this.data;if(!e)return null;var t=this.store.props,n="children";return t&&(n=t.children||"children"),void 0===e[n]&&(e[n]=null),e[n]}},{key:"updateChildren",value:function(){var e=this,t=this.getChildren()||[],n=this.childNodes.map(function(e){return e.data}),r={},o=[];t.forEach(function(e,t){e[i]?r[e[i]]={index:t,data:e}:o.push({index:t,data:e})}),n.forEach(function(t){r[t[i]]||e.removeChildByData(t)}),o.forEach(function(t){var n=t.index,r=t.data;e.insertChild({data:r},n)}),this.updateLeafState()}},{key:"loadData",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!0!==this.store.lazy||!this.store.load||this.loaded||this.loading&&!Object.keys(n).length?e&&e.call(this):(this.loading=!0,this.store.load(this,function(r){t.loaded=!0,t.loading=!1,t.childNodes=[],t.doCreateChildren(r,n),t.updateLeafState(),e&&e.call(t,r)}))}},{key:"label",get:function(){return l(this,"label")}},{key:"icon",get:function(){return l(this,"icon")}},{key:"key",get:function(){var e=this.store.key;return this.data?this.data[e]:null}},{key:"disabled",get:function(){return l(this,"disabled")}}]),e}(),u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),p=function(){function e(t){var n=this;for(var r in function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.currentNode=null,this.currentNodeKey=null,t)t.hasOwnProperty(r)&&(this[r]=t[r]);this.nodesMap={},this.levelShow=[],this.root=new h({data:this.data,store:this}),this.lazy&&this.load?(0,this.load)(this.root,function(e){n.root.doCreateChildren(e),n._initDefaultCheckedNodes()}):this._initDefaultCheckedNodes()}return f(e,[{key:"filter",value:function(e){var t=this.filterNodeMethod;!function n(r){var i=r.root?r.root.childNodes:r.childNodes;if(i.forEach(function(r){r.visible=t.call(r,e,r.data,r),n(r)}),!r.visible&&i.length){var o=!0;i.forEach(function(e){e.visible&&(o=!1)}),r.root?r.root.visible=!1===o:r.visible=!1===o}e&&r.visible&&!r.isLeaf&&r.expand()}(this)}},{key:"setData",value:function(e){e!==this.root.data?(this.root.setData(e),this._initDefaultCheckedNodes()):this.root.updateChildren()}},{key:"getNode",value:function(e){if(e instanceof h)return e;var t="object"!==(void 0===e?"undefined":u(e))?e:o(this.key,e);return this.nodesMap[t]||null}},{key:"insertBefore",value:function(e,t){var n=this.getNode(t);n.parent.insertBefore({data:e},n)}},{key:"insertAfter",value:function(e,t){var n=this.getNode(t);n.parent.insertAfter({data:e},n)}},{key:"remove",value:function(e){var t=this.getNode(e);t&&t.parent.removeChild(t)}},{key:"append",value:function(e,t){var n=t?this.getNode(t):this.root;n&&n.insertChild({data:e})}},{key:"_initDefaultCheckedNodes",value:function(){var e=this,t=this.defaultCheckedKeys||[],n=this.nodesMap;t.forEach(function(t){var r=n[t];r&&r.setChecked(!0,!e.checkStrictly)})}},{key:"_initDefaultCheckedNode",value:function(e){-1!==(this.defaultCheckedKeys||[]).indexOf(e.key)&&e.setChecked(!0,!this.checkStrictly)}},{key:"setDefaultCheckedKey",value:function(e){e!==this.defaultCheckedKeys&&(this.defaultCheckedKeys=e,this._initDefaultCheckedNodes())}},{key:"registerNode",value:function(e){this.key&&e&&e.data&&void 0!==e.key&&(this.nodesMap[e.key]=e)}},{key:"deregisterNode",value:function(e){if(this.key&&e&&e.data){for(var t=e.childNodes,n=0,r=t.length;n<r;n++){var i=t[n];this.deregisterNode(i)}delete this.nodesMap[e.key]}}},{key:"getCheckedNodes",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=[];return function n(r){(r.root?r.root.childNodes:r.childNodes).forEach(function(r){r.checked&&(!e||e&&r.isLeaf)&&t.push(r.data),n(r)})}(this),t}},{key:"getCheckedKeys",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.getCheckedNodes(t).map(function(t){return(t||{})[e.key]})}},{key:"getHalfCheckedNodes",value:function(){var e=[];return function t(n){(n.root?n.root.childNodes:n.childNodes).forEach(function(n){n.indeterminate&&e.push(n.data),t(n)})}(this),e}},{key:"getHalfCheckedKeys",value:function(){var e=this;return this.getHalfCheckedNodes().map(function(t){return(t||{})[e.key]})}},{key:"_getAllNodes",value:function(){var e=[],t=this.nodesMap;for(var n in t)t.hasOwnProperty(n)&&e.push(t[n]);return e}},{key:"updateChildren",value:function(e,t){var n=this.nodesMap[e];if(n){for(var r=n.childNodes,i=r.length-1;i>=0;i--){var o=r[i];this.remove(o.data)}for(var a=0,s=t.length;a<s;a++){var d=t[a];this.append(d,n.data)}}}},{key:"_setCheckedKeys",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments[2],r=this._getAllNodes().sort(function(e,t){return t.level-e.level}),i=Object.create(null),o=Object.keys(n);r.forEach(function(e){return e.setChecked(!1,!1)});for(var a=0,s=r.length;a<s;a++){var d=r[a],l=d.data[e].toString();if(o.indexOf(l)>-1){for(var c=d.parent;c&&c.level>0;)i[c.data[e]]=!0,c=c.parent;d.isLeaf||this.checkStrictly?d.setChecked(!0,!1):(d.setChecked(!0,!0),t&&(d.setChecked(!1,!1),function e(t){t.childNodes.forEach(function(t){t.isLeaf||t.setChecked(!1,!1),e(t)})}(d)))}else d.checked&&!i[l]&&d.setChecked(!1,!1)}}},{key:"setCheckedNodes",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.key,r={};e.forEach(function(e){r[(e||{})[n]]=!0}),this._setCheckedKeys(n,t,r)}},{key:"setCheckedKeys",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.defaultCheckedKeys=e;var n=this.key,r={};e.forEach(function(e){r[e]=!0}),this._setCheckedKeys(n,t,r)}},{key:"setDefaultExpandedKeys",value:function(e){var t=this;e=e||[],this.defaultExpandedKeys=e,e.forEach(function(e){var n=t.getNode(e);n&&n.expand(null,t.autoExpandParent)})}},{key:"setChecked",value:function(e,t,n){var r=this.getNode(e);r&&r.setChecked(!!t,n)}},{key:"getCurrentNode",value:function(){return this.currentNode}},{key:"setCurrentNode",value:function(e){this.currentNode=e}},{key:"setUserCurrentNode",value:function(e){var t=e[this.key],n=this.nodesMap[t];this.setCurrentNode(n)}},{key:"setCurrentNodeKey",value:function(e){var t=this.getNode(e);t&&(this.currentNode=t)}}]),e}(),v=n(0),y=n.n(v);const m=y.a.prototype.$isServer,k=(m||Number(document.documentMode),function(e){return(e||"").replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g,"")});function g(e,t){if(!e||!t)return!1;if(-1!==t.indexOf(" "))throw new Error("className should not contain space.");return e.classList?e.classList.contains(t):(" "+e.className+" ").indexOf(" "+t+" ")>-1}function C(e,t){if(e){for(var n=e.className,r=(t||"").split(" "),i=0,o=r.length;i<o;i++){var a=r[i];a&&(e.classList?e.classList.add(a):g(e,a)||(n+=" "+a))}e.classList||(e.className=n)}}function x(e,t){if(e&&t){for(var n=t.split(" "),r=" "+e.className+" ",i=0,o=n.length;i<o;i++){var a=n[i];a&&(e.classList?e.classList.remove(a):g(e,a)&&(r=r.replace(" "+a+" "," ")))}e.classList||(e.className=k(r))}}!m&&document.addEventListener,!m&&document.removeEventListener;var b={name:"ElCollapseTransition",functional:!0,render:(e,{children:t})=>e("transition",{on:new class{beforeEnter(e){C(e,"collapse-transition"),e.dataset||(e.dataset={}),e.dataset.oldPaddingTop=e.style.paddingTop,e.dataset.oldPaddingBottom=e.style.paddingBottom,e.style.height="0",e.style.paddingTop=0,e.style.paddingBottom=0}enter(e){e.dataset.oldOverflow=e.style.overflow,0!==e.scrollHeight?(e.style.height=e.scrollHeight+"px",e.style.paddingTop=e.dataset.oldPaddingTop,e.style.paddingBottom=e.dataset.oldPaddingBottom):(e.style.height="",e.style.paddingTop=e.dataset.oldPaddingTop,e.style.paddingBottom=e.dataset.oldPaddingBottom),e.style.overflow="hidden"}afterEnter(e){x(e,"collapse-transition"),e.style.height="",e.style.overflow=e.dataset.oldOverflow}beforeLeave(e){e.dataset||(e.dataset={}),e.dataset.oldPaddingTop=e.style.paddingTop,e.dataset.oldPaddingBottom=e.style.paddingBottom,e.dataset.oldOverflow=e.style.overflow,e.style.height=e.scrollHeight+"px",e.style.overflow="hidden"}leave(e){0!==e.scrollHeight&&(C(e,"collapse-transition"),e.style.height=0,e.style.paddingTop=0,e.style.paddingBottom=0)}afterLeave(e){x(e,"collapse-transition"),e.style.height="",e.style.overflow=e.dataset.oldOverflow,e.style.paddingTop=e.dataset.oldPaddingTop,e.style.paddingBottom=e.dataset.oldPaddingBottom}}},t)},N={methods:{dispatch(e,t,n){for(var r=this.$parent||this.$root,i=r.$options.componentName;r&&(!i||i!==e);)(r=r.$parent)&&(i=r.$options.componentName);r&&r.$emit.apply(r,[t].concat(n))},broadcast(e,t,n){(function e(t,n,r){this.$children.forEach(i=>{i.$options.componentName===t?i.$emit.apply(i,[n].concat(r)):e.apply(i,[t,n].concat([r]))})}).call(this,e,t,n)}}},_={name:"ElCheckbox",mixins:[N],inject:{elForm:{default:""},elFormItem:{default:""}},componentName:"ElCheckbox",data:function(){return{selfModel:!1,focus:!1,isLimitExceeded:!1}},computed:{model:{get:function(){return this.isGroup?this.store:void 0!==this.value?this.value:this.selfModel},set:function(e){this.isGroup?(this.isLimitExceeded=!1,void 0!==this._checkboxGroup.min&&e.length<this._checkboxGroup.min&&(this.isLimitExceeded=!0),void 0!==this._checkboxGroup.max&&e.length>this._checkboxGroup.max&&(this.isLimitExceeded=!0),!1===this.isLimitExceeded&&this.dispatch("ElCheckboxGroup","input",[e])):(this.$emit("input",e),this.selfModel=e)}},isChecked:function(){return"[object Boolean]"==={}.toString.call(this.model)?this.model:Array.isArray(this.model)?this.model.indexOf(this.label)>-1:null!==this.model&&void 0!==this.model?this.model===this.trueLabel:void 0},isGroup:function(){for(var e=this.$parent;e;){if("ElCheckboxGroup"===e.$options.componentName)return this._checkboxGroup=e,!0;e=e.$parent}return!1},store:function(){return this._checkboxGroup?this._checkboxGroup.value:this.value},isDisabled:function(){return this.isGroup?this._checkboxGroup.disabled||this.disabled||(this.elForm||{}).disabled:this.disabled||(this.elForm||{}).disabled},_elFormItemSize:function(){return(this.elFormItem||{}).elFormItemSize},checkboxSize:function(){var e=this.size||this._elFormItemSize||(this.$ELEMENT||{}).size;return this.isGroup&&this._checkboxGroup.checkboxGroupSize||e}},props:{value:{},label:{},indeterminate:Boolean,disabled:Boolean,checked:Boolean,name:String,trueLabel:[String,Number],falseLabel:[String,Number],id:String,controls:String,border:Boolean,size:String},methods:{addToStore:function(){Array.isArray(this.model)&&-1===this.model.indexOf(this.label)?this.model.push(this.label):this.model=this.trueLabel||!0},handleChange:function(e){var t=this;if(!this.isLimitExceeded){var n;n=e.target.checked?void 0===this.trueLabel||this.trueLabel:void 0!==this.falseLabel&&this.falseLabel,this.$emit("change",n,e),this.$nextTick(function(){t.isGroup&&t.dispatch("ElCheckboxGroup","change",[t._checkboxGroup.value])})}}},created:function(){this.checked&&this.addToStore()},mounted:function(){this.indeterminate&&this.$el.setAttribute("aria-controls",this.controls)}},A=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("label",{staticClass:"el-checkbox",class:[e.border&&e.checkboxSize?"el-checkbox--"+e.checkboxSize:"",{"is-disabled":e.isDisabled},{"is-bordered":e.border},{"is-checked":e.isChecked}],attrs:{role:"checkbox","aria-checked":e.indeterminate?"mixed":e.isChecked,"aria-disabled":e.isDisabled,id:e.id}},[n("span",{staticClass:"el-checkbox__input",class:{"is-disabled":e.isDisabled,"is-checked":e.isChecked,"is-indeterminate":e.indeterminate,"is-focus":e.focus},attrs:{"aria-checked":"mixed"}},[n("span",{staticClass:"el-checkbox__inner"}),e._v(" "),e.trueLabel||e.falseLabel?n("input",{directives:[{name:"model",rawName:"v-model",value:e.model,expression:"model"}],staticClass:"el-checkbox__original",attrs:{type:"checkbox",name:e.name,disabled:e.isDisabled,"true-value":e.trueLabel,"false-value":e.falseLabel},domProps:{checked:Array.isArray(e.model)?e._i(e.model,null)>-1:e._q(e.model,e.trueLabel)},on:{change:[function(t){var n=e.model,r=t.target,i=r.checked?e.trueLabel:e.falseLabel;if(Array.isArray(n)){var o=e._i(n,null);r.checked?o<0&&(e.model=n.concat([null])):o>-1&&(e.model=n.slice(0,o).concat(n.slice(o+1)))}else e.model=i},e.handleChange],focus:function(t){e.focus=!0},blur:function(t){e.focus=!1}}}):n("input",{directives:[{name:"model",rawName:"v-model",value:e.model,expression:"model"}],staticClass:"el-checkbox__original",attrs:{type:"checkbox",disabled:e.isDisabled,name:e.name},domProps:{value:e.label,checked:Array.isArray(e.model)?e._i(e.model,e.label)>-1:e.model},on:{change:[function(t){var n=e.model,r=t.target,i=!!r.checked;if(Array.isArray(n)){var o=e.label,a=e._i(n,o);r.checked?a<0&&(e.model=n.concat([o])):a>-1&&(e.model=n.slice(0,a).concat(n.slice(a+1)))}else e.model=i},e.handleChange],focus:function(t){e.focus=!0},blur:function(t){e.focus=!1}}})]),e._v(" "),e.$slots.default||e.label?n("span",{staticClass:"el-checkbox__label"},[e._t("default"),e._v(" "),e.$slots.default?e._e():[e._v(e._s(e.label))]],2):e._e()])};function w(e,t,n,r,i,o,a,s){var d=typeof(e=e||{}).default;"object"!==d&&"function"!==d||(e=e.default);var l,c="function"==typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=n,c._compiled=!0),r&&(c.functional=!0),o&&(c._scopeId=o),a?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},c._ssrRegister=l):i&&(l=s?function(){i.call(this,this.$root.$options.shadowRoot)}:i),l)if(c.functional){c._injectStyles=l;var h=c.render;c.render=function(e,t){return l.call(t),h(e,t)}}else{var u=c.beforeCreate;c.beforeCreate=u?[].concat(u,l):[l]}return{exports:e,options:c}}A._withStripped=!0;var E=w(_,A,[],!1,null,null,null);E.options.__file="node_modules/_element-ui@2.3.0@element-ui/packages/checkbox/src/checkbox.vue";var K=E.exports;K.install=function(e){e.component(K.name,K)};var B={name:"ElTreeNode",componentName:"ElTreeNode",components:{ElCollapseTransition:b,ElCheckbox:K,NodeContent:{props:{node:{required:!0}},render:function(e){var t=this.$parent,n=t.tree,r=this.node,i=r.data,o=r.store;return t.renderContent?t.renderContent.call(t._renderProxy,e,{_self:n.$vnode.context,node:r,data:i,store:o}):n.$scopedSlots.default?n.$scopedSlots.default({node:r,data:i}):e("span",{class:"el-tree-node__label"},[this.node.label])}}},mixins:[N],props:{node:{type:Object,default:function(){return{}}},props:{type:Object,default:function(){return{}}},renderContent:Function,renderAfterExpand:{type:Boolean,default:!0}},data:function(){return{tree:null,expanded:!1,childNodeRendered:!1,showCheckbox:!1,oldChecked:null,oldIndeterminate:null}},watch:{"node.indeterminate":function(e){this.handleSelectChange(this.node.checked,e)},"node.checked":function(e){this.handleSelectChange(e,this.node.indeterminate)},"node.expanded":function(e){var t=this;this.$nextTick(function(){return t.expanded=e}),e&&(this.childNodeRendered=!0)}},created:function(){var e=this,t=this.$parent;t.isTree?this.tree=t:this.tree=t.tree;var n=this.tree;n||console.warn("Can not find node's tree.");var r=(n.props||{}).children||"children";this.$watch("node.data."+r,function(){e.node.updateChildren()}),this.showCheckbox=n.showCheckbox,this.node.expanded&&(this.expanded=!0,this.childNodeRendered=!0),this.tree.accordion&&this.$on("tree-node-expand",function(t){e.node!==t&&e.node.collapse()})},methods:{getNodeKey:function(e){return o(this.tree.nodeKey,e.data)},handleSelectChange:function(e,t){this.oldChecked!==e&&this.oldIndeterminate!==t&&this.tree.$emit("check-change",this.node.data,e,t),this.oldChecked=e,this.indeterminate=t},handleClick:function(){var e=this.tree.store;e.setCurrentNode(this.node),this.tree.$emit("current-change",e.currentNode?e.currentNode.data:null,e.currentNode),this.tree.currentNode=this,this.tree.expandOnClickNode&&this.handleExpandIconClick(),this.tree.$emit("node-click",this.node.data,this.node,this)},handleContextMenu:function(e){this.tree.$emit("node-contextmenu",e,this.node.data,this.node,this)},handleExpandIconClick:function(){var e=this.tree.store;this.node.isLeaf||(this.expanded?(e.levelShow.splice(this.node.level-1,e.levelShow.length),this.tree.$emit("node-collapse",this.node.data,this.node,this),this.node.collapse()):(e.levelShow.splice(this.node.level-1,e.levelShow.length,this.node),this.node.expand(),this.$emit("node-expand",this.node.data,this.node,this)))},handleCheckChange:function(e,t){var n=this;this.node.setChecked(t.target.checked,!this.tree.checkStrictly),this.$nextTick(function(){var e=n.tree.store;n.tree.$emit("check",n.node.data,{checkedNodes:e.getCheckedNodes(),checkedKeys:e.getCheckedKeys(),halfCheckedNodes:e.getHalfCheckedNodes(),halfCheckedKeys:e.getHalfCheckedKeys()})})},handleChildNodeExpand:function(e,t,n){this.broadcast("ElTreeNode","tree-node-expand",t),this.tree.$emit("node-expand",e,t,n)}}},S=function(){var e=this,t=this,n=t.$createElement,r=t._self._c||n;return r("div",{directives:[{name:"show",rawName:"v-show",value:t.node.visible,expression:"node.visible"}],staticClass:"el-tree-node",class:{"is-expanded":t.expanded,"is-current":t.tree.store.currentNode===t.node,"is-hidden":!t.node.visible,"is-focusable":!t.node.disabled,"is-checked":!t.node.disabled&&t.node.checked},attrs:{role:"treeitem",tabindex:"-1","aria-expanded":t.expanded,"aria-disabled":t.node.disabled,"aria-checked":t.node.checked},on:{click:function(e){return e.stopPropagation(),t.handleClick(e)},contextmenu:function(t){return e.handleContextMenu(t)}}},[r("div",{staticClass:"el-tree-node__content",style:{"padding-left":(t.node.level-1)*t.tree.indent+"px"}},[r("span",{staticClass:"el-tree-node__expand-icon el-icon-caret-right",class:{"is-leaf":t.node.isLeaf,expanded:!t.node.isLeaf&&t.expanded},on:{click:function(e){return e.stopPropagation(),t.handleExpandIconClick(e)}}}),t._v(" "),t.showCheckbox?r("el-checkbox",{attrs:{indeterminate:t.node.indeterminate,disabled:!!t.node.disabled},on:{change:t.handleCheckChange},nativeOn:{click:function(e){e.stopPropagation()}},model:{value:t.node.checked,callback:function(e){t.$set(t.node,"checked",e)},expression:"node.checked"}}):t._e(),t._v(" "),t.node.loading?r("span",{staticClass:"el-tree-node__loading-icon el-icon-loading"}):t._e(),t._v(" "),r("node-content",{attrs:{node:t.node}}),t._v(" "),t.node.store.horizontal?r("span",{staticClass:"el-tree-node__expand-icon el-icon-caret-right right-icon",class:{"is-leaf":t.node.isLeaf}}):t._e()],1),t._v(" "),r("el-collapse-transition",[!t.renderAfterExpand||t.childNodeRendered?r("div",{directives:[{name:"show",rawName:"v-show",value:!t.tree.$props.horizontal&&t.expanded,expression:"!tree.$props.horizontal && expanded"}],staticClass:"el-tree-node__children",attrs:{role:"group","aria-expanded":t.expanded}},t._l(t.node.childNodes,function(e){return r("el-tree-node",{key:t.getNodeKey(e),attrs:{"render-content":t.renderContent,"render-after-expand":t.renderAfterExpand,node:e},on:{"node-expand":t.handleChildNodeExpand}})})):t._e()])],1)};S._withStripped=!0;var L=w(B,S,[],!1,null,null,null);L.options.__file="src/tree-node.vue";var T=L.exports,$=n(1),O=n.n($);const D=Object.prototype.hasOwnProperty,M=/(%|)\{([0-9a-zA-Z_]+)\}/g,P=(y.a,function(e,...t){return 1===t.length&&"object"==typeof t[0]&&(t=t[0]),t&&t.hasOwnProperty||(t={}),e.replace(M,(i,o,a,s)=>{let d;return"{"===e[s-1]&&"}"===e[s+i.length]?a:(n=t,r=a,null===(d=D.call(n,r)?t[a]:null)||void 0===d?"":d)});var n,r});let I={el:{colorpicker:{confirm:"确定",clear:"清空"},datepicker:{now:"此刻",today:"今天",cancel:"取消",clear:"清空",confirm:"确定",selectDate:"选择日期",selectTime:"选择时间",startDate:"开始日期",startTime:"开始时间",endDate:"结束日期",endTime:"结束时间",prevYear:"前一年",nextYear:"后一年",prevMonth:"上个月",nextMonth:"下个月",year:"年",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},months:{jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月"}},select:{loading:"加载中",noMatch:"无匹配数据",noData:"无数据",placeholder:"请选择"},cascader:{noMatch:"无匹配数据",loading:"加载中",placeholder:"请选择"},pagination:{goto:"前往",pagesize:"条/页",total:"共 {total} 条",pageClassifier:"页"},messagebox:{title:"提示",confirm:"确定",cancel:"取消",error:"输入的数据不合法!"},upload:{deleteTip:"按 delete 键可删除",delete:"删除",preview:"查看图片",continue:"继续上传"},table:{emptyText:"暂无数据",confirmFilter:"筛选",resetFilter:"重置",clearFilter:"全部",sumText:"合计"},tree:{emptyText:"暂无数据"},transfer:{noMatch:"无匹配数据",noData:"无数据",titles:["列表 1","列表 2"],filterPlaceholder:"请输入搜索内容",noCheckedFormat:"共 {total} 项",hasCheckedFormat:"已选 {checked}/{total} 项"}}},j=!1;const z=function(e,t){let n=function(){const e=Object.getPrototypeOf(this||y.a).$t;if("function"==typeof e&&y.a.locale)return j||(j=!0,y.a.locale(y.a.config.lang,O()(I,y.a.locale(y.a.config.lang)||{},{clone:!0}))),e.apply(this,arguments)}.apply(this,arguments);if(null!==n&&void 0!==n)return n;const r=e.split(".");let i=I;for(let e=0,o=r.length;e<o;e++){if(n=i[r[e]],e===o-1)return P(n,t);if(!n)return"";i=n}return""};var q={name:"ElTree",components:{ElTreeNode:T},mixins:[N],props:{data:{type:Array},emptyText:{type:String,default:function(){return z("el.tree.emptyText")}},renderAfterExpand:{type:Boolean,default:!0},nodeKey:String,checkStrictly:Boolean,defaultExpandAll:Boolean,expandOnClickNode:{type:Boolean,default:!0},checkDescendants:{type:Boolean,default:!1},autoExpandParent:{type:Boolean,default:!0},defaultCheckedKeys:Array,defaultExpandedKeys:Array,renderContent:Function,showCheckbox:{type:Boolean,default:!1},props:{type:Object,default:function(){return{children:"children",label:"label",icon:"icon",disabled:"disabled"}}},lazy:{type:Boolean,default:!1},highlightCurrent:Boolean,load:Function,filterNodeMethod:Function,accordion:Boolean,indent:{type:Number,default:18},horizontal:Boolean,treeNodeWrapperClass:{type:String,default:""}},data:function(){return{store:null,root:null,currentNode:null,treeItems:null,checkboxItems:[]}},computed:{children:{set:function(e){this.data=e},get:function(){return this.data}},treeItemArray:function(){return Array.prototype.slice.call(this.treeItems)},__nodes:function(){var e=[],t=this.store.nodesMap;for(var n in t)t.hasOwnProperty(n)&&e.push(t[n]);return e}},watch:{defaultCheckedKeys:function(e){this.store.defaultCheckedKeys=e,this.store.setDefaultCheckedKey(e)},defaultExpandedKeys:function(e){this.store.defaultExpandedKeys=e,this.store.setDefaultExpandedKeys(e)},data:function(e){this.store.setData(e)},checkboxItems:function(e){Array.prototype.forEach.call(e,function(e){e.setAttribute("tabindex",-1)})}},created:function(){this.isTree=!0,this.store=new p({key:this.nodeKey,data:this.data,lazy:this.lazy,props:this.props,load:this.load,horizontal:this.horizontal,currentNodeKey:this.currentNodeKey,checkStrictly:this.checkStrictly,checkDescendants:this.checkDescendants,defaultCheckedKeys:this.defaultCheckedKeys,defaultExpandedKeys:this.defaultExpandedKeys,autoExpandParent:this.autoExpandParent,defaultExpandAll:this.defaultExpandAll,filterNodeMethod:this.filterNodeMethod}),this.root=this.store.root},mounted:function(){this.initTabindex(),this.$el.addEventListener("keydown",this.handelKeydown)},updated:function(){this.treeItems=this.$el.querySelectorAll("[role=treeitem]"),this.checkboxItems=this.$el.querySelectorAll("input[type=checkbox]")},methods:{filter:function(e){if(!this.filterNodeMethod)throw new Error("[Tree] filterNodeMethod is required when filter");this.store.filter(e)},getNodeKey:function(e){return o(this.nodeKey,e.data)},getNodePath:function(e){if(!this.nodeKey)throw new Error("[Tree] nodeKey is required in getNodePath");var t=this.store.getNode(e);if(!t)return[];for(var n=[t.data],r=t.parent;r&&r!==this.root;)n.push(r.data),r=r.parent;return n.reverse()},getCheckedNodes:function(e){return this.store.getCheckedNodes(e)},getCheckedKeys:function(e){return this.store.getCheckedKeys(e)},getCurrentNode:function(){var e=this.store.getCurrentNode();return e?e.data:null},getCurrentKey:function(){if(!this.nodeKey)throw new Error("[Tree] nodeKey is required in getCurrentKey");var e=this.getCurrentNode();return e?e[this.nodeKey]:null},setCheckedNodes:function(e,t){if(!this.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedNodes");this.store.setCheckedNodes(e,t)},setCheckedKeys:function(e,t){if(!this.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedKeys");this.store.setCheckedKeys(e,t)},setChecked:function(e,t,n){this.store.setChecked(e,t,n)},getHalfCheckedNodes:function(){return this.store.getHalfCheckedNodes()},getHalfCheckedKeys:function(){return this.store.getHalfCheckedKeys()},setCurrentNode:function(e){if(!this.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentNode");this.store.setUserCurrentNode(e)},setCurrentKey:function(e){if(!this.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentKey");this.store.setCurrentNodeKey(e)},getNode:function(e){return this.store.getNode(e)},remove:function(e){this.store.remove(e)},append:function(e,t){this.store.append(e,t)},insertBefore:function(e,t){this.store.insertBefore(e,t)},insertAfter:function(e,t){this.store.insertAfter(e,t)},handleNodeExpand:function(e,t,n){this.broadcast("ElTreeNode","tree-node-expand",t),this.$emit("node-expand",e,t,n)},updateKeyChildren:function(e,t){if(!this.nodeKey)throw new Error("[Tree] nodeKey is required in updateKeyChild");this.store.updateChildren(e,t)},initTabindex:function(){this.treeItems=this.$el.querySelectorAll(".is-focusable[role=treeitem]"),this.checkboxItems=this.$el.querySelectorAll("input[type=checkbox]");var e=this.$el.querySelectorAll(".is-checked[role=treeitem]");e.length?e[0].setAttribute("tabindex",0):this.treeItems[0]&&this.treeItems[0].setAttribute("tabindex",0)},handelKeydown:function(e){var t=e.target;if(-1!==t.className.indexOf("el-tree-node")){e.preventDefault();var n=e.keyCode;this.treeItems=this.$el.querySelectorAll(".is-focusable[role=treeitem]");var r=this.treeItemArray.indexOf(t),i=void 0;[38,40].indexOf(n)>-1&&(i=38===n?0!==r?r-1:0:r<this.treeItemArray.length-1?r+1:0,this.treeItemArray[i].focus());var o=t.querySelector('[type="checkbox"]');[37,39].indexOf(n)>-1&&t.click(),[13,32].indexOf(n)>-1&&o&&o.click()}},getAllCheckedKeys:function(){var e=[],t=this.store.nodesMap;for(var n in t)t.hasOwnProperty(n)&&(t[n].indeterminate||t[n].checked)&&e.push(t[n].data[this.store.key]);return e},getAllCheckedNodes:function(){var e=[],t=this.store.nodesMap;for(var n in t)t.hasOwnProperty(n)&&(t[n].indeterminate||t[n].checked)&&e.push(t[n].data);return e},setCheckedNodesPrecisely:function(e){var t=this;if(!this.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedNodesPrecisely");var n=this.__nodes.filter(function(e){return e.isLeaf}).map(function(e){return e.data[t.nodeKey]}),r=e.filter(function(e){return n.includes(e[t.nodeKey])});this.setCheckedNodes(r)},setCheckedKeysPrecisely:function(e){var t=this;if(!this.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedNodesPrecisely");var n=this.__nodes.filter(function(e){return e.isLeaf}).map(function(e){return e.data[t.nodeKey]}),r=e.filter(function(e){return n.includes(e)});this.setCheckedKeys(r)},getCheckedKeysWithoutChild:function(){var e=this;return this.__nodes.filter(function(e){return e.checked&&!e.parent.checked}).map(function(t){return t.data[e.nodeKey]})},getCheckedNodesWithoutChild:function(){return this.__nodes.filter(function(e){return e.checked&&!e.parent.checked}).map(function(e){return e.data})}}},F=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"el-tree",class:{"el-tree--highlight-current":e.highlightCurrent},attrs:{role:"tree"}},[e.horizontal?n("div",{class:[e.treeNodeWrapperClass,"el-tree-node-wrapper"]},[n("div",{staticClass:"el-tree-node-block"},e._l(e.root.childNodes,function(t){return n("el-tree-node",{key:e.getNodeKey(t),attrs:{node:t,props:e.props,"render-after-expand":e.renderAfterExpand,"render-content":e.renderContent},on:{"node-expand":e.handleNodeExpand}})})),e._v(" "),e._l(e.store.levelShow,function(t){return n("div",{key:t.id,staticClass:"el-tree-node-block"},e._l(t.childNodes,function(t){return n("el-tree-node",{key:e.getNodeKey(t),attrs:{node:t,props:e.props,"render-after-expand":e.renderAfterExpand,"render-content":e.renderContent},on:{"node-expand":e.handleNodeExpand}})}))})],2):e._e(),e._v(" "),e.horizontal?e._e():e._l(e.root.childNodes,function(t){return n("el-tree-node",{key:e.getNodeKey(t),attrs:{node:t,props:e.props,"render-after-expand":e.renderAfterExpand,"render-content":e.renderContent},on:{"node-expand":e.handleNodeExpand}})}),e._v(" "),e.root.childNodes&&0!==e.root.childNodes.length?e._e():n("div",{staticClass:"el-tree__empty-block"},[n("span",{staticClass:"el-tree__empty-text"},[e._v(e._s(e.emptyText))])])],2)};F._withStripped=!0;var G=w(q,F,[],!1,function(e){n(6)},null,null);G.options.__file="src/tree.vue";var R=G.exports;t.default=R},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=function(e,t){var n,r=e[1]||"",i=e[3];if(!i)return r;if(t&&"function"==typeof btoa){var o=(n=i,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),a=i.sources.map(function(e){return"/*# sourceURL="+i.sourceRoot+e+" */"});return[r].concat(a).concat([o]).join("\n")}return[r].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},i=0;i<this.length;i++){var o=this[i][0];"number"==typeof o&&(r[o]=!0)}for(i=0;i<e.length;i++){var a=e[i];"number"==typeof a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),t.push(a))}},t}},function(e,t,n){(e.exports=n(4)(!0)).push([e.i,"\n.el-tree .el-tree-node-wrapper {\n display: flex;\n overflow-x: auto;\n}\n.el-tree .el-tree-node-wrapper .el-tree-node-block {\n flex-grow: 1;\n min-width: 190px;\n max-height: 200px;\n overflow-y: auto;\n border-right: 1px solid #f0f2f5;\n transition: all .3s;\n}\n.el-tree .el-tree-node-wrapper .el-tree-node-block:nth-last-child(1) {\n border-right: none;\n}\n.el-tree .el-tree-node-wrapper .el-tree-node__content {\n padding-left: 0 !important;\n margin-left: -12px;\n position: relative;\n}\n.el-tree .el-tree-node-wrapper .el-tree-node__expand-icon {\n visibility: hidden;\n}\n.el-tree .el-tree-node-wrapper .el-tree-node__expand-icon.right-icon {\n position: absolute;\n right: 10px;\n visibility: visible;\n}\n","",{version:3,sources:["/Users/uc/github/enhanced-el-tree/src/tree.vue"],names:[],mappings:";AACA;EACE,cAAc;EACd,iBAAiB;CAClB;AACD;IACI,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IAClB,iBAAiB;IACjB,gCAAgC;IAChC,oBAAoB;CACvB;AACD;MACM,mBAAmB;CACxB;AACD;IACI,2BAA2B;IAC3B,mBAAmB;IACnB,mBAAmB;CACtB;AACD;IACI,mBAAmB;CACtB;AACD;MACM,mBAAmB;MACnB,YAAY;MACZ,oBAAoB;CACzB",file:"tree.vue",sourcesContent:["\n.el-tree .el-tree-node-wrapper {\n display: flex;\n overflow-x: auto;\n}\n.el-tree .el-tree-node-wrapper .el-tree-node-block {\n flex-grow: 1;\n min-width: 190px;\n max-height: 200px;\n overflow-y: auto;\n border-right: 1px solid #f0f2f5;\n transition: all .3s;\n}\n.el-tree .el-tree-node-wrapper .el-tree-node-block:nth-last-child(1) {\n border-right: none;\n}\n.el-tree .el-tree-node-wrapper .el-tree-node__content {\n padding-left: 0 !important;\n margin-left: -12px;\n position: relative;\n}\n.el-tree .el-tree-node-wrapper .el-tree-node__expand-icon {\n visibility: hidden;\n}\n.el-tree .el-tree-node-wrapper .el-tree-node__expand-icon.right-icon {\n position: absolute;\n right: 10px;\n visibility: visible;\n}\n"],sourceRoot:""}])},function(e,t,n){var r=n(5);"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals),(0,n(2).default)("5a772a40",r,!1,{})}])}); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define(["vue"],t):"object"==typeof exports?exports.EnhancedElTree=t(require("vue")):e.EnhancedElTree=t(e.vue)}(window,function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},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=3)}([function(t,n){t.exports=e},function(e,t,n){"use strict";var r=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===o}(e)}(e)},o="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function i(e,t){var n;return t&&!0===t.clone&&r(e)?s((n=e,Array.isArray(n)?[]:{}),e,t):e}function a(e,t,n){var o=e.slice();return t.forEach(function(t,a){void 0===o[a]?o[a]=i(t,n):r(t)?o[a]=s(e[a],t,n):-1===e.indexOf(t)&&o.push(i(t,n))}),o}function s(e,t,n){var o=Array.isArray(t);return o===Array.isArray(e)?o?((n||{arrayMerge:a}).arrayMerge||a)(e,t,n):function(e,t,n){var o={};return r(e)&&Object.keys(e).forEach(function(t){o[t]=i(e[t],n)}),Object.keys(t).forEach(function(a){r(t[a])&&e[a]?o[a]=s(e[a],t[a],n):o[a]=i(t[a],n)}),o}(e,t,n):i(t,n)}s.all=function(e,t){if(!Array.isArray(e)||e.length<2)throw new Error("first argument should be an array with at least two elements");return e.reduce(function(e,n){return s(e,n,t)})};var d=s;e.exports=d},function(e,t,n){"use strict";function r(e,t){for(var n=[],r={},o=0;o<t.length;o++){var i=t[o],a=i[0],s={id:e+":"+o,css:i[1],media:i[2],sourceMap:i[3]};r[a]?r[a].parts.push(s):n.push(r[a]={id:a,parts:[s]})}return n}n.r(t),n.d(t,"default",function(){return p});var o="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!o)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var i={},a=o&&(document.head||document.getElementsByTagName("head")[0]),s=null,d=0,l=!1,c=function(){},h=null,u="data-vue-ssr-id",f="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function p(e,t,n,o){l=n,h=o||{};var a=r(e,t);return v(a),function(t){for(var n=[],o=0;o<a.length;o++){var s=a[o];(d=i[s.id]).refs--,n.push(d)}for(t?v(a=r(e,t)):a=[],o=0;o<n.length;o++){var d;if(0===(d=n[o]).refs){for(var l=0;l<d.parts.length;l++)d.parts[l]();delete i[d.id]}}}}function v(e){for(var t=0;t<e.length;t++){var n=e[t],r=i[n.id];if(r){r.refs++;for(var o=0;o<r.parts.length;o++)r.parts[o](n.parts[o]);for(;o<n.parts.length;o++)r.parts.push(m(n.parts[o]));r.parts.length>n.parts.length&&(r.parts.length=n.parts.length)}else{var a=[];for(o=0;o<n.parts.length;o++)a.push(m(n.parts[o]));i[n.id]={id:n.id,refs:1,parts:a}}}}function y(){var e=document.createElement("style");return e.type="text/css",a.appendChild(e),e}function m(e){var t,n,r=document.querySelector("style["+u+'~="'+e.id+'"]');if(r){if(l)return c;r.parentNode.removeChild(r)}if(f){var o=d++;r=s||(s=y()),t=C.bind(null,r,o,!1),n=C.bind(null,r,o,!0)}else r=y(),t=function(e,t){var n=t.css,r=t.media,o=t.sourceMap;if(r&&e.setAttribute("media",r),h.ssrId&&e.setAttribute(u,t.id),o&&(n+="\n/*# sourceURL="+o.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,r),n=function(){r.parentNode.removeChild(r)};return t(e),function(r){if(r){if(r.css===e.css&&r.media===e.media&&r.sourceMap===e.sourceMap)return;t(e=r)}else n()}}var k,g=(k=[],function(e,t){return k[e]=t,k.filter(Boolean).join("\n")});function C(e,t,n,r){var o=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=g(t,o);else{var i=document.createTextNode(o),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}},function(e,t,n){"use strict";n.r(t);var r=function(e){for(let t=1,n=arguments.length;t<n;t++){let n=arguments[t]||{};for(let t in n)if(n.hasOwnProperty(t)){let r=n[t];void 0!==r&&(e[t]=r)}}return e},o="$treeNodeId",i=function(e,t){return e?t[e]:t[o]},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=function(e){for(var t=!0,n=!0,r=!0,o=0,i=e.length;o<i;o++){var a=e[o];(!0!==a.checked||a.indeterminate)&&(t=!1,a.disabled||(r=!1)),(!1!==a.checked||a.indeterminate)&&(n=!1)}return{all:t,none:n,allWithoutDisable:r,half:!t&&!n}},d=function e(t){if(0!==t.childNodes.length){var n=s(t.childNodes),r=n.all,o=n.none,i=n.half;r?(t.checked=!0,t.indeterminate=!1):i?(t.checked=!1,t.indeterminate=!0):o&&(t.checked=!1,t.indeterminate=!1);var a=t.parent;a&&0!==a.level&&(t.store.checkStrictly||e(a))}},l=function(e,t){var n=e.store.props,r=e.data||{},o=n[t];if("function"==typeof o)return o(r,e);if("string"==typeof o)return r[o];if(void 0===o){var i=r[t];return void 0===i?"":i}},c=0,h=function(){function e(t){for(var n in function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.id=c++,this.text=null,this.checked=!1,this.indeterminate=!1,this.data=null,this.expanded=!1,this.parent=null,this.visible=!0,t)t.hasOwnProperty(n)&&(this[n]=t[n]);this.level=0,this.loaded=!1,this.childNodes=[],this.loading=!1,this.parent&&(this.level=this.parent.level+1);var r=this.store;if(!r)throw new Error("[Node]store is required!");r.registerNode(this);var o=r.props;if(o&&void 0!==o.isLeaf){var i=l(this,"isLeaf");"boolean"==typeof i&&(this.isLeafByUser=i)}if(!0!==r.lazy&&this.data?(this.setData(this.data),r.defaultExpandAll&&(this.expanded=!0)):this.level>0&&r.lazy&&r.defaultExpandAll&&this.expand(),this.data){var a=r.defaultExpandedKeys,s=r.key;s&&a&&-1!==a.indexOf(this.key)&&this.expand(null,r.autoExpandParent),s&&void 0!==r.currentNodeKey&&this.key===r.currentNodeKey&&(r.currentNode=this),r.lazy&&r._initDefaultCheckedNode(this),this.updateLeafState()}}return a(e,[{key:"setData",value:function(e){Array.isArray(e)||function(e,t){t[o]||Object.defineProperty(t,o,{value:e.id,enumerable:!1,configurable:!1,writable:!1})}(this,e),this.data=e,this.childNodes=[];for(var t,n=0,r=(t=0===this.level&&this.data instanceof Array?this.data:l(this,"children")||[]).length;n<r;n++)this.insertChild({data:t[n]})}},{key:"insertChild",value:function(t,n,o){if(!t)throw new Error("insertChild error: child is required.");if(!(t instanceof e)){if(!o){var i=this.getChildren()||[];-1===i.indexOf(t.data)&&(void 0===n||n<0?i.push(t.data):i.splice(n,0,t.data))}r(t,{parent:this,store:this.store}),t=new e(t)}t.level=this.level+1,void 0===n||n<0?this.childNodes.push(t):this.childNodes.splice(n,0,t),this.updateLeafState()}},{key:"insertBefore",value:function(e,t){var n=void 0;t&&(n=this.childNodes.indexOf(t)),this.insertChild(e,n)}},{key:"insertAfter",value:function(e,t){var n=void 0;t&&-1!==(n=this.childNodes.indexOf(t))&&(n+=1),this.insertChild(e,n)}},{key:"removeChild",value:function(e){var t=this.getChildren()||[],n=t.indexOf(e.data);n>-1&&t.splice(n,1);var r=this.childNodes.indexOf(e);r>-1&&(this.store&&this.store.deregisterNode(e),e.parent=null,this.childNodes.splice(r,1)),this.updateLeafState()}},{key:"removeChildByData",value:function(e){var t=null;this.childNodes.forEach(function(n){n.data===e&&(t=n)}),t&&this.removeChild(t)}},{key:"expand",value:function(e,t){var n=this,r=function(){if(t)for(var r=n.parent;r.level>0;)r.expanded=!0,r=r.parent;n.expanded=!0,e&&e()};this.shouldLoadData()?this.loadData(function(e){e instanceof Array&&(n.checked?n.setChecked(!0,!0):d(n),r())}):r()}},{key:"doCreateChildren",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.forEach(function(e){t.insertChild(r({data:e},n),void 0,!0)})}},{key:"collapse",value:function(){this.expanded=!1}},{key:"shouldLoadData",value:function(){return!0===this.store.lazy&&this.store.load&&!this.loaded}},{key:"updateLeafState",value:function(){if(!0!==this.store.lazy||!0===this.loaded||void 0===this.isLeafByUser){var e=this.childNodes;!this.store.lazy||!0===this.store.lazy&&!0===this.loaded?this.isLeaf=!e||0===e.length:this.isLeaf=!1}else this.isLeaf=this.isLeafByUser}},{key:"setChecked",value:function(e,t,n,r){var o=this;if(this.indeterminate="half"===e,this.checked=!0===e,!this.store.checkStrictly){if(!this.shouldLoadData()||this.store.checkDescendants){var i=s(this.childNodes),a=i.all,l=i.allWithoutDisable;this.isLeaf||a||!l||(this.checked=!1,e=!1);var c=function(){if(t){for(var n=o.childNodes,i=0,a=n.length;i<a;i++){var d=n[i];r=r||!1!==e;var l=d.disabled?d.checked:r;d.setChecked(l,t,!0,r)}var c=s(n),h=c.half,u=c.all;u||(o.checked=u,o.indeterminate=h)}};if(this.shouldLoadData())return void this.loadData(function(){c(),d(o)},{checked:!1!==e});c()}var h=this.parent;h&&0!==h.level&&(n||d(h))}}},{key:"getChildren",value:function(){if(0===this.level)return this.data;var e=this.data;if(!e)return null;var t=this.store.props,n="children";return t&&(n=t.children||"children"),void 0===e[n]&&(e[n]=null),e[n]}},{key:"updateChildren",value:function(){var e=this,t=this.getChildren()||[],n=this.childNodes.map(function(e){return e.data}),r={},i=[];t.forEach(function(e,t){e[o]?r[e[o]]={index:t,data:e}:i.push({index:t,data:e})}),n.forEach(function(t){r[t[o]]||e.removeChildByData(t)}),i.forEach(function(t){var n=t.index,r=t.data;e.insertChild({data:r},n)}),this.updateLeafState()}},{key:"loadData",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!0!==this.store.lazy||!this.store.load||this.loaded||this.loading&&!Object.keys(n).length?e&&e.call(this):(this.loading=!0,this.store.load(this,function(r){t.loaded=!0,t.loading=!1,t.childNodes=[],t.doCreateChildren(r,n),t.updateLeafState(),e&&e.call(t,r)}))}},{key:"label",get:function(){return l(this,"label")}},{key:"icon",get:function(){return l(this,"icon")}},{key:"key",get:function(){var e=this.store.key;return this.data?this.data[e]:null}},{key:"disabled",get:function(){return l(this,"disabled")}}]),e}(),u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),p=function(){function e(t){var n=this;for(var r in function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.currentNode=null,this.currentNodeKey=null,t)t.hasOwnProperty(r)&&(this[r]=t[r]);this.nodesMap={},this.levelShow=[],this.root=new h({data:this.data,store:this}),this.lazy&&this.load?(0,this.load)(this.root,function(e){n.root.doCreateChildren(e),n._initDefaultCheckedNodes()}):this._initDefaultCheckedNodes()}return f(e,[{key:"filter",value:function(e){var t=this.filterNodeMethod;!function n(r){var o=r.root?r.root.childNodes:r.childNodes;if(o.forEach(function(r){r.visible=t.call(r,e,r.data,r),n(r)}),!r.visible&&o.length){var i=!0;o.forEach(function(e){e.visible&&(i=!1)}),r.root?r.root.visible=!1===i:r.visible=!1===i}e&&r.visible&&!r.isLeaf&&r.expand()}(this)}},{key:"setData",value:function(e){e!==this.root.data?(this.root.setData(e),this._initDefaultCheckedNodes()):this.root.updateChildren()}},{key:"getNode",value:function(e){if(e instanceof h)return e;var t="object"!==(void 0===e?"undefined":u(e))?e:i(this.key,e);return this.nodesMap[t]||null}},{key:"insertBefore",value:function(e,t){var n=this.getNode(t);n.parent.insertBefore({data:e},n)}},{key:"insertAfter",value:function(e,t){var n=this.getNode(t);n.parent.insertAfter({data:e},n)}},{key:"remove",value:function(e){var t=this.getNode(e);t&&t.parent.removeChild(t)}},{key:"append",value:function(e,t){var n=t?this.getNode(t):this.root;n&&n.insertChild({data:e})}},{key:"_initDefaultCheckedNodes",value:function(){var e=this,t=this.defaultCheckedKeys||[],n=this.nodesMap;t.forEach(function(t){var r=n[t];r&&r.setChecked(!0,!e.checkStrictly)})}},{key:"_initDefaultCheckedNode",value:function(e){-1!==(this.defaultCheckedKeys||[]).indexOf(e.key)&&e.setChecked(!0,!this.checkStrictly)}},{key:"setDefaultCheckedKey",value:function(e){e!==this.defaultCheckedKeys&&(this.defaultCheckedKeys=e,this._initDefaultCheckedNodes())}},{key:"registerNode",value:function(e){this.key&&e&&e.data&&void 0!==e.key&&(this.nodesMap[e.key]=e)}},{key:"deregisterNode",value:function(e){if(this.key&&e&&e.data){for(var t=e.childNodes,n=0,r=t.length;n<r;n++){var o=t[n];this.deregisterNode(o)}delete this.nodesMap[e.key]}}},{key:"getCheckedNodes",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=[];return function n(r){(r.root?r.root.childNodes:r.childNodes).forEach(function(r){r.checked&&(!e||e&&r.isLeaf)&&t.push(r.data),n(r)})}(this),t}},{key:"getCheckedKeys",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.getCheckedNodes(t).map(function(t){return(t||{})[e.key]})}},{key:"getHalfCheckedNodes",value:function(){var e=[];return function t(n){(n.root?n.root.childNodes:n.childNodes).forEach(function(n){n.indeterminate&&e.push(n.data),t(n)})}(this),e}},{key:"getHalfCheckedKeys",value:function(){var e=this;return this.getHalfCheckedNodes().map(function(t){return(t||{})[e.key]})}},{key:"_getAllNodes",value:function(){var e=[],t=this.nodesMap;for(var n in t)t.hasOwnProperty(n)&&e.push(t[n]);return e}},{key:"updateChildren",value:function(e,t){var n=this.nodesMap[e];if(n){for(var r=n.childNodes,o=r.length-1;o>=0;o--){var i=r[o];this.remove(i.data)}for(var a=0,s=t.length;a<s;a++){var d=t[a];this.append(d,n.data)}}}},{key:"_setCheckedKeys",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments[2],r=this._getAllNodes().sort(function(e,t){return t.level-e.level}),o=Object.create(null),i=Object.keys(n);r.forEach(function(e){return e.setChecked(!1,!1)});for(var a=0,s=r.length;a<s;a++){var d=r[a],l=d.data[e].toString();if(i.indexOf(l)>-1){for(var c=d.parent;c&&c.level>0;)o[c.data[e]]=!0,c=c.parent;d.isLeaf||this.checkStrictly?d.setChecked(!0,!1):(d.setChecked(!0,!0),t&&(d.setChecked(!1,!1),function e(t){t.childNodes.forEach(function(t){t.isLeaf||t.setChecked(!1,!1),e(t)})}(d)))}else d.checked&&!o[l]&&d.setChecked(!1,!1)}}},{key:"setCheckedNodes",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.key,r={};e.forEach(function(e){r[(e||{})[n]]=!0}),this._setCheckedKeys(n,t,r)}},{key:"setCheckedKeys",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.defaultCheckedKeys=e;var n=this.key,r={};e.forEach(function(e){r[e]=!0}),this._setCheckedKeys(n,t,r)}},{key:"setDefaultExpandedKeys",value:function(e){var t=this;e=e||[],this.defaultExpandedKeys=e,e.forEach(function(e){var n=t.getNode(e);n&&n.expand(null,t.autoExpandParent)})}},{key:"setChecked",value:function(e,t,n){var r=this.getNode(e);r&&r.setChecked(!!t,n)}},{key:"getCurrentNode",value:function(){return this.currentNode}},{key:"setCurrentNode",value:function(e){this.currentNode=e}},{key:"setUserCurrentNode",value:function(e){var t=e[this.key],n=this.nodesMap[t];this.setCurrentNode(n)}},{key:"setCurrentNodeKey",value:function(e){var t=this.getNode(e);t&&(this.currentNode=t)}}]),e}(),v=n(0),y=n.n(v);const m=y.a.prototype.$isServer,k=(m||Number(document.documentMode),function(e){return(e||"").replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g,"")});function g(e,t){if(!e||!t)return!1;if(-1!==t.indexOf(" "))throw new Error("className should not contain space.");return e.classList?e.classList.contains(t):(" "+e.className+" ").indexOf(" "+t+" ")>-1}function C(e,t){if(e){for(var n=e.className,r=(t||"").split(" "),o=0,i=r.length;o<i;o++){var a=r[o];a&&(e.classList?e.classList.add(a):g(e,a)||(n+=" "+a))}e.classList||(e.className=n)}}function b(e,t){if(e&&t){for(var n=t.split(" "),r=" "+e.className+" ",o=0,i=n.length;o<i;o++){var a=n[o];a&&(e.classList?e.classList.remove(a):g(e,a)&&(r=r.replace(" "+a+" "," ")))}e.classList||(e.className=k(r))}}!m&&document.addEventListener,!m&&document.removeEventListener;var x={name:"ElCollapseTransition",functional:!0,render:(e,{children:t})=>e("transition",{on:new class{beforeEnter(e){C(e,"collapse-transition"),e.dataset||(e.dataset={}),e.dataset.oldPaddingTop=e.style.paddingTop,e.dataset.oldPaddingBottom=e.style.paddingBottom,e.style.height="0",e.style.paddingTop=0,e.style.paddingBottom=0}enter(e){e.dataset.oldOverflow=e.style.overflow,0!==e.scrollHeight?(e.style.height=e.scrollHeight+"px",e.style.paddingTop=e.dataset.oldPaddingTop,e.style.paddingBottom=e.dataset.oldPaddingBottom):(e.style.height="",e.style.paddingTop=e.dataset.oldPaddingTop,e.style.paddingBottom=e.dataset.oldPaddingBottom),e.style.overflow="hidden"}afterEnter(e){b(e,"collapse-transition"),e.style.height="",e.style.overflow=e.dataset.oldOverflow}beforeLeave(e){e.dataset||(e.dataset={}),e.dataset.oldPaddingTop=e.style.paddingTop,e.dataset.oldPaddingBottom=e.style.paddingBottom,e.dataset.oldOverflow=e.style.overflow,e.style.height=e.scrollHeight+"px",e.style.overflow="hidden"}leave(e){0!==e.scrollHeight&&(C(e,"collapse-transition"),e.style.height=0,e.style.paddingTop=0,e.style.paddingBottom=0)}afterLeave(e){b(e,"collapse-transition"),e.style.height="",e.style.overflow=e.dataset.oldOverflow,e.style.paddingTop=e.dataset.oldPaddingTop,e.style.paddingBottom=e.dataset.oldPaddingBottom}}},t)},N={methods:{dispatch(e,t,n){for(var r=this.$parent||this.$root,o=r.$options.componentName;r&&(!o||o!==e);)(r=r.$parent)&&(o=r.$options.componentName);r&&r.$emit.apply(r,[t].concat(n))},broadcast(e,t,n){(function e(t,n,r){this.$children.forEach(o=>{o.$options.componentName===t?o.$emit.apply(o,[n].concat(r)):e.apply(o,[t,n].concat([r]))})}).call(this,e,t,n)}}},_={name:"ElCheckbox",mixins:[N],inject:{elForm:{default:""},elFormItem:{default:""}},componentName:"ElCheckbox",data:function(){return{selfModel:!1,focus:!1,isLimitExceeded:!1}},computed:{model:{get:function(){return this.isGroup?this.store:void 0!==this.value?this.value:this.selfModel},set:function(e){this.isGroup?(this.isLimitExceeded=!1,void 0!==this._checkboxGroup.min&&e.length<this._checkboxGroup.min&&(this.isLimitExceeded=!0),void 0!==this._checkboxGroup.max&&e.length>this._checkboxGroup.max&&(this.isLimitExceeded=!0),!1===this.isLimitExceeded&&this.dispatch("ElCheckboxGroup","input",[e])):(this.$emit("input",e),this.selfModel=e)}},isChecked:function(){return"[object Boolean]"==={}.toString.call(this.model)?this.model:Array.isArray(this.model)?this.model.indexOf(this.label)>-1:null!==this.model&&void 0!==this.model?this.model===this.trueLabel:void 0},isGroup:function(){for(var e=this.$parent;e;){if("ElCheckboxGroup"===e.$options.componentName)return this._checkboxGroup=e,!0;e=e.$parent}return!1},store:function(){return this._checkboxGroup?this._checkboxGroup.value:this.value},isDisabled:function(){return this.isGroup?this._checkboxGroup.disabled||this.disabled||(this.elForm||{}).disabled:this.disabled||(this.elForm||{}).disabled},_elFormItemSize:function(){return(this.elFormItem||{}).elFormItemSize},checkboxSize:function(){var e=this.size||this._elFormItemSize||(this.$ELEMENT||{}).size;return this.isGroup&&this._checkboxGroup.checkboxGroupSize||e}},props:{value:{},label:{},indeterminate:Boolean,disabled:Boolean,checked:Boolean,name:String,trueLabel:[String,Number],falseLabel:[String,Number],id:String,controls:String,border:Boolean,size:String},methods:{addToStore:function(){Array.isArray(this.model)&&-1===this.model.indexOf(this.label)?this.model.push(this.label):this.model=this.trueLabel||!0},handleChange:function(e){var t=this;if(!this.isLimitExceeded){var n;n=e.target.checked?void 0===this.trueLabel||this.trueLabel:void 0!==this.falseLabel&&this.falseLabel,this.$emit("change",n,e),this.$nextTick(function(){t.isGroup&&t.dispatch("ElCheckboxGroup","change",[t._checkboxGroup.value])})}}},created:function(){this.checked&&this.addToStore()},mounted:function(){this.indeterminate&&this.$el.setAttribute("aria-controls",this.controls)}},A=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("label",{staticClass:"el-checkbox",class:[e.border&&e.checkboxSize?"el-checkbox--"+e.checkboxSize:"",{"is-disabled":e.isDisabled},{"is-bordered":e.border},{"is-checked":e.isChecked}],attrs:{role:"checkbox","aria-checked":e.indeterminate?"mixed":e.isChecked,"aria-disabled":e.isDisabled,id:e.id}},[n("span",{staticClass:"el-checkbox__input",class:{"is-disabled":e.isDisabled,"is-checked":e.isChecked,"is-indeterminate":e.indeterminate,"is-focus":e.focus},attrs:{"aria-checked":"mixed"}},[n("span",{staticClass:"el-checkbox__inner"}),e._v(" "),e.trueLabel||e.falseLabel?n("input",{directives:[{name:"model",rawName:"v-model",value:e.model,expression:"model"}],staticClass:"el-checkbox__original",attrs:{type:"checkbox",name:e.name,disabled:e.isDisabled,"true-value":e.trueLabel,"false-value":e.falseLabel},domProps:{checked:Array.isArray(e.model)?e._i(e.model,null)>-1:e._q(e.model,e.trueLabel)},on:{change:[function(t){var n=e.model,r=t.target,o=r.checked?e.trueLabel:e.falseLabel;if(Array.isArray(n)){var i=e._i(n,null);r.checked?i<0&&(e.model=n.concat([null])):i>-1&&(e.model=n.slice(0,i).concat(n.slice(i+1)))}else e.model=o},e.handleChange],focus:function(t){e.focus=!0},blur:function(t){e.focus=!1}}}):n("input",{directives:[{name:"model",rawName:"v-model",value:e.model,expression:"model"}],staticClass:"el-checkbox__original",attrs:{type:"checkbox",disabled:e.isDisabled,name:e.name},domProps:{value:e.label,checked:Array.isArray(e.model)?e._i(e.model,e.label)>-1:e.model},on:{change:[function(t){var n=e.model,r=t.target,o=!!r.checked;if(Array.isArray(n)){var i=e.label,a=e._i(n,i);r.checked?a<0&&(e.model=n.concat([i])):a>-1&&(e.model=n.slice(0,a).concat(n.slice(a+1)))}else e.model=o},e.handleChange],focus:function(t){e.focus=!0},blur:function(t){e.focus=!1}}})]),e._v(" "),e.$slots.default||e.label?n("span",{staticClass:"el-checkbox__label"},[e._t("default"),e._v(" "),e.$slots.default?e._e():[e._v(e._s(e.label))]],2):e._e()])};function w(e,t,n,r,o,i,a,s){var d=typeof(e=e||{}).default;"object"!==d&&"function"!==d||(e=e.default);var l,c="function"==typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=n,c._compiled=!0),r&&(c.functional=!0),i&&(c._scopeId=i),a?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),o&&o.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},c._ssrRegister=l):o&&(l=s?function(){o.call(this,this.$root.$options.shadowRoot)}:o),l)if(c.functional){c._injectStyles=l;var h=c.render;c.render=function(e,t){return l.call(t),h(e,t)}}else{var u=c.beforeCreate;c.beforeCreate=u?[].concat(u,l):[l]}return{exports:e,options:c}}A._withStripped=!0;var E=w(_,A,[],!1,null,null,null);E.options.__file="node_modules/_element-ui@2.3.0@element-ui/packages/checkbox/src/checkbox.vue";var K=E.exports;K.install=function(e){e.component(K.name,K)};var B={name:"ElTreeNode",componentName:"ElTreeNode",components:{ElCollapseTransition:x,ElCheckbox:K,NodeContent:{props:{node:{required:!0}},render:function(e){var t=this.$parent,n=t.tree,r=this.node,o=r.data,i=r.store;return t.renderContent?t.renderContent.call(t._renderProxy,e,{_self:n.$vnode.context,node:r,data:o,store:i}):n.$scopedSlots.default?n.$scopedSlots.default({node:r,data:o}):e("span",{class:"el-tree-node__label"},[this.node.label])}}},mixins:[N],props:{node:{type:Object,default:function(){return{}}},props:{type:Object,default:function(){return{}}},renderContent:Function,renderAfterExpand:{type:Boolean,default:!0}},data:function(){return{tree:null,expanded:!1,childNodeRendered:!1,showCheckbox:!1,oldChecked:null,oldIndeterminate:null}},watch:{"node.indeterminate":function(e){this.handleSelectChange(this.node.checked,e)},"node.checked":function(e){this.handleSelectChange(e,this.node.indeterminate)},"node.expanded":function(e){var t=this;this.$nextTick(function(){return t.expanded=e}),e&&(this.childNodeRendered=!0)}},created:function(){var e=this,t=this.$parent;t.isTree?this.tree=t:this.tree=t.tree;var n=this.tree;n||console.warn("Can not find node's tree.");var r=(n.props||{}).children||"children";this.$watch("node.data."+r,function(){e.node.updateChildren()}),this.showCheckbox=n.showCheckbox,this.node.expanded&&(this.expanded=!0,this.childNodeRendered=!0),this.tree.accordion&&this.$on("tree-node-expand",function(t){e.node!==t&&e.node.collapse()})},methods:{getNodeKey:function(e){return i(this.tree.nodeKey,e.data)},handleSelectChange:function(e,t){this.oldChecked!==e&&this.oldIndeterminate!==t&&this.tree.$emit("check-change",this.node.data,e,t),this.oldChecked=e,this.indeterminate=t},handleClick:function(){var e=this.tree.store;e.setCurrentNode(this.node),this.tree.$emit("current-change",e.currentNode?e.currentNode.data:null,e.currentNode),this.tree.currentNode=this,this.tree.expandOnClickNode&&this.handleExpandIconClick(),this.tree.$emit("node-click",this.node.data,this.node,this)},handleContextMenu:function(e){this.tree.$emit("node-contextmenu",e,this.node.data,this.node,this)},handleExpandIconClick:function(){var e=this.tree.store;this.node.isLeaf||(this.expanded?(e.levelShow.splice(this.node.level-1,e.levelShow.length),this.tree.$emit("node-collapse",this.node.data,this.node,this),this.node.collapse()):(e.levelShow.splice(this.node.level-1,e.levelShow.length,this.node),this.node.expand(),this.$emit("node-expand",this.node.data,this.node,this)))},handleCheckChange:function(e,t){var n=this;this.node.setChecked(t.target.checked,!this.tree.checkStrictly),this.$nextTick(function(){var e=n.tree.store;n.tree.$emit("check",n.node.data,{checkedNodes:e.getCheckedNodes(),checkedKeys:e.getCheckedKeys(),halfCheckedNodes:e.getHalfCheckedNodes(),halfCheckedKeys:e.getHalfCheckedKeys()})})},handleChildNodeExpand:function(e,t,n){this.broadcast("ElTreeNode","tree-node-expand",t),this.tree.$emit("node-expand",e,t,n)}}},S=function(){var e=this,t=this,n=t.$createElement,r=t._self._c||n;return r("div",{directives:[{name:"show",rawName:"v-show",value:t.node.visible,expression:"node.visible"}],staticClass:"el-tree-node",class:{"is-expanded":t.expanded,"is-current":t.tree.store.currentNode===t.node,"is-hidden":!t.node.visible,"is-focusable":!t.node.disabled,"is-checked":!t.node.disabled&&t.node.checked},attrs:{role:"treeitem",tabindex:"-1","aria-expanded":t.expanded,"aria-disabled":t.node.disabled,"aria-checked":t.node.checked},on:{click:function(e){return e.stopPropagation(),t.handleClick(e)},contextmenu:function(t){return e.handleContextMenu(t)}}},[r("div",{staticClass:"el-tree-node__content",style:{"padding-left":(t.node.level-1)*t.tree.indent+"px"}},[r("span",{staticClass:"el-tree-node__expand-icon el-icon-caret-right",class:{"is-leaf":t.node.isLeaf,expanded:!t.node.isLeaf&&t.expanded},on:{click:function(e){return e.stopPropagation(),t.handleExpandIconClick(e)}}}),t._v(" "),t.showCheckbox?[t.tree.$props.openWhenCheck?r("el-checkbox",{attrs:{indeterminate:t.node.indeterminate,disabled:!!t.node.disabled},on:{change:t.handleCheckChange},model:{value:t.node.checked,callback:function(e){t.$set(t.node,"checked",e)},expression:"node.checked"}}):r("el-checkbox",{attrs:{indeterminate:t.node.indeterminate,disabled:!!t.node.disabled},on:{change:t.handleCheckChange},nativeOn:{click:function(e){e.stopPropagation()}},model:{value:t.node.checked,callback:function(e){t.$set(t.node,"checked",e)},expression:"node.checked"}})]:t._e(),t._v(" "),t.node.loading?r("span",{staticClass:"el-tree-node__loading-icon el-icon-loading"}):t._e(),t._v(" "),r("node-content",{attrs:{node:t.node}}),t._v(" "),t.tree.$props.horizontal?r("span",{staticClass:"el-tree-node__expand-icon el-icon-caret-right right-icon",class:{"is-leaf":t.node.isLeaf}}):t._e()],2),t._v(" "),r("el-collapse-transition",[!t.renderAfterExpand||t.childNodeRendered?r("div",{directives:[{name:"show",rawName:"v-show",value:!t.tree.$props.horizontal&&t.expanded,expression:"!tree.$props.horizontal && expanded"}],staticClass:"el-tree-node__children",attrs:{role:"group","aria-expanded":t.expanded}},t._l(t.node.childNodes,function(e){return r("el-tree-node",{key:t.getNodeKey(e),attrs:{"render-content":t.renderContent,"render-after-expand":t.renderAfterExpand,node:e},on:{"node-expand":t.handleChildNodeExpand}})})):t._e()])],1)};S._withStripped=!0;var L=w(B,S,[],!1,null,null,null);L.options.__file="src/tree-node.vue";var $=L.exports,T=n(1),O=n.n(T);const D=Object.prototype.hasOwnProperty,M=/(%|)\{([0-9a-zA-Z_]+)\}/g,P=(y.a,function(e,...t){return 1===t.length&&"object"==typeof t[0]&&(t=t[0]),t&&t.hasOwnProperty||(t={}),e.replace(M,(o,i,a,s)=>{let d;return"{"===e[s-1]&&"}"===e[s+o.length]?a:(n=t,r=a,null===(d=D.call(n,r)?t[a]:null)||void 0===d?"":d)});var n,r});let I={el:{colorpicker:{confirm:"确定",clear:"清空"},datepicker:{now:"此刻",today:"今天",cancel:"取消",clear:"清空",confirm:"确定",selectDate:"选择日期",selectTime:"选择时间",startDate:"开始日期",startTime:"开始时间",endDate:"结束日期",endTime:"结束时间",prevYear:"前一年",nextYear:"后一年",prevMonth:"上个月",nextMonth:"下个月",year:"年",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},months:{jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月"}},select:{loading:"加载中",noMatch:"无匹配数据",noData:"无数据",placeholder:"请选择"},cascader:{noMatch:"无匹配数据",loading:"加载中",placeholder:"请选择"},pagination:{goto:"前往",pagesize:"条/页",total:"共 {total} 条",pageClassifier:"页"},messagebox:{title:"提示",confirm:"确定",cancel:"取消",error:"输入的数据不合法!"},upload:{deleteTip:"按 delete 键可删除",delete:"删除",preview:"查看图片",continue:"继续上传"},table:{emptyText:"暂无数据",confirmFilter:"筛选",resetFilter:"重置",clearFilter:"全部",sumText:"合计"},tree:{emptyText:"暂无数据"},transfer:{noMatch:"无匹配数据",noData:"无数据",titles:["列表 1","列表 2"],filterPlaceholder:"请输入搜索内容",noCheckedFormat:"共 {total} 项",hasCheckedFormat:"已选 {checked}/{total} 项"}}},j=!1;const z=function(e,t){let n=function(){const e=Object.getPrototypeOf(this||y.a).$t;if("function"==typeof e&&y.a.locale)return j||(j=!0,y.a.locale(y.a.config.lang,O()(I,y.a.locale(y.a.config.lang)||{},{clone:!0}))),e.apply(this,arguments)}.apply(this,arguments);if(null!==n&&void 0!==n)return n;const r=e.split(".");let o=I;for(let e=0,i=r.length;e<i;e++){if(n=o[r[e]],e===i-1)return P(n,t);if(!n)return"";o=n}return""};var q={name:"ElTree",components:{ElTreeNode:$},mixins:[N],props:{data:{type:Array},emptyText:{type:String,default:function(){return z("el.tree.emptyText")}},renderAfterExpand:{type:Boolean,default:!0},nodeKey:String,checkStrictly:Boolean,defaultExpandAll:Boolean,expandOnClickNode:{type:Boolean,default:!0},checkDescendants:{type:Boolean,default:!1},autoExpandParent:{type:Boolean,default:!0},defaultCheckedKeys:Array,defaultExpandedKeys:Array,renderContent:Function,showCheckbox:{type:Boolean,default:!1},props:{type:Object,default:function(){return{children:"children",label:"label",icon:"icon",disabled:"disabled"}}},lazy:{type:Boolean,default:!1},highlightCurrent:Boolean,load:Function,filterNodeMethod:Function,accordion:Boolean,indent:{type:Number,default:18},horizontal:Boolean,treeNodeWrapperClass:{type:String,default:""},openWhenCheck:{type:Boolean,default:!1}},data:function(){return{store:null,root:null,currentNode:null,treeItems:null,checkboxItems:[]}},computed:{children:{set:function(e){this.data=e},get:function(){return this.data}},treeItemArray:function(){return Array.prototype.slice.call(this.treeItems)},__nodes:function(){var e=[],t=this.store.nodesMap;for(var n in t)t.hasOwnProperty(n)&&e.push(t[n]);return e}},watch:{defaultCheckedKeys:function(e){this.store.defaultCheckedKeys=e,this.store.setDefaultCheckedKey(e)},defaultExpandedKeys:function(e){this.store.defaultExpandedKeys=e,this.store.setDefaultExpandedKeys(e)},data:function(e){this.store.setData(e)},checkboxItems:function(e){Array.prototype.forEach.call(e,function(e){e.setAttribute("tabindex",-1)})}},created:function(){this.isTree=!0,this.store=new p({key:this.nodeKey,data:this.data,lazy:this.lazy,props:this.props,load:this.load,horizontal:this.horizontal,currentNodeKey:this.currentNodeKey,checkStrictly:this.checkStrictly,checkDescendants:this.checkDescendants,defaultCheckedKeys:this.defaultCheckedKeys,defaultExpandedKeys:this.defaultExpandedKeys,autoExpandParent:this.autoExpandParent,defaultExpandAll:this.defaultExpandAll,filterNodeMethod:this.filterNodeMethod}),this.root=this.store.root},mounted:function(){this.initTabindex(),this.$el.addEventListener("keydown",this.handelKeydown)},updated:function(){this.treeItems=this.$el.querySelectorAll("[role=treeitem]"),this.checkboxItems=this.$el.querySelectorAll("input[type=checkbox]")},methods:{filter:function(e){if(!this.filterNodeMethod)throw new Error("[Tree] filterNodeMethod is required when filter");this.store.filter(e)},getNodeKey:function(e){return i(this.nodeKey,e.data)},getNodePath:function(e){if(!this.nodeKey)throw new Error("[Tree] nodeKey is required in getNodePath");var t=this.store.getNode(e);if(!t)return[];for(var n=[t.data],r=t.parent;r&&r!==this.root;)n.push(r.data),r=r.parent;return n.reverse()},getCheckedNodes:function(e){return this.store.getCheckedNodes(e)},getCheckedKeys:function(e){return this.store.getCheckedKeys(e)},getCurrentNode:function(){var e=this.store.getCurrentNode();return e?e.data:null},getCurrentKey:function(){if(!this.nodeKey)throw new Error("[Tree] nodeKey is required in getCurrentKey");var e=this.getCurrentNode();return e?e[this.nodeKey]:null},setCheckedNodes:function(e,t){if(!this.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedNodes");this.store.setCheckedNodes(e,t)},setCheckedKeys:function(e,t){if(!this.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedKeys");this.store.setCheckedKeys(e,t)},setChecked:function(e,t,n){this.store.setChecked(e,t,n)},getHalfCheckedNodes:function(){return this.store.getHalfCheckedNodes()},getHalfCheckedKeys:function(){return this.store.getHalfCheckedKeys()},setCurrentNode:function(e){if(!this.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentNode");this.store.setUserCurrentNode(e)},setCurrentKey:function(e){if(!this.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentKey");this.store.setCurrentNodeKey(e)},getNode:function(e){return this.store.getNode(e)},remove:function(e){this.store.remove(e)},append:function(e,t){this.store.append(e,t)},insertBefore:function(e,t){this.store.insertBefore(e,t)},insertAfter:function(e,t){this.store.insertAfter(e,t)},handleNodeExpand:function(e,t,n){this.broadcast("ElTreeNode","tree-node-expand",t),this.$emit("node-expand",e,t,n)},updateKeyChildren:function(e,t){if(!this.nodeKey)throw new Error("[Tree] nodeKey is required in updateKeyChild");this.store.updateChildren(e,t)},initTabindex:function(){this.treeItems=this.$el.querySelectorAll(".is-focusable[role=treeitem]"),this.checkboxItems=this.$el.querySelectorAll("input[type=checkbox]");var e=this.$el.querySelectorAll(".is-checked[role=treeitem]");e.length?e[0].setAttribute("tabindex",0):this.treeItems[0]&&this.treeItems[0].setAttribute("tabindex",0)},handelKeydown:function(e){var t=e.target;if(-1!==t.className.indexOf("el-tree-node")){e.preventDefault();var n=e.keyCode;this.treeItems=this.$el.querySelectorAll(".is-focusable[role=treeitem]");var r=this.treeItemArray.indexOf(t),o=void 0;[38,40].indexOf(n)>-1&&(o=38===n?0!==r?r-1:0:r<this.treeItemArray.length-1?r+1:0,this.treeItemArray[o].focus());var i=t.querySelector('[type="checkbox"]');[37,39].indexOf(n)>-1&&t.click(),[13,32].indexOf(n)>-1&&i&&i.click()}},getAllCheckedKeys:function(){var e=[],t=this.store.nodesMap;for(var n in t)t.hasOwnProperty(n)&&(t[n].indeterminate||t[n].checked)&&e.push(t[n].data[this.store.key]);return e},getAllCheckedNodes:function(){var e=[],t=this.store.nodesMap;for(var n in t)t.hasOwnProperty(n)&&(t[n].indeterminate||t[n].checked)&&e.push(t[n].data);return e},setCheckedNodesPrecisely:function(e){var t=this;if(!this.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedNodesPrecisely");var n=this.__nodes.filter(function(e){return e.isLeaf}).map(function(e){return e.data[t.nodeKey]}),r=e.filter(function(e){return n.includes(e[t.nodeKey])});this.setCheckedNodes(r)},setCheckedKeysPrecisely:function(e){var t=this;if(!this.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedNodesPrecisely");var n=this.__nodes.filter(function(e){return e.isLeaf}).map(function(e){return e.data[t.nodeKey]}),r=e.filter(function(e){return n.includes(e)});this.setCheckedKeys(r)},getCheckedKeysWithoutChild:function(){var e=this;return this.__nodes.filter(function(e){return e.checked&&!e.parent.checked}).map(function(t){return t.data[e.nodeKey]})},getCheckedNodesWithoutChild:function(){return this.__nodes.filter(function(e){return e.checked&&!e.parent.checked}).map(function(e){return e.data})}}},F=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"el-tree",class:{"el-tree--highlight-current":e.highlightCurrent},attrs:{role:"tree"}},[e.horizontal?n("div",{class:[e.treeNodeWrapperClass,"el-tree-node-wrapper"]},[n("div",{staticClass:"el-tree-node-block"},e._l(e.root.childNodes,function(t){return n("el-tree-node",{key:e.getNodeKey(t),attrs:{node:t,props:e.props,"render-after-expand":e.renderAfterExpand,"render-content":e.renderContent},on:{"node-expand":e.handleNodeExpand}})})),e._v(" "),e._l(e.store.levelShow,function(t){return n("div",{key:t.id,staticClass:"el-tree-node-block"},e._l(t.childNodes,function(t){return n("el-tree-node",{key:e.getNodeKey(t),attrs:{node:t,props:e.props,"render-after-expand":e.renderAfterExpand,"render-content":e.renderContent},on:{"node-expand":e.handleNodeExpand}})}))})],2):e._e(),e._v(" "),e.horizontal?e._e():e._l(e.root.childNodes,function(t){return n("el-tree-node",{key:e.getNodeKey(t),attrs:{node:t,props:e.props,"render-after-expand":e.renderAfterExpand,"render-content":e.renderContent},on:{"node-expand":e.handleNodeExpand}})}),e._v(" "),e.root.childNodes&&0!==e.root.childNodes.length?e._e():n("div",{staticClass:"el-tree__empty-block"},[n("span",{staticClass:"el-tree__empty-text"},[e._v(e._s(e.emptyText))])])],2)};F._withStripped=!0;var G=w(q,F,[],!1,function(e){n(6)},null,null);G.options.__file="src/tree.vue";var R=G.exports;t.default=R},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=function(e,t){var n,r=e[1]||"",o=e[3];if(!o)return r;if(t&&"function"==typeof btoa){var i=(n=o,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),a=o.sources.map(function(e){return"/*# sourceURL="+o.sourceRoot+e+" */"});return[r].concat(a).concat([i]).join("\n")}return[r].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n}).join("")},t.i=function(e,n){"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]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),t.push(a))}},t}},function(e,t,n){(e.exports=n(4)(!0)).push([e.i,"\n.el-tree .el-tree-node-wrapper {\n display: flex;\n overflow-x: auto;\n}\n.el-tree .el-tree-node-wrapper .el-tree-node-block {\n flex-grow: 1;\n min-width: 190px;\n max-height: 200px;\n overflow-y: auto;\n border-right: 1px solid #f0f2f5;\n transition: all .3s;\n}\n.el-tree .el-tree-node-wrapper .el-tree-node-block:nth-last-child(1) {\n border-right: none;\n}\n.el-tree .el-tree-node-wrapper .el-tree-node__content {\n padding-left: 0 !important;\n margin-left: -12px;\n position: relative;\n}\n.el-tree .el-tree-node-wrapper .el-tree-node__expand-icon {\n visibility: hidden;\n}\n.el-tree .el-tree-node-wrapper .el-tree-node__expand-icon.right-icon {\n position: absolute;\n right: 10px;\n visibility: visible;\n}\n","",{version:3,sources:["/Users/uc/github/enhanced-el-tree/src/tree.vue"],names:[],mappings:";AACA;EACE,cAAc;EACd,iBAAiB;CAClB;AACD;IACI,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IAClB,iBAAiB;IACjB,gCAAgC;IAChC,oBAAoB;CACvB;AACD;MACM,mBAAmB;CACxB;AACD;IACI,2BAA2B;IAC3B,mBAAmB;IACnB,mBAAmB;CACtB;AACD;IACI,mBAAmB;CACtB;AACD;MACM,mBAAmB;MACnB,YAAY;MACZ,oBAAoB;CACzB",file:"tree.vue",sourcesContent:["\n.el-tree .el-tree-node-wrapper {\n display: flex;\n overflow-x: auto;\n}\n.el-tree .el-tree-node-wrapper .el-tree-node-block {\n flex-grow: 1;\n min-width: 190px;\n max-height: 200px;\n overflow-y: auto;\n border-right: 1px solid #f0f2f5;\n transition: all .3s;\n}\n.el-tree .el-tree-node-wrapper .el-tree-node-block:nth-last-child(1) {\n border-right: none;\n}\n.el-tree .el-tree-node-wrapper .el-tree-node__content {\n padding-left: 0 !important;\n margin-left: -12px;\n position: relative;\n}\n.el-tree .el-tree-node-wrapper .el-tree-node__expand-icon {\n visibility: hidden;\n}\n.el-tree .el-tree-node-wrapper .el-tree-node__expand-icon.right-icon {\n position: absolute;\n right: 10px;\n visibility: visible;\n}\n"],sourceRoot:""}])},function(e,t,n){var r=n(5);"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals),(0,n(2).default)("5a772a40",r,!1,{})}])}); |
v1.2.0 / 2018-04-09 | ||
================== | ||
* feat: add attribute 'open-when-check' | ||
* docs: add badge | ||
v1.1.2 / 2018-03-28 | ||
@@ -3,0 +9,0 @@ ================== |
{ | ||
"name": "@xlaoyu/enhanced-el-tree", | ||
"version": "1.1.2", | ||
"version": "1.2.0", | ||
"private": false, | ||
@@ -40,3 +40,3 @@ "description": "enhanced element-ui's tree component", | ||
"css-loader": "^0.28.10", | ||
"element-ui": "^2.2.1", | ||
"element-ui": "2.2.1", | ||
"eslint": "^4.18.2", | ||
@@ -58,6 +58,6 @@ "eslint-friendly-formatter": "^3.0.0", | ||
"uglifyjs-webpack-plugin": "^1.2.3", | ||
"vue": "^2.5.15", | ||
"vue": "2.5.15", | ||
"vue-loader": "^14.2.1", | ||
"vue-style-loader": "^4.0.2", | ||
"vue-template-compiler": "^2.5.15", | ||
"vue-template-compiler": "2.5.15", | ||
"webpack": "^4.1.1", | ||
@@ -64,0 +64,0 @@ "webpack-bundle-analyzer": "^2.11.1", |
# enhanced-el-tree | ||
[![Vue 2.x](https://img.shields.io/badge/Vue-2.x-brightgreen.svg)](https://vuejs.org/v2/guide/) | ||
[![npm](https://img.shields.io/npm/v/@xlaoyu/enhanced-el-tree.svg)](https://www.npmjs.com/package/@xlaoyu/enhanced-el-tree) | ||
[![npm-downloades](https://img.shields.io/npm/dm/@xlaoyu/enhanced-el-tree.svg)](https://www.npmjs.com/package/@xlaoyu/enhanced-el-tree) | ||
[![license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/Yuliang-Lee/enhanced-el-tree/blob/master/LICENSE) | ||
Base on element-ui's [tree component](http://element.eleme.io/#/en-US/component/tree), add some useful function and `horizontal-mode` | ||
@@ -7,3 +12,3 @@ | ||
### horizontal mode | ||
### Horizontal Mode | ||
@@ -15,4 +20,12 @@ Or can be said that is multiple-cascader component.Try it [Demo](https://codesandbox.io/s/5z70p4wv84) | ||
### several useful methods | ||
### Extra Attributes | ||
| Attribute | Description | Type | Accepted Values | Default | | ||
|:-----|:-----|:-----|:-----|:-----| | ||
| horizontal | whether to activate horizontal mode | Boolean | - | false | | ||
| tree-node-wrapper-class | add these class to horizontal block wrapper when activate horizontal mode | String | - | - | | ||
| open-when-check | click checkbox to behave like a click tree node | Boolean | - | false | | ||
### Extra Useful Methods | ||
| Name | Description | Parameters | | ||
@@ -19,0 +32,0 @@ |:-----|:-----|:-----| |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
127463
93