Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
static.lib.extends.tree-table.min.js Maven / Gradle / Ivy
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.ELEMENT_TREE_COLUMN=t()}(this,function(){"use strict";function e(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var t,r=function(e,t){for(var r=-1,o=0;o-1&&r(e[n],i)==-1&&(a.push(e[n]),i.push(e[n]))});return a},n=function(){return Math.floor(Math.random()*Math.random()*Math.random()*Math.random()*1e3)},a=function(e,t){for(var r=0;t[r]&&(!t[r].$extra||t[r].$extra.hash!=e);)r++;return r},i={indexOf:r,descendantsIds:o,hash:n,index:a},l={floderIcon:function(e,t){var r=!1;t.$extra&&(r=t.$extra.expanded);var o=e.props.folderIcon,n=e.props.folderIcon+"-open";return r?n:o},hasChild:function(e,t){return void 0!=t[e.props.childNumKey]?t[e.props.childNumKey]>0:void 0!=t[e.props.childKey]&&t[e.props.childKey].length>0},paddingLeft:function(e,t){return 14*parseInt(t[e.props.levelKey])+"px"},icon:function(e){return e.$extra&&1==e.$extra.loading?"el-icon-loading":e.$extra&&e.$extra.expanded?"el-icon-caret-bottom":"el-icon-caret-right"},has:function e(t,r,o){var n=t.props.treeKey,a=t.props.parentKey,i=r[n],e=!1;return o.forEach(function(t){t[n]!=i&&t[n]!=r[a]||(e=!0)}),e},commit:function(e,t,r){var o=t.store.table,n=t.store.states,a=n.selection;o.store.commit("setData",r),o.clearSelection(),o.store.states._data.forEach(function(t){l.has(e,t,a)&&o.toggleRowSelection(t)})},setSystemExpanded:function(e,t){e.forEach(function(e){e.$extra={isRender:t}})},doexpanded:function(e,t,r,o){var n=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=e.store.table,p=(e.store.states,t.props),d=JSON.parse(JSON.stringify(a.store.states._data));if(void 0==d[r].$extra||!d[r].$extra.loading)if(void 0==d[r].$extra?d[r].$extra={expanded:!0}:d[r].$extra.expanded=!d[r].$extra.expanded,d[r].$extra.expanded)if(null!=p.remote){var s=i.hash();d[r].$extra.expanded=!1,d[r].$extra.hash=s,d[r].$extra.loading=!0,l.commit(t,e,d),p.remote(o,function(r){var o=a.store.states._data,d=i.index(s,o);if(o[d].$extra={loading:!1,expanded:!!(r&&r.length>0)},r&&r.length>0){for(var c=o.slice(0,d+1),f=0;f