Commit 3629f7bb authored by ms group dev's avatar ms group dev
Browse files

静态资源更新

parent 74cc8d5b
/* axios v0.18.0 | (c) 2018 by Matt Zabriskie */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.axios=t():e.axios=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){"use strict";function r(e){var t=new s(e),n=i(s.prototype.request,t);return o.extend(n,s.prototype,t),o.extend(n,t),n}var o=n(2),i=n(3),s=n(5),u=n(6),a=r(u);a.Axios=s,a.create=function(e){return r(o.merge(u,e))},a.Cancel=n(23),a.CancelToken=n(24),a.isCancel=n(20),a.all=function(e){return Promise.all(e)},a.spread=n(25),e.exports=a,e.exports.default=a},function(e,t,n){"use strict";function r(e){return"[object Array]"===R.call(e)}function o(e){return"[object ArrayBuffer]"===R.call(e)}function i(e){return"undefined"!=typeof FormData&&e instanceof FormData}function s(e){var t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer}function u(e){return"string"==typeof e}function a(e){return"number"==typeof e}function c(e){return"undefined"==typeof e}function f(e){return null!==e&&"object"==typeof e}function p(e){return"[object Date]"===R.call(e)}function d(e){return"[object File]"===R.call(e)}function l(e){return"[object Blob]"===R.call(e)}function h(e){return"[object Function]"===R.call(e)}function m(e){return f(e)&&h(e.pipe)}function y(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams}function w(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}function g(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)}function v(e,t){if(null!==e&&"undefined"!=typeof e)if("object"!=typeof e&&(e=[e]),r(e))for(var n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}function x(){function e(e,n){"object"==typeof t[n]&&"object"==typeof e?t[n]=x(t[n],e):t[n]=e}for(var t={},n=0,r=arguments.length;n<r;n++)v(arguments[n],e);return t}function b(e,t,n){return v(t,function(t,r){n&&"function"==typeof t?e[r]=E(t,n):e[r]=t}),e}var E=n(3),C=n(4),R=Object.prototype.toString;e.exports={isArray:r,isArrayBuffer:o,isBuffer:C,isFormData:i,isArrayBufferView:s,isString:u,isNumber:a,isObject:f,isUndefined:c,isDate:p,isFile:d,isBlob:l,isFunction:h,isStream:m,isURLSearchParams:y,isStandardBrowserEnv:g,forEach:v,merge:x,extend:b,trim:w}},function(e,t){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},function(e,t){function n(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function r(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))}/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
e.exports=function(e){return null!=e&&(n(e)||r(e)||!!e._isBuffer)}},function(e,t,n){"use strict";function r(e){this.defaults=e,this.interceptors={request:new s,response:new s}}var o=n(6),i=n(2),s=n(17),u=n(18);r.prototype.request=function(e){"string"==typeof e&&(e=i.merge({url:arguments[0]},arguments[1])),e=i.merge(o,{method:"get"},this.defaults,e),e.method=e.method.toLowerCase();var t=[u,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)n=n.then(t.shift(),t.shift());return n},i.forEach(["delete","get","head","options"],function(e){r.prototype[e]=function(t,n){return this.request(i.merge(n||{},{method:e,url:t}))}}),i.forEach(["post","put","patch"],function(e){r.prototype[e]=function(t,n,r){return this.request(i.merge(r||{},{method:e,url:t,data:n}))}}),e.exports=r},function(e,t,n){"use strict";function r(e,t){!i.isUndefined(e)&&i.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function o(){var e;return"undefined"!=typeof XMLHttpRequest?e=n(8):"undefined"!=typeof process&&(e=n(8)),e}var i=n(2),s=n(7),u={"Content-Type":"application/x-www-form-urlencoded"},a={adapter:o(),transformRequest:[function(e,t){return s(t,"Content-Type"),i.isFormData(e)||i.isArrayBuffer(e)||i.isBuffer(e)||i.isStream(e)||i.isFile(e)||i.isBlob(e)?e:i.isArrayBufferView(e)?e.buffer:i.isURLSearchParams(e)?(r(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):i.isObject(e)?(r(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};a.headers={common:{Accept:"application/json, text/plain, */*"}},i.forEach(["delete","get","head"],function(e){a.headers[e]={}}),i.forEach(["post","put","patch"],function(e){a.headers[e]=i.merge(u)}),e.exports=a},function(e,t,n){"use strict";var r=n(2);e.exports=function(e,t){r.forEach(e,function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])})}},function(e,t,n){"use strict";var r=n(2),o=n(9),i=n(12),s=n(13),u=n(14),a=n(10),c="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||n(15);e.exports=function(e){return new Promise(function(t,f){var p=e.data,d=e.headers;r.isFormData(p)&&delete d["Content-Type"];var l=new XMLHttpRequest,h="onreadystatechange",m=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in l||u(e.url)||(l=new window.XDomainRequest,h="onload",m=!0,l.onprogress=function(){},l.ontimeout=function(){}),e.auth){var y=e.auth.username||"",w=e.auth.password||"";d.Authorization="Basic "+c(y+":"+w)}if(l.open(e.method.toUpperCase(),i(e.url,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,l[h]=function(){if(l&&(4===l.readyState||m)&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in l?s(l.getAllResponseHeaders()):null,r=e.responseType&&"text"!==e.responseType?l.response:l.responseText,i={data:r,status:1223===l.status?204:l.status,statusText:1223===l.status?"No Content":l.statusText,headers:n,config:e,request:l};o(t,f,i),l=null}},l.onerror=function(){f(a("Network Error",e,null,l)),l=null},l.ontimeout=function(){f(a("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",l)),l=null},r.isStandardBrowserEnv()){var g=n(16),v=(e.withCredentials||u(e.url))&&e.xsrfCookieName?g.read(e.xsrfCookieName):void 0;v&&(d[e.xsrfHeaderName]=v)}if("setRequestHeader"in l&&r.forEach(d,function(e,t){"undefined"==typeof p&&"content-type"===t.toLowerCase()?delete d[t]:l.setRequestHeader(t,e)}),e.withCredentials&&(l.withCredentials=!0),e.responseType)try{l.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&l.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){l&&(l.abort(),f(e),l=null)}),void 0===p&&(p=null),l.send(p)})}},function(e,t,n){"use strict";var r=n(10);e.exports=function(e,t,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},function(e,t,n){"use strict";var r=n(11);e.exports=function(e,t,n,o,i){var s=new Error(e);return r(s,t,n,o,i)}},function(e,t){"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e}},function(e,t,n){"use strict";function r(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var o=n(2);e.exports=function(e,t,n){if(!t)return e;var i;if(n)i=n(t);else if(o.isURLSearchParams(t))i=t.toString();else{var s=[];o.forEach(t,function(e,t){null!==e&&"undefined"!=typeof e&&(o.isArray(e)?t+="[]":e=[e],o.forEach(e,function(e){o.isDate(e)?e=e.toISOString():o.isObject(e)&&(e=JSON.stringify(e)),s.push(r(t)+"="+r(e))}))}),i=s.join("&")}return i&&(e+=(e.indexOf("?")===-1?"?":"&")+i),e}},function(e,t,n){"use strict";var r=n(2),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,i,s={};return e?(r.forEach(e.split("\n"),function(e){if(i=e.indexOf(":"),t=r.trim(e.substr(0,i)).toLowerCase(),n=r.trim(e.substr(i+1)),t){if(s[t]&&o.indexOf(t)>=0)return;"set-cookie"===t?s[t]=(s[t]?s[t]:[]).concat([n]):s[t]=s[t]?s[t]+", "+n:n}}),s):s}},function(e,t,n){"use strict";var r=n(2);e.exports=r.isStandardBrowserEnv()?function(){function e(e){var t=e;return n&&(o.setAttribute("href",t),t=o.href),o.setAttribute("href",t),{href:o.href,protocol:o.protocol?o.protocol.replace(/:$/,""):"",host:o.host,search:o.search?o.search.replace(/^\?/,""):"",hash:o.hash?o.hash.replace(/^#/,""):"",hostname:o.hostname,port:o.port,pathname:"/"===o.pathname.charAt(0)?o.pathname:"/"+o.pathname}}var t,n=/(msie|trident)/i.test(navigator.userAgent),o=document.createElement("a");return t=e(window.location.href),function(n){var o=r.isString(n)?e(n):n;return o.protocol===t.protocol&&o.host===t.host}}():function(){return function(){return!0}}()},function(e,t){"use strict";function n(){this.message="String contains an invalid character"}function r(e){for(var t,r,i=String(e),s="",u=0,a=o;i.charAt(0|u)||(a="=",u%1);s+=a.charAt(63&t>>8-u%1*8)){if(r=i.charCodeAt(u+=.75),r>255)throw new n;t=t<<8|r}return s}var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";n.prototype=new Error,n.prototype.code=5,n.prototype.name="InvalidCharacterError",e.exports=r},function(e,t,n){"use strict";var r=n(2);e.exports=r.isStandardBrowserEnv()?function(){return{write:function(e,t,n,o,i,s){var u=[];u.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&u.push("expires="+new Date(n).toGMTString()),r.isString(o)&&u.push("path="+o),r.isString(i)&&u.push("domain="+i),s===!0&&u.push("secure"),document.cookie=u.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},function(e,t,n){"use strict";function r(){this.handlers=[]}var o=n(2);r.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},r.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},r.prototype.forEach=function(e){o.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=r},function(e,t,n){"use strict";function r(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var o=n(2),i=n(19),s=n(20),u=n(6),a=n(21),c=n(22);e.exports=function(e){r(e),e.baseURL&&!a(e.url)&&(e.url=c(e.baseURL,e.url)),e.headers=e.headers||{},e.data=i(e.data,e.headers,e.transformRequest),e.headers=o.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),o.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]});var t=e.adapter||u.adapter;return t(e).then(function(t){return r(e),t.data=i(t.data,t.headers,e.transformResponse),t},function(t){return s(t)||(r(e),t&&t.response&&(t.response.data=i(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},function(e,t,n){"use strict";var r=n(2);e.exports=function(e,t,n){return r.forEach(n,function(n){e=n(e,t)}),e}},function(e,t){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t){"use strict";function n(e){this.message=e}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,e.exports=n},function(e,t,n){"use strict";function r(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var n=this;e(function(e){n.reason||(n.reason=new o(e),t(n.reason))})}var o=n(23);r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var e,t=new r(function(t){e=t});return{token:t,cancel:e}},e.exports=r},function(e,t){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}}])});
//# sourceMappingURL=axios.min.map
\ No newline at end of file
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global.ElTableTreeColumn = factory());
}(this, (function () { 'use strict';
var nestRE = /^(attrs|props|on|nativeOn|class|style|hook)$/;
var index = function mergeJSXProps(objs) {
return objs.reduce(function (a, b) {
var aa, bb, key, nestedKey, temp;
for (key in b) {
aa = a[key];
bb = b[key];
if (aa && nestRE.test(key)) {
// normalize class
if (key === 'class') {
if (typeof aa === 'string') {
temp = aa;
a[key] = aa = {};
aa[temp] = true;
}
if (typeof bb === 'string') {
temp = bb;
b[key] = bb = {};
bb[temp] = true;
}
}
if (key === 'on' || key === 'nativeOn' || key === 'hook') {
// merge functions
for (nestedKey in bb) {
aa[nestedKey] = mergeFn(aa[nestedKey], bb[nestedKey]);
}
} else if (Array.isArray(aa)) {
a[key] = aa.concat(bb);
} else if (Array.isArray(bb)) {
a[key] = [aa].concat(bb);
} else {
for (nestedKey in bb) {
aa[nestedKey] = bb[nestedKey];
}
}
} else {
a[key] = b[key];
}
}
return a;
}, {});
};
function mergeFn(a, b) {
return function () {
a.apply(this, arguments);
b.apply(this, arguments);
};
}
var ElTableTreeColumnPropDefine = {
prop: {
type: String
},
label: String,
className: String,
labelClassName: String,
property: String,
width: {},
minWidth: {},
renderHeader: Function,
sortable: {
type: [String, Boolean],
default: false
},
sortMethod: Function,
resizable: {
type: Boolean,
default: true
},
context: {},
columnKey: String,
align: String,
headerAlign: String,
showTooltipWhenOverflow: Boolean,
showOverflowTooltip: Boolean,
fixed: [Boolean, String],
formatter: Function,
selectable: Function,
reserveSelection: Boolean,
filterMethod: Function,
filteredValue: Array,
filters: Array,
filterMultiple: {
type: Boolean,
default: true
},
treeKey: {
type: String,
default: 'id'
},
childNumKey: {
type: String,
default: 'child_num'
},
parentKey: {
type: String,
default: 'parent_id'
},
levelKey: {
type: String,
default: 'depth'
},
childKey: {
type: String,
default: 'children'
},
fileIcon: {
type: String,
default: 'el-icon-file'
},
folderIcon: {
type: String,
default: 'el-icon-folder'
},
remote: {
type: Function,
default: null
},
allRemote: {
type: Boolean,
default: false
},
indentSize: {
type: Number,
default: 14
},
expandAll: {
type: Boolean,
default: false
},
expandKey: {
type: String,
default: 'expanded'
}
};
function hasChild(context, scope) {
var _a = context.props,
childNumKey = _a.childNumKey,
childKey = _a.childKey,
row = scope.row;
if (row[childNumKey] != undefined) {
return row[childNumKey] > 0 ? true : false;
}
if (row[childKey] != undefined) {
return row[childKey].length > 0 ? true : false;
} else {
return false;
}
}
function paddingLeft(context, scope) {
return parseInt(scope.row[context.props.levelKey]) * parseInt(context.props.indentSize.toString()) + 'px';
}
function removeCachedExpanedRow(context, scope) {
var _treeCachedExpanded = scope.store.states._treeCachedExpanded,
treeKey = context.props.treeKey,
row = scope.row;
scope.store.states._treeCachedExpanded = _treeCachedExpanded.filter(function (crow) {
return crow[treeKey] != row[treeKey];
});
}
function isCachedExpanedRow(context, scope) {
var _treeCachedExpanded = scope.store.states._treeCachedExpanded,
treeKey = context.props.treeKey,
row = scope.row;
return _treeCachedExpanded.map(function (row) {
return row[treeKey];
}).filter(function (_treeKey) {
return _treeKey == row[treeKey];
}).length > 0;
}
function isNeedExpanedRow(context, scope) {
if (context.props.expandAll && !scope.store.states._treeInitedExpanded.some(function (treeKey) {
return treeKey == scope.row[context.props.treeKey];
})) {
scope.store.states._treeInitedExpanded.push(scope.row[context.props.treeKey]);
return true;
}
var expandKey = context.props.expandKey,
row = scope.row;
if (expandKey && row[expandKey] && !scope.store.states._treeInitedExpanded.some(function (treeKey) {
return treeKey == row[context.props.treeKey];
})) {
scope.store.states._treeInitedExpanded.push(scope.row[context.props.treeKey]);
return true;
}
var result = isCachedExpanedRow(context, scope);
if (result) removeCachedExpanedRow(context, scope);
return result;
}
function isLoadingRow(context, scope) {
var _treeRowLoading = scope.store.states._treeRowLoading,
treeKey = context.props.treeKey,
row = scope.row;
return _treeRowLoading.map(function (row) {
return row[treeKey];
}).filter(function (_treeKey) {
return _treeKey == row[treeKey];
}).length > 0;
}
function isExpandedRow(context, scope) {
var _treeRowExpanded = scope.store.states._treeRowExpanded,
treeKey = context.props.treeKey,
row = scope.row;
return _treeRowExpanded.map(function (row) {
return row[treeKey];
}).filter(function (_treeKey) {
return _treeKey == row[treeKey];
}).length > 0;
}
function icon(scope, context) {
if (isLoadingRow(context, scope)) return 'el-icon-loading';
if (isExpandedRow(context, scope)) return 'el-icon-caret-bottom';
return 'el-icon-caret-right';
}
function folderIcon(context, scope) {
var floder = context.props.folderIcon,
floder_open = context.props.folderIcon + '-open';
return isExpandedRow(context, scope) ? floder_open : floder;
}
function renderDetail(h, context, scope) {
if (context.data.scopedSlots && context.data.scopedSlots.default) {
return context.data.scopedSlots.default(scope);
}
if (context.props.formatter) {
return h(
'span',
null,
[context.props.formatter(scope.row, scope.column)]
);
}
return h(
'span',
null,
[scope.row[context.props.prop]]
);
}
var clone = function clone(data) {
return JSON.parse(JSON.stringify(data));
};
var indexOf = function indexOf(val, arr) {
var has = -1;
for (var i = 0; i < arr.length; i++) {
if (arr[i] == val) {
has = i;
break;
}
}
return has;
};
var descendantsIds = function descendantsIds(id, data, parentKey, treeKey) {
var result = [],
compare = [id],
length = -1;
while (length != compare.length) {
length = compare.length;
data.forEach(function (item) {
if (indexOf(item[parentKey], compare) > -1 && indexOf(item[treeKey], compare) == -1) {
result.push(item[treeKey]);
compare.push(item[treeKey]);
}
});
}
return result;
};
var toggleExpanded = function toggleExpanded(context, scope, isExpended) {
var treeKey = context.props.treeKey,
states = scope.store.states;
states._treeCachedExpanded = states._treeCachedExpanded.filter(function (r) {
return r[treeKey] != scope.row[treeKey];
});
if (isExpended) {
states._treeRowExpanded = states._treeRowExpanded.filter(function (r) {
return r[treeKey] != scope.row[treeKey];
});
} else {
states._treeRowExpanded.push(scope.row);
}
};
var toggleLoading = function toggleLoading(context, scope, isloading) {
var treeKey = context.props.treeKey;
if (isloading) {
scope.store.states._treeRowLoading = scope.store.states._treeRowLoading.filter(function (r) {
return r[treeKey] != scope.row[treeKey];
});
} else {
scope.store.states._treeRowLoading.push(scope.row);
}
};
var commit = function commit(context, scope, list) {
var owner = scope.store.table; //methods.owner(context.parent);
var states = scope.store.states;
// let selection = states.selection;
owner.store.commit('setData', list);
/* owner.clearSelection();
let data = owner.store.states._data;
data.forEach(row => {
if (has(context, row, selection)) {
owner.toggleRowSelection(row)
}
}); */
};
var getIndex = function getIndex(context, scope, data) {
var index = -1,
treeKey = context.props.treeKey;
data.forEach(function (r, i) {
if (r[treeKey] == scope.row[treeKey]) {
index = i;
}
});
return index;
};
var Colspand = function Colspand(context, scope, data) {
var _a = context.props,
parentKey = _a.parentKey,
treeKey = _a.treeKey,
states = scope.store.states,
row = scope.row,
result = [];
var removeIds = descendantsIds(row[treeKey], data, parentKey, treeKey);
data = data.filter(function (item) {
return !removeIds.some(function (id) {
return id == item[treeKey];
});
});
var NeedToCached = states._treeRowExpanded.filter(function (item) {
return removeIds.some(function (id) {
return id == item[treeKey];
});
});
var _treeCachedExpanded = states._treeCachedExpanded;
NeedToCached.forEach(function (item) {
if (!_treeCachedExpanded.some(function (i) {
return i[treeKey] == item[treeKey];
})) {
states._treeCachedExpanded.push(item);
}
});
states._treeRowExpanded = states._treeRowExpanded.filter(function (item) {
return !removeIds.some(function (id) {
return id == item[treeKey];
});
});
commit(context, scope, data);
};
var insertRows = function insertRows(context, scope, children, updateChild) {
if (updateChild === void 0) {
updateChild = false;
}
var _data = clone(scope.store.states._data);
var _index = getIndex(context, scope, _data);
var prefix = _data.slice(0, _index + 1);
var i = 0;
while (i < _index + 1) {
_data.shift();
i++;
}
if (updateChild) prefix[_index][context.props.childKey] = children;
_data = prefix.concat(children).concat(_data);
return _data;
};
var ExpandRemote = function ExpandRemote(context, scope, data) {
var _a = context.props,
treeKey = _a.treeKey,
remote = _a.remote;
toggleLoading(context, scope, false);
var CallBack = function CallBack(children) {
var childNumKey = context.props.childNumKey;
toggleLoading(context, scope, true);
var _data;
if (children && children.length > 0) {
var updateChild = !context.props.allRemote;
_data = insertRows(context, scope, children, updateChild);
} else {
_data = clone(scope.store.states._data);
var _index = getIndex(context, scope, _data);
_data[_index][childNumKey] = 0;
}
commit(context, scope, _data);
};
commit(context, scope, data);
remote(scope.row, CallBack);
// console.info(scope.store.states._treeCachedExpanded)
};
var Expand = function Expand(context, scope, data) {
var childKey = context.props.childKey;
data = insertRows(context, scope, scope.row[childKey]);
commit(context, scope, data);
};
function doExpand(context, scope) {
var data = clone(scope.store.states._data),
childKey = context.props.childKey;
// line is loading
if (isLoadingRow(context, scope)) return;
var isExpended = isExpandedRow(context, scope);
toggleExpanded(context, scope, isExpended);
if (isExpended) {
return Colspand(context, scope, data);
}
var _a = context.props,
remote = _a.remote,
allRemote = _a.allRemote;
if (remote && allRemote) {
return ExpandRemote(context, scope, data);
}
if (scope.row[childKey]) {
return Expand(context, scope, data);
} else if (remote) {
return ExpandRemote(context, scope, data);
}
Expand(context, scope, data);
}
var ElTableInject = /** @class */function () {
function ElTableInject() {
this.Injected = {};
}
ElTableInject.prototype.isInjected = function (scope) {
return this.Injected[scope.store.table.tableId];
};
ElTableInject.prototype.Inject = function (scope) {
if (this.isInjected(scope)) return;
this.Injected[scope.store.table.tableId] = true;
scope.store.states._treeRowExpanded = [];
scope.store.states._treeRowLoading = [];
scope.store.states._treeCachedExpanded = [];
scope.store.states._treeInitedExpanded = [];
// scope.store.mutations
};
return ElTableInject;
}();
var ElTableInjecter = new ElTableInject();
var RenderFolder = function RenderFolder(h, context, scope) {
if (isNeedExpanedRow(context, scope)) {
setTimeout(function () {
doExpand(context, scope);
}, 15);
}
return h(
'span',
{
on: {
'click': function click(e) {
e.preventDefault();
doExpand(context, scope);
}
}
},
[h(
'span',
{ style: { paddingLeft: paddingLeft(context, scope) } },
[h(
'i',
{ 'class': icon(scope, context) },
[]
), h(
'i',
{ 'class': folderIcon(context, scope) },
[]
)]
), renderDetail(h, context, scope)]
);
};
var RenderLeaf = function RenderLeaf(h, context, scope) {
return h(
'span',
{ style: { paddingLeft: paddingLeft(context, scope) } },
[h(
'i',
{ 'class': context.props.fileIcon },
[]
), renderDetail(h, context, scope)]
);
};
var RenderContext = function RenderContext(h, context, scope) {
ElTableInjecter.Inject(scope);
var hasChild$$1 = hasChild(context, scope);
if (hasChild$$1) return RenderFolder(h, context, scope);
return RenderLeaf(h, context, scope);
};
var ElTableTreeColumn = {
name: 'el-table-tree-column',
functional: true,
props: ElTableTreeColumnPropDefine,
render: function render(h, context) {
// props will be lost when `scopedSlots` is rendering
var attr = {};
Object.keys(context.props).map(function (k) {
attr[k] = context.props[k];
});
var attrs = { attrs: attr };
return h(
'el-table-column',
index([attrs, { scopedSlots: { default: function _default(scope) {
return RenderContext(h, context, scope);
} } }]),
[]
);
}
};
if (typeof window !== 'undefined' && window.Vue) {
window.Vue.component('el-table-tree-column', ElTableTreeColumn);
}
return ElTableTreeColumn;
})));
This diff is collapsed.
This diff is collapsed.
/*! jquery.cookie v1.4.1 | MIT */
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?a(require("jquery")):a(jQuery)}(function(a){function b(a){return h.raw?a:encodeURIComponent(a)}function c(a){return h.raw?a:decodeURIComponent(a)}function d(a){return b(h.json?JSON.stringify(a):String(a))}function e(a){0===a.indexOf('"')&&(a=a.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return a=decodeURIComponent(a.replace(g," ")),h.json?JSON.parse(a):a}catch(b){}}function f(b,c){var d=h.raw?b:e(b);return a.isFunction(c)?c(d):d}var g=/\+/g,h=a.cookie=function(e,g,i){if(void 0!==g&&!a.isFunction(g)){if(i=a.extend({},h.defaults,i),"number"==typeof i.expires){var j=i.expires,k=i.expires=new Date;k.setTime(+k+864e5*j)}return document.cookie=[b(e),"=",d(g),i.expires?"; expires="+i.expires.toUTCString():"",i.path?"; path="+i.path:"",i.domain?"; domain="+i.domain:"",i.secure?"; secure":""].join("")}for(var l=e?void 0:{},m=document.cookie?document.cookie.split("; "):[],n=0,o=m.length;o>n;n++){var p=m[n].split("="),q=c(p.shift()),r=p.join("=");if(e&&e===q){l=f(r,g);break}e||void 0===(r=f(r))||(l[q]=r)}return l};h.defaults={},a.removeCookie=function(b,c){return void 0===a.cookie(b)?!1:(a.cookie(b,"",a.extend({},c,{expires:-1})),!a.cookie(b))}});
\ No newline at end of file
/*! minireset.css v0.0.2 | MIT License | github.com/jgthms/minireset.css */html,body,p,ol,ul,li,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr,h1,h2,h3,h4,h5,h6{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal}ul{list-style:none}button,input,select,textarea{margin:0}html{box-sizing:border-box}*{box-sizing:inherit}*:before,*:after{box-sizing:inherit}img,embed,object,audio,video{height:auto;max-width:100%}iframe{border:0}table{border-collapse:collapse;border-spacing:0}td,th{padding:0;text-align:left}
\ No newline at end of file
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Qs=e()}}(function(){return function i(a,l,c){function f(r,e){if(!l[r]){if(!a[r]){var t="function"==typeof require&&require;if(!e&&t)return t(r,!0);if(s)return s(r,!0);var o=new Error("Cannot find module '"+r+"'");throw o.code="MODULE_NOT_FOUND",o}var n=l[r]={exports:{}};a[r][0].call(n.exports,function(e){return f(a[r][1][e]||e)},n,n.exports,i,a,l,c)}return l[r].exports}for(var s="function"==typeof require&&require,e=0;e<c.length;e++)f(c[e]);return f}({1:[function(e,r,t){"use strict";var o=String.prototype.replace,n=/%20/g;r.exports={default:"RFC3986",formatters:{RFC1738:function(e){return o.call(e,n,"+")},RFC3986:function(e){return e}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},{}],2:[function(e,r,t){"use strict";var o=e("./stringify"),n=e("./parse"),i=e("./formats");r.exports={formats:i,parse:n,stringify:o}},{"./formats":1,"./parse":3,"./stringify":4}],3:[function(e,r,t){"use strict";var f=e("./utils"),p=Object.prototype.hasOwnProperty,d={allowDots:!1,allowPrototypes:!1,arrayLimit:20,decoder:f.decode,delimiter:"&",depth:5,parameterLimit:1e3,plainObjects:!1,strictNullHandling:!1},s=function(e,r,t){if(e){var o=t.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,n=/(\[[^[\]]*])/g,i=/(\[[^[\]]*])/.exec(o),a=i?o.slice(0,i.index):o,l=[];if(a){if(!t.plainObjects&&p.call(Object.prototype,a)&&!t.allowPrototypes)return;l.push(a)}for(var c=0;null!==(i=n.exec(o))&&c<t.depth;){if(c+=1,!t.plainObjects&&p.call(Object.prototype,i[1].slice(1,-1))&&!t.allowPrototypes)return;l.push(i[1])}return i&&l.push("["+o.slice(i.index)+"]"),function(e,r,t){for(var o=r,n=e.length-1;0<=n;--n){var i,a=e[n];if("[]"===a)i=(i=[]).concat(o);else{i=t.plainObjects?Object.create(null):{};var l="["===a.charAt(0)&&"]"===a.charAt(a.length-1)?a.slice(1,-1):a,c=parseInt(l,10);!isNaN(c)&&a!==l&&String(c)===l&&0<=c&&t.parseArrays&&c<=t.arrayLimit?(i=[])[c]=o:i[l]=o}o=i}return o}(l,r,t)}};r.exports=function(e,r){var t=r?f.assign({},r):{};if(null!==t.decoder&&void 0!==t.decoder&&"function"!=typeof t.decoder)throw new TypeError("Decoder has to be a function.");if(t.ignoreQueryPrefix=!0===t.ignoreQueryPrefix,t.delimiter="string"==typeof t.delimiter||f.isRegExp(t.delimiter)?t.delimiter:d.delimiter,t.depth="number"==typeof t.depth?t.depth:d.depth,t.arrayLimit="number"==typeof t.arrayLimit?t.arrayLimit:d.arrayLimit,t.parseArrays=!1!==t.parseArrays,t.decoder="function"==typeof t.decoder?t.decoder:d.decoder,t.allowDots="boolean"==typeof t.allowDots?t.allowDots:d.allowDots,t.plainObjects="boolean"==typeof t.plainObjects?t.plainObjects:d.plainObjects,t.allowPrototypes="boolean"==typeof t.allowPrototypes?t.allowPrototypes:d.allowPrototypes,t.parameterLimit="number"==typeof t.parameterLimit?t.parameterLimit:d.parameterLimit,t.strictNullHandling="boolean"==typeof t.strictNullHandling?t.strictNullHandling:d.strictNullHandling,""===e||null==e)return t.plainObjects?Object.create(null):{};for(var o="string"==typeof e?function(e,r){for(var t={},o=r.ignoreQueryPrefix?e.replace(/^\?/,""):e,n=r.parameterLimit===1/0?void 0:r.parameterLimit,i=o.split(r.delimiter,n),a=0;a<i.length;++a){var l,c,f=i[a],s=f.indexOf("]="),u=-1===s?f.indexOf("="):s+1;-1===u?(l=r.decoder(f,d.decoder),c=r.strictNullHandling?null:""):(l=r.decoder(f.slice(0,u),d.decoder),c=r.decoder(f.slice(u+1),d.decoder)),p.call(t,l)?t[l]=[].concat(t[l]).concat(c):t[l]=c}return t}(e,t):e,n=t.plainObjects?Object.create(null):{},i=Object.keys(o),a=0;a<i.length;++a){var l=i[a],c=s(l,o[l],t);n=f.merge(n,c,t)}return f.compact(n)}},{"./utils":5}],4:[function(e,r,t){"use strict";var A=e("./utils"),x=e("./formats"),N={brackets:function(e){return e+"[]"},indices:function(e,r){return e+"["+r+"]"},repeat:function(e){return e}},o=Date.prototype.toISOString,D={delimiter:"&",encode:!0,encoder:A.encode,encodeValuesOnly:!1,serializeDate:function(e){return o.call(e)},skipNulls:!1,strictNullHandling:!1},P=function e(r,t,o,n,i,a,l,c,f,s,u,p){var d=r;if("function"==typeof l)d=l(t,d);else if(d instanceof Date)d=s(d);else if(null===d){if(n)return a&&!p?a(t,D.encoder):t;d=""}if("string"==typeof d||"number"==typeof d||"boolean"==typeof d||A.isBuffer(d))return a?[u(p?t:a(t,D.encoder))+"="+u(a(d,D.encoder))]:[u(t)+"="+u(String(d))];var y,b=[];if(void 0===d)return b;if(Array.isArray(l))y=l;else{var m=Object.keys(d);y=c?m.sort(c):m}for(var g=0;g<y.length;++g){var v=y[g];i&&null===d[v]||(b=Array.isArray(d)?b.concat(e(d[v],o(t,v),o,n,i,a,l,c,f,s,u,p)):b.concat(e(d[v],t+(f?"."+v:"["+v+"]"),o,n,i,a,l,c,f,s,u,p)))}return b};r.exports=function(e,r){var t=e,o=r?A.assign({},r):{};if(null!==o.encoder&&void 0!==o.encoder&&"function"!=typeof o.encoder)throw new TypeError("Encoder has to be a function.");var n=void 0===o.delimiter?D.delimiter:o.delimiter,i="boolean"==typeof o.strictNullHandling?o.strictNullHandling:D.strictNullHandling,a="boolean"==typeof o.skipNulls?o.skipNulls:D.skipNulls,l="boolean"==typeof o.encode?o.encode:D.encode,c="function"==typeof o.encoder?o.encoder:D.encoder,f="function"==typeof o.sort?o.sort:null,s=void 0!==o.allowDots&&o.allowDots,u="function"==typeof o.serializeDate?o.serializeDate:D.serializeDate,p="boolean"==typeof o.encodeValuesOnly?o.encodeValuesOnly:D.encodeValuesOnly;if(void 0===o.format)o.format=x.default;else if(!Object.prototype.hasOwnProperty.call(x.formatters,o.format))throw new TypeError("Unknown format option provided.");var d,y,b=x.formatters[o.format];"function"==typeof o.filter?t=(y=o.filter)("",t):Array.isArray(o.filter)&&(d=y=o.filter);var m,g=[];if("object"!=typeof t||null===t)return"";m=o.arrayFormat in N?o.arrayFormat:"indices"in o?o.indices?"indices":"repeat":"indices";var v=N[m];d||(d=Object.keys(t)),f&&d.sort(f);for(var h=0;h<d.length;++h){var j=d[h];a&&null===t[j]||(g=g.concat(P(t[j],j,v,i,a,l?c:null,y,f,s,u,b,p)))}var O=g.join(n),w=!0===o.addQueryPrefix?"?":"";return 0<O.length?w+O:""}},{"./formats":1,"./utils":5}],5:[function(e,r,t){"use strict";var a=Object.prototype.hasOwnProperty,i=function(){for(var e=[],r=0;r<256;++r)e.push("%"+((r<16?"0":"")+r.toString(16)).toUpperCase());return e}(),l=function(e,r){for(var t=r&&r.plainObjects?Object.create(null):{},o=0;o<e.length;++o)void 0!==e[o]&&(t[o]=e[o]);return t};r.exports={arrayToObject:l,assign:function(e,t){return Object.keys(t).reduce(function(e,r){return e[r]=t[r],e},e)},compact:function(e){for(var r=[{obj:{o:e},prop:"o"}],t=[],o=0;o<r.length;++o)for(var n=r[o],i=n.obj[n.prop],a=Object.keys(i),l=0;l<a.length;++l){var c=a[l],f=i[c];"object"==typeof f&&null!==f&&-1===t.indexOf(f)&&(r.push({obj:i,prop:c}),t.push(f))}return function(e){for(var r;e.length;){var t=e.pop();if(r=t.obj[t.prop],Array.isArray(r)){for(var o=[],n=0;n<r.length;++n)void 0!==r[n]&&o.push(r[n]);t.obj[t.prop]=o}}return r}(r)},decode:function(r){try{return decodeURIComponent(r.replace(/\+/g," "))}catch(e){return r}},encode:function(e){if(0===e.length)return e;for(var r="string"==typeof e?e:String(e),t="",o=0;o<r.length;++o){var n=r.charCodeAt(o);45===n||46===n||95===n||126===n||48<=n&&n<=57||65<=n&&n<=90||97<=n&&n<=122?t+=r.charAt(o):n<128?t+=i[n]:n<2048?t+=i[192|n>>6]+i[128|63&n]:n<55296||57344<=n?t+=i[224|n>>12]+i[128|n>>6&63]+i[128|63&n]:(o+=1,n=65536+((1023&n)<<10|1023&r.charCodeAt(o)),t+=i[240|n>>18]+i[128|n>>12&63]+i[128|n>>6&63]+i[128|63&n])}return t},isBuffer:function(e){return null!=e&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},merge:function o(t,n,i){if(!n)return t;if("object"!=typeof n){if(Array.isArray(t))t.push(n);else{if("object"!=typeof t)return[t,n];(i.plainObjects||i.allowPrototypes||!a.call(Object.prototype,n))&&(t[n]=!0)}return t}if("object"!=typeof t)return[t].concat(n);var e=t;return Array.isArray(t)&&!Array.isArray(n)&&(e=l(t,i)),Array.isArray(t)&&Array.isArray(n)?(n.forEach(function(e,r){a.call(t,r)?t[r]&&"object"==typeof t[r]?t[r]=o(t[r],e,i):t.push(e):t[r]=e}),t):Object.keys(n).reduce(function(e,r){var t=n[r];return a.call(e,r)?e[r]=o(e[r],t,i):e[r]=t,e},e)}}},{}]},{},[2])(2)});
\ No newline at end of file
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Qs=e()}}(function(){return function i(a,c,l){function s(r,e){if(!c[r]){if(!a[r]){var t="function"==typeof require&&require;if(!e&&t)return t(r,!0);if(f)return f(r,!0);var o=new Error("Cannot find module '"+r+"'");throw o.code="MODULE_NOT_FOUND",o}var n=c[r]={exports:{}};a[r][0].call(n.exports,function(e){return s(a[r][1][e]||e)},n,n.exports,i,a,c,l)}return c[r].exports}for(var f="function"==typeof require&&require,e=0;e<l.length;e++)s(l[e]);return s}({1:[function(e,r,t){"use strict";var o=String.prototype.replace,n=/%20/g;r.exports={default:"RFC3986",formatters:{RFC1738:function(e){return o.call(e,n,"+")},RFC3986:function(e){return e}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},{}],2:[function(e,r,t){"use strict";var o=e("./stringify"),n=e("./parse"),i=e("./formats");r.exports={formats:i,parse:n,stringify:o}},{"./formats":1,"./parse":3,"./stringify":4}],3:[function(e,r,t){"use strict";var y=e("./utils"),h=Object.prototype.hasOwnProperty,m={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,decoder:y.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(e,r,t){if(e){var o=t.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,n=/(\[[^[\]]*])/g,i=/(\[[^[\]]*])/.exec(o),a=i?o.slice(0,i.index):o,c=[];if(a){if(!t.plainObjects&&h.call(Object.prototype,a)&&!t.allowPrototypes)return;c.push(a)}for(var l=0;null!==(i=n.exec(o))&&l<t.depth;){if(l+=1,!t.plainObjects&&h.call(Object.prototype,i[1].slice(1,-1))&&!t.allowPrototypes)return;c.push(i[1])}return i&&c.push("["+o.slice(i.index)+"]"),function(e,r,t){for(var o=r,n=e.length-1;0<=n;--n){var i,a=e[n];if("[]"===a&&t.parseArrays)i=[].concat(o);else{i=t.plainObjects?Object.create(null):{};var c="["===a.charAt(0)&&"]"===a.charAt(a.length-1)?a.slice(1,-1):a,l=parseInt(c,10);t.parseArrays||""!==c?!isNaN(l)&&a!==c&&String(l)===c&&0<=l&&t.parseArrays&&l<=t.arrayLimit?(i=[])[l]=o:i[c]=o:i={0:o}}o=i}return o}(c,r,t)}};r.exports=function(e,r){var t=r?y.assign({},r):{};if(null!==t.decoder&&void 0!==t.decoder&&"function"!=typeof t.decoder)throw new TypeError("Decoder has to be a function.");if(t.ignoreQueryPrefix=!0===t.ignoreQueryPrefix,t.delimiter="string"==typeof t.delimiter||y.isRegExp(t.delimiter)?t.delimiter:m.delimiter,t.depth="number"==typeof t.depth?t.depth:m.depth,t.arrayLimit="number"==typeof t.arrayLimit?t.arrayLimit:m.arrayLimit,t.parseArrays=!1!==t.parseArrays,t.decoder="function"==typeof t.decoder?t.decoder:m.decoder,t.allowDots=void 0===t.allowDots?m.allowDots:!!t.allowDots,t.plainObjects="boolean"==typeof t.plainObjects?t.plainObjects:m.plainObjects,t.allowPrototypes="boolean"==typeof t.allowPrototypes?t.allowPrototypes:m.allowPrototypes,t.parameterLimit="number"==typeof t.parameterLimit?t.parameterLimit:m.parameterLimit,t.strictNullHandling="boolean"==typeof t.strictNullHandling?t.strictNullHandling:m.strictNullHandling,void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new Error("The charset option must be either utf-8, iso-8859-1, or undefined");if(void 0===t.charset&&(t.charset=m.charset),""===e||null==e)return t.plainObjects?Object.create(null):{};for(var o="string"==typeof e?function(e,r){var t,o={},n=r.ignoreQueryPrefix?e.replace(/^\?/,""):e,i=r.parameterLimit===1/0?void 0:r.parameterLimit,a=n.split(r.delimiter,i),c=-1,l=r.charset;if(r.charsetSentinel)for(t=0;t<a.length;++t)0===a[t].indexOf("utf8=")&&("utf8=%E2%9C%93"===a[t]?l="utf-8":"utf8=%26%2310003%3B"===a[t]&&(l="iso-8859-1"),c=t,t=a.length);for(t=0;t<a.length;++t)if(t!==c){var s,f,u=a[t],p=u.indexOf("]="),d=-1===p?u.indexOf("="):p+1;(f=-1===d?(s=r.decoder(u,m.decoder,l),r.strictNullHandling?null:""):(s=r.decoder(u.slice(0,d),m.decoder,l),r.decoder(u.slice(d+1),m.decoder,l)))&&r.interpretNumericEntities&&"iso-8859-1"===l&&(f=f.replace(/&#(\d+);/g,function(e,r){return String.fromCharCode(parseInt(r,10))})),h.call(o,s)?o[s]=y.combine(o[s],f):o[s]=f}return o}(e,t):e,n=t.plainObjects?Object.create(null):{},i=Object.keys(o),a=0;a<i.length;++a){var c=i[a],l=s(c,o[c],t);n=y.merge(n,l,t)}return y.compact(n)}},{"./utils":5}],4:[function(e,r,t){"use strict";var x=e("./utils"),N=e("./formats"),D={brackets:function(e){return e+"[]"},indices:function(e,r){return e+"["+r+"]"},repeat:function(e){return e}},o=Array.isArray,n=Array.prototype.push,P=function(e,r){n.apply(e,o(r)?r:[r])},i=Date.prototype.toISOString,C={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:x.encode,encodeValuesOnly:!1,indices:!1,serializeDate:function(e){return i.call(e)},skipNulls:!1,strictNullHandling:!1},E=function e(r,t,o,n,i,a,c,l,s,f,u,p,d){var y=r;if("function"==typeof c?y=c(t,y):y instanceof Date&&(y=f(y)),null===y){if(n)return a&&!p?a(t,C.encoder,d):t;y=""}if("string"==typeof y||"number"==typeof y||"boolean"==typeof y||x.isBuffer(y))return a?[u(p?t:a(t,C.encoder,d))+"="+u(a(y,C.encoder,d))]:[u(t)+"="+u(String(y))];var h,m=[];if(void 0===y)return m;if(Array.isArray(c))h=c;else{var b=Object.keys(y);h=l?b.sort(l):b}for(var g=0;g<h.length;++g){var v=h[g];i&&null===y[v]||(Array.isArray(y)?P(m,e(y[v],o(t,v),o,n,i,a,c,l,s,f,u,p,d)):P(m,e(y[v],t+(s?"."+v:"["+v+"]"),o,n,i,a,c,l,s,f,u,p,d)))}return m};r.exports=function(e,r){var t=e,o=r?x.assign({},r):{};if(null!==o.encoder&&void 0!==o.encoder&&"function"!=typeof o.encoder)throw new TypeError("Encoder has to be a function.");var n=void 0===o.delimiter?C.delimiter:o.delimiter,i="boolean"==typeof o.strictNullHandling?o.strictNullHandling:C.strictNullHandling,a="boolean"==typeof o.skipNulls?o.skipNulls:C.skipNulls,c="boolean"==typeof o.encode?o.encode:C.encode,l="function"==typeof o.encoder?o.encoder:C.encoder,s="function"==typeof o.sort?o.sort:null,f=void 0===o.allowDots?C.allowDots:!!o.allowDots,u="function"==typeof o.serializeDate?o.serializeDate:C.serializeDate,p="boolean"==typeof o.encodeValuesOnly?o.encodeValuesOnly:C.encodeValuesOnly,d=o.charset||C.charset;if(void 0!==o.charset&&"utf-8"!==o.charset&&"iso-8859-1"!==o.charset)throw new Error("The charset option must be either utf-8, iso-8859-1, or undefined");if(void 0===o.format)o.format=N.default;else if(!Object.prototype.hasOwnProperty.call(N.formatters,o.format))throw new TypeError("Unknown format option provided.");var y,h,m=N.formatters[o.format];"function"==typeof o.filter?t=(h=o.filter)("",t):Array.isArray(o.filter)&&(y=h=o.filter);var b,g=[];if("object"!=typeof t||null===t)return"";b=o.arrayFormat in D?o.arrayFormat:"indices"in o?o.indices?"indices":"repeat":"indices";var v=D[b];y||(y=Object.keys(t)),s&&y.sort(s);for(var O=0;O<y.length;++O){var j=y[O];a&&null===t[j]||P(g,E(t[j],j,v,i,a,c?l:null,h,s,f,u,m,p,d))}var w=g.join(n),A=!0===o.addQueryPrefix?"?":"";return o.charsetSentinel&&(A+="iso-8859-1"===d?"utf8=%26%2310003%3B&":"utf8=%E2%9C%93&"),0<w.length?A+w:""}},{"./formats":1,"./utils":5}],5:[function(e,r,t){"use strict";var a=Object.prototype.hasOwnProperty,c=function(){for(var e=[],r=0;r<256;++r)e.push("%"+((r<16?"0":"")+r.toString(16)).toUpperCase());return e}(),l=function(e,r){for(var t=r&&r.plainObjects?Object.create(null):{},o=0;o<e.length;++o)void 0!==e[o]&&(t[o]=e[o]);return t};r.exports={arrayToObject:l,assign:function(e,t){return Object.keys(t).reduce(function(e,r){return e[r]=t[r],e},e)},combine:function(e,r){return[].concat(e,r)},compact:function(e){for(var r=[{obj:{o:e},prop:"o"}],t=[],o=0;o<r.length;++o)for(var n=r[o],i=n.obj[n.prop],a=Object.keys(i),c=0;c<a.length;++c){var l=a[c],s=i[l];"object"==typeof s&&null!==s&&-1===t.indexOf(s)&&(r.push({obj:i,prop:l}),t.push(s))}return function(e){for(;1<e.length;){var r=e.pop(),t=r.obj[r.prop];if(Array.isArray(t)){for(var o=[],n=0;n<t.length;++n)void 0!==t[n]&&o.push(t[n]);r.obj[r.prop]=o}}}(r),e},decode:function(e,r,t){var o=e.replace(/\+/g," ");if("iso-8859-1"===t)return o.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(o)}catch(e){return o}},encode:function(e,r,t){if(0===e.length)return e;var o="string"==typeof e?e:String(e);if("iso-8859-1"===t)return escape(o).replace(/%u[0-9a-f]{4}/gi,function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"});for(var n="",i=0;i<o.length;++i){var a=o.charCodeAt(i);45===a||46===a||95===a||126===a||48<=a&&a<=57||65<=a&&a<=90||97<=a&&a<=122?n+=o.charAt(i):a<128?n+=c[a]:a<2048?n+=c[192|a>>6]+c[128|63&a]:a<55296||57344<=a?n+=c[224|a>>12]+c[128|a>>6&63]+c[128|63&a]:(i+=1,a=65536+((1023&a)<<10|1023&o.charCodeAt(i)),n+=c[240|a>>18]+c[128|a>>12&63]+c[128|a>>6&63]+c[128|63&a])}return n},isBuffer:function(e){return null!=e&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},merge:function o(t,n,i){if(!n)return t;if("object"!=typeof n){if(Array.isArray(t))t.push(n);else{if("object"!=typeof t)return[t,n];(i&&(i.plainObjects||i.allowPrototypes)||!a.call(Object.prototype,n))&&(t[n]=!0)}return t}if("object"!=typeof t)return[t].concat(n);var e=t;return Array.isArray(t)&&!Array.isArray(n)&&(e=l(t,i)),Array.isArray(t)&&Array.isArray(n)?(n.forEach(function(e,r){a.call(t,r)?t[r]&&"object"==typeof t[r]?t[r]=o(t[r],e,i):t.push(e):t[r]=e}),t):Object.keys(n).reduce(function(e,r){var t=n[r];return a.call(e,r)?e[r]=o(e[r],t,i):e[r]=t,e},e)}}},{}]},{},[2])(2)});
\ No newline at end of file
/*!
* Vue-Lazyload.js v1.2.6
* (c) 2018 Awe <hilongjw@gmail.com>
* Released under the MIT License.
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.VueLazyload=e()}(this,function(){"use strict";function t(t){return t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}function e(t){t=t||{};var e=arguments.length,i=0;if(1===e)return t;for(;++i<e;){var o=arguments[i];g(t)&&(t=o),r(o)&&n(t,o)}return t}function n(t,n){m(t,n);for(var o in n)if("__proto__"!==o&&i(n,o)){var a=n[o];r(a)?("undefined"===L(t[o])&&"function"===L(a)&&(t[o]=a),t[o]=e(t[o]||{},a)):t[o]=a}return t}function r(t){return"object"===L(t)||"function"===L(t)}function i(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function o(t,e){if(t.length){var n=t.indexOf(e);return n>-1?t.splice(n,1):void 0}}function a(t,e){for(var n=!1,r=0,i=t.length;r<i;r++)if(e(t[r])){n=!0;break}return n}function s(t,e){if("IMG"===t.tagName&&t.getAttribute("data-srcset")){var n=t.getAttribute("data-srcset"),r=[],i=t.parentNode,o=i.offsetWidth*e,a=void 0,s=void 0,u=void 0;n=n.trim().split(","),n.map(function(t){t=t.trim(),a=t.lastIndexOf(" "),-1===a?(s=t,u=999998):(s=t.substr(0,a),u=parseInt(t.substr(a+1,t.length-a-2),10)),r.push([u,s])}),r.sort(function(t,e){if(t[0]<e[0])return-1;if(t[0]>e[0])return 1;if(t[0]===e[0]){if(-1!==e[1].indexOf(".webp",e[1].length-5))return 1;if(-1!==t[1].indexOf(".webp",t[1].length-5))return-1}return 0});for(var l="",d=void 0,c=r.length,h=0;h<c;h++)if(d=r[h],d[0]>=o){l=d[1];break}return l}}function u(t,e){for(var n=void 0,r=0,i=t.length;r<i;r++)if(e(t[r])){n=t[r];break}return n}function l(){if(!E)return!1;var t=!0,e=document;try{var n=e.createElement("object");n.type="image/webp",n.style.visibility="hidden",n.innerHTML="!",e.body.appendChild(n),t=!n.offsetWidth,e.body.removeChild(n)}catch(e){t=!1}return t}function d(t,e){var n=null,r=0;return function(){if(!n){var i=Date.now()-r,o=this,a=arguments,s=function(){r=Date.now(),n=!1,t.apply(o,a)};i>=e?s():n=setTimeout(s,e)}}}function c(t){return null!==t&&"object"===(void 0===t?"undefined":p(t))}function h(t){if(!(t instanceof Object))return[];if(Object.keys)return Object.keys(t);var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);return e}function f(t){for(var e=t.length,n=[],r=0;r<e;r++)n.push(t[r]);return n}function v(){}var p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},b=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},y=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),g=function(t){return null==t||"function"!=typeof t&&"object"!==(void 0===t?"undefined":p(t))},m=function(t,e){if(null===t||void 0===t)throw new TypeError("expected first argument to be an object.");if(void 0===e||"undefined"==typeof Symbol)return t;if("function"!=typeof Object.getOwnPropertySymbols)return t;for(var n=Object.prototype.propertyIsEnumerable,r=Object(t),i=arguments.length,o=0;++o<i;)for(var a=Object(arguments[o]),s=Object.getOwnPropertySymbols(a),u=0;u<s.length;u++){var l=s[u];n.call(a,l)&&(r[l]=a[l])}return r},w=Object.prototype.toString,L=function(e){var n=void 0===e?"undefined":p(e);return"undefined"===n?"undefined":null===e?"null":!0===e||!1===e||e instanceof Boolean?"boolean":"string"===n||e instanceof String?"string":"number"===n||e instanceof Number?"number":"function"===n||e instanceof Function?void 0!==e.constructor.name&&"Generator"===e.constructor.name.slice(0,9)?"generatorfunction":"function":void 0!==Array.isArray&&Array.isArray(e)?"array":e instanceof RegExp?"regexp":e instanceof Date?"date":(n=w.call(e),"[object RegExp]"===n?"regexp":"[object Date]"===n?"date":"[object Arguments]"===n?"arguments":"[object Error]"===n?"error":"[object Promise]"===n?"promise":t(e)?"buffer":"[object Set]"===n?"set":"[object WeakSet]"===n?"weakset":"[object Map]"===n?"map":"[object WeakMap]"===n?"weakmap":"[object Symbol]"===n?"symbol":"[object Map Iterator]"===n?"mapiterator":"[object Set Iterator]"===n?"setiterator":"[object String Iterator]"===n?"stringiterator":"[object Array Iterator]"===n?"arrayiterator":"[object Int8Array]"===n?"int8array":"[object Uint8Array]"===n?"uint8array":"[object Uint8ClampedArray]"===n?"uint8clampedarray":"[object Int16Array]"===n?"int16array":"[object Uint16Array]"===n?"uint16array":"[object Int32Array]"===n?"int32array":"[object Uint32Array]"===n?"uint32array":"[object Float32Array]"===n?"float32array":"[object Float64Array]"===n?"float64array":"object")},_=e,E="undefined"!=typeof window,A=E&&"IntersectionObserver"in window,k={event:"event",observer:"observer"},z=function(){function t(t,e){e=e||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),n}if(E)return"function"==typeof window.CustomEvent?window.CustomEvent:(t.prototype=window.Event.prototype,t)}(),j=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return E?window.devicePixelRatio||t:t},T=function(){if(E){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("test",null,e)}catch(t){}return t}}(),S={on:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];T?t.addEventListener(e,n,{capture:r,passive:!0}):t.addEventListener(e,n,r)},off:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];t.removeEventListener(e,n,r)}},I=function(t,e,n){var r=new Image;r.src=t.src,r.onload=function(){e({naturalHeight:r.naturalHeight,naturalWidth:r.naturalWidth,src:r.src})},r.onerror=function(t){n(t)}},O=function(t,e){return"undefined"!=typeof getComputedStyle?getComputedStyle(t,null).getPropertyValue(e):t.style[e]},$=function(t){return O(t,"overflow")+O(t,"overflow-y")+O(t,"overflow-x")},x=function(t){if(E){if(!(t instanceof HTMLElement))return window;for(var e=t;e&&e!==document.body&&e!==document.documentElement&&e.parentNode;){if(/(scroll|auto)/.test($(e)))return e;e=e.parentNode}return window}},H={},Q=function(){function t(e){var n=e.el,r=e.src,i=e.error,o=e.loading,a=e.bindType,s=e.$parent,u=e.options,l=e.elRenderer;b(this,t),this.el=n,this.src=r,this.error=i,this.loading=o,this.bindType=a,this.attempt=0,this.naturalHeight=0,this.naturalWidth=0,this.options=u,this.rect=null,this.$parent=s,this.elRenderer=l,this.performanceData={init:Date.now(),loadStart:0,loadEnd:0},this.filter(),this.initState(),this.render("loading",!1)}return y(t,[{key:"initState",value:function(){"dataset"in this.el?this.el.dataset.src=this.src:this.el.setAttribute("data-src",this.src),this.state={error:!1,loaded:!1,rendered:!1}}},{key:"record",value:function(t){this.performanceData[t]=Date.now()}},{key:"update",value:function(t){var e=t.src,n=t.loading,r=t.error,i=this.src;this.src=e,this.loading=n,this.error=r,this.filter(),i!==this.src&&(this.attempt=0,this.initState())}},{key:"getRect",value:function(){this.rect=this.el.getBoundingClientRect()}},{key:"checkInView",value:function(){return this.getRect(),this.rect.top<window.innerHeight*this.options.preLoad&&this.rect.bottom>this.options.preLoadTop&&this.rect.left<window.innerWidth*this.options.preLoad&&this.rect.right>0}},{key:"filter",value:function(){var t=this;h(this.options.filter).map(function(e){t.options.filter[e](t,t.options)})}},{key:"renderLoading",value:function(t){var e=this;I({src:this.loading},function(n){e.render("loading",!1),t()},function(){t(),e.options.silent||console.warn("VueLazyload log: load failed with loading image("+e.loading+")")})}},{key:"load",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v;return this.attempt>this.options.attempt-1&&this.state.error?(this.options.silent||console.log("VueLazyload log: "+this.src+" tried too more than "+this.options.attempt+" times"),void e()):this.state.loaded||H[this.src]?(this.state.loaded=!0,e(),this.render("loaded",!0)):void this.renderLoading(function(){t.attempt++,t.record("loadStart"),I({src:t.src},function(n){t.naturalHeight=n.naturalHeight,t.naturalWidth=n.naturalWidth,t.state.loaded=!0,t.state.error=!1,t.record("loadEnd"),t.render("loaded",!1),H[t.src]=1,e()},function(e){!t.options.silent&&console.error(e),t.state.error=!0,t.state.loaded=!1,t.render("error",!1)})})}},{key:"render",value:function(t,e){this.elRenderer(this,t,e)}},{key:"performance",value:function(){var t="loading",e=0;return this.state.loaded&&(t="loaded",e=(this.performanceData.loadEnd-this.performanceData.loadStart)/1e3),this.state.error&&(t="error"),{src:this.src,state:t,time:e}}},{key:"destroy",value:function(){this.el=null,this.src=null,this.error=null,this.loading=null,this.bindType=null,this.attempt=0}}]),t}(),C="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",R=["scroll","wheel","mousewheel","resize","animationend","transitionend","touchmove"],W={rootMargin:"0px",threshold:0},B=function(t){return function(){function e(t){var n=t.preLoad,r=t.error,i=t.throttleWait,o=t.preLoadTop,a=t.dispatchEvent,s=t.loading,u=t.attempt,c=t.silent,h=void 0===c||c,f=t.scale,v=t.listenEvents,p=(t.hasbind,t.filter),y=t.adapter,g=t.observer,m=t.observerOptions;b(this,e),this.version="1.2.6",this.mode=k.event,this.ListenerQueue=[],this.TargetIndex=0,this.TargetQueue=[],this.options={silent:h,dispatchEvent:!!a,throttleWait:i||200,preLoad:n||1.3,preLoadTop:o||0,error:r||C,loading:s||C,attempt:u||3,scale:f||j(f),ListenEvents:v||R,hasbind:!1,supportWebp:l(),filter:p||{},adapter:y||{},observer:!!g,observerOptions:m||W},this._initEvent(),this.lazyLoadHandler=d(this._lazyLoadHandler.bind(this),this.options.throttleWait),this.setMode(this.options.observer?k.observer:k.event)}return y(e,[{key:"config",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_(this.options,t)}},{key:"performance",value:function(){var t=[];return this.ListenerQueue.map(function(e){t.push(e.performance())}),t}},{key:"addLazyBox",value:function(t){this.ListenerQueue.push(t),E&&(this._addListenerTarget(window),this._observer&&this._observer.observe(t.el),t.$el&&t.$el.parentNode&&this._addListenerTarget(t.$el.parentNode))}},{key:"add",value:function(e,n,r){var i=this;if(a(this.ListenerQueue,function(t){return t.el===e}))return this.update(e,n),t.nextTick(this.lazyLoadHandler);var o=this._valueFormatter(n.value),u=o.src,l=o.loading,d=o.error;t.nextTick(function(){u=s(e,i.options.scale)||u,i._observer&&i._observer.observe(e);var o=Object.keys(n.modifiers)[0],a=void 0;o&&(a=r.context.$refs[o],a=a?a.$el||a:document.getElementById(o)),a||(a=x(e));var c=new Q({bindType:n.arg,$parent:a,el:e,loading:l,error:d,src:u,elRenderer:i._elRenderer.bind(i),options:i.options});i.ListenerQueue.push(c),E&&(i._addListenerTarget(window),i._addListenerTarget(a)),i.lazyLoadHandler(),t.nextTick(function(){return i.lazyLoadHandler()})})}},{key:"update",value:function(e,n){var r=this,i=this._valueFormatter(n.value),o=i.src,a=i.loading,l=i.error;o=s(e,this.options.scale)||o;var d=u(this.ListenerQueue,function(t){return t.el===e});d&&d.update({src:o,loading:a,error:l}),this._observer&&(this._observer.unobserve(e),this._observer.observe(e)),this.lazyLoadHandler(),t.nextTick(function(){return r.lazyLoadHandler()})}},{key:"remove",value:function(t){if(t){this._observer&&this._observer.unobserve(t);var e=u(this.ListenerQueue,function(e){return e.el===t});e&&(this._removeListenerTarget(e.$parent),this._removeListenerTarget(window),o(this.ListenerQueue,e)&&e.destroy())}}},{key:"removeComponent",value:function(t){t&&(o(this.ListenerQueue,t),this._observer&&this._observer.unobserve(t.el),t.$parent&&t.$el.parentNode&&this._removeListenerTarget(t.$el.parentNode),this._removeListenerTarget(window))}},{key:"setMode",value:function(t){var e=this;A||t!==k.observer||(t=k.event),this.mode=t,t===k.event?(this._observer&&(this.ListenerQueue.forEach(function(t){e._observer.unobserve(t.el)}),this._observer=null),this.TargetQueue.forEach(function(t){e._initListen(t.el,!0)})):(this.TargetQueue.forEach(function(t){e._initListen(t.el,!1)}),this._initIntersectionObserver())}},{key:"_addListenerTarget",value:function(t){if(t){var e=u(this.TargetQueue,function(e){return e.el===t});return e?e.childrenCount++:(e={el:t,id:++this.TargetIndex,childrenCount:1,listened:!0},this.mode===k.event&&this._initListen(e.el,!0),this.TargetQueue.push(e)),this.TargetIndex}}},{key:"_removeListenerTarget",value:function(t){var e=this;this.TargetQueue.forEach(function(n,r){n.el===t&&(--n.childrenCount||(e._initListen(n.el,!1),e.TargetQueue.splice(r,1),n=null))})}},{key:"_initListen",value:function(t,e){var n=this;this.options.ListenEvents.forEach(function(r){return S[e?"on":"off"](t,r,n.lazyLoadHandler)})}},{key:"_initEvent",value:function(){var t=this;this.Event={listeners:{loading:[],loaded:[],error:[]}},this.$on=function(e,n){t.Event.listeners[e]||(t.Event.listeners[e]=[]),t.Event.listeners[e].push(n)},this.$once=function(e,n){function r(){i.$off(e,r),n.apply(i,arguments)}var i=t;t.$on(e,r)},this.$off=function(e,n){if(!n){if(!t.Event.listeners[e])return;return void(t.Event.listeners[e].length=0)}o(t.Event.listeners[e],n)},this.$emit=function(e,n,r){t.Event.listeners[e]&&t.Event.listeners[e].forEach(function(t){return t(n,r)})}}},{key:"_lazyLoadHandler",value:function(){var t=this,e=[];this.ListenerQueue.forEach(function(t,n){if(!t.state.error&&t.state.loaded)return e.push(t);t.checkInView()&&t.load()}),e.forEach(function(e){return o(t.ListenerQueue,e)})}},{key:"_initIntersectionObserver",value:function(){var t=this;A&&(this._observer=new IntersectionObserver(this._observerHandler.bind(this),this.options.observerOptions),this.ListenerQueue.length&&this.ListenerQueue.forEach(function(e){t._observer.observe(e.el)}))}},{key:"_observerHandler",value:function(t,e){var n=this;t.forEach(function(t){t.isIntersecting&&n.ListenerQueue.forEach(function(e){if(e.el===t.target){if(e.state.loaded)return n._observer.unobserve(e.el);e.load()}})})}},{key:"_elRenderer",value:function(t,e,n){if(t.el){var r=t.el,i=t.bindType,o=void 0;switch(e){case"loading":o=t.loading;break;case"error":o=t.error;break;default:o=t.src}if(i?r.style[i]='url("'+o+'")':r.getAttribute("src")!==o&&r.setAttribute("src",o),r.setAttribute("lazy",e),this.$emit(e,t,n),this.options.adapter[e]&&this.options.adapter[e](t,this.options),this.options.dispatchEvent){var a=new z(e,{detail:t});r.dispatchEvent(a)}}}},{key:"_valueFormatter",value:function(t){var e=t,n=this.options.loading,r=this.options.error;return c(t)&&(t.src||this.options.silent||console.error("Vue Lazyload warning: miss src with "+t),e=t.src,n=t.loading||this.options.loading,r=t.error||this.options.error),{src:e,loading:n,error:r}}}]),e}()},D=function(t){return{props:{tag:{type:String,default:"div"}},render:function(t){return!1===this.show?t(this.tag):t(this.tag,null,this.$slots.default)},data:function(){return{el:null,state:{loaded:!1},rect:{},show:!1}},mounted:function(){this.el=this.$el,t.addLazyBox(this),t.lazyLoadHandler()},beforeDestroy:function(){t.removeComponent(this)},methods:{getRect:function(){this.rect=this.$el.getBoundingClientRect()},checkInView:function(){return this.getRect(),E&&this.rect.top<window.innerHeight*t.options.preLoad&&this.rect.bottom>0&&this.rect.left<window.innerWidth*t.options.preLoad&&this.rect.right>0},load:function(){this.show=!0,this.state.loaded=!0,this.$emit("show",this)}}}},V=function(){function t(e){var n=e.lazy;b(this,t),this.lazy=n,n.lazyContainerMananger=this,this._queue=[]}return y(t,[{key:"bind",value:function(t,e,n){var r=new N({el:t,binding:e,vnode:n,lazy:this.lazy});this._queue.push(r)}},{key:"update",value:function(t,e,n){var r=u(this._queue,function(e){return e.el===t});r&&r.update({el:t,binding:e,vnode:n})}},{key:"unbind",value:function(t,e,n){var r=u(this._queue,function(e){return e.el===t});r&&(r.clear(),o(this._queue,r))}}]),t}(),M={selector:"img"},N=function(){function t(e){var n=e.el,r=e.binding,i=e.vnode,o=e.lazy;b(this,t),this.el=null,this.vnode=i,this.binding=r,this.options={},this.lazy=o,this._queue=[],this.update({el:n,binding:r})}return y(t,[{key:"update",value:function(t){var e=this,n=t.el,r=t.binding;this.el=n,this.options=_({},M,r.value),this.getImgs().forEach(function(t){e.lazy.add(t,_({},e.binding,{value:{src:"dataset"in t?t.dataset.src:t.getAttribute("data-src"),error:"dataset"in t?t.dataset.error:t.getAttribute("data-error"),loading:"dataset"in t?t.dataset.loading:t.getAttribute("data-loading")}}),e.vnode)})}},{key:"getImgs",value:function(){return f(this.el.querySelectorAll(this.options.selector))}},{key:"clear",value:function(){var t=this;this.getImgs().forEach(function(e){return t.lazy.remove(e)}),this.vnode=null,this.binding=null,this.lazy=null}}]),t}(),P=function(t){return{props:{src:[String,Object],tag:{type:String,default:"img"}},render:function(t){return t(this.tag,{attrs:{src:this.renderSrc}},this.$slots.default)},data:function(){return{el:null,options:{src:"",error:"",loading:"",attempt:t.options.attempt},state:{loaded:!1,error:!1,attempt:0},rect:{},renderSrc:""}},watch:{src:function(){this.init(),t.addLazyBox(this),t.lazyLoadHandler()}},created:function(){this.init(),this.renderSrc=this.options.loading},mounted:function(){this.el=this.$el,t.addLazyBox(this),t.lazyLoadHandler()},beforeDestroy:function(){t.removeComponent(this)},methods:{init:function(){var e=t._valueFormatter(this.src),n=e.src,r=e.loading,i=e.error;this.state.loaded=!1,this.options.src=n,this.options.error=i,this.options.loading=r,this.renderSrc=this.options.loading},getRect:function(){this.rect=this.$el.getBoundingClientRect()},checkInView:function(){return this.getRect(),E&&this.rect.top<window.innerHeight*t.options.preLoad&&this.rect.bottom>0&&this.rect.left<window.innerWidth*t.options.preLoad&&this.rect.right>0},load:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v;if(this.state.attempt>this.options.attempt-1&&this.state.error)return t.options.silent||console.log("VueLazyload log: "+this.options.src+" tried too more than "+this.options.attempt+" times"),void n();var r=this.options.src;I({src:r},function(t){var n=t.src;e.renderSrc=n,e.state.loaded=!0},function(t){e.state.attempt++,e.renderSrc=e.options.error,e.state.error=!0})}}}};return{install:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=B(t),r=new n(e),i=new V({lazy:r}),o="2"===t.version.split(".")[0];t.prototype.$Lazyload=r,e.lazyComponent&&t.component("lazy-component",D(r)),e.lazyImage&&t.component("lazy-image",P(r)),o?(t.directive("lazy",{bind:r.add.bind(r),update:r.update.bind(r),componentUpdated:r.lazyLoadHandler.bind(r),unbind:r.remove.bind(r)}),t.directive("lazy-container",{bind:i.bind.bind(i),update:i.update.bind(i),unbind:i.unbind.bind(i)})):(t.directive("lazy",{bind:r.lazyLoadHandler.bind(r),update:function(t,e){_(this.vm.$refs,this.vm.$els),r.add(this.el,{modifiers:this.modifiers||{},arg:this.arg,value:t,oldValue:e},{context:this.vm})},unbind:function(){r.remove(this.el)}}),t.directive("lazy-container",{update:function(t,e){i.update(this.el,{modifiers:this.modifiers||{},arg:this.arg,value:t,oldValue:e},{context:this.vm})},unbind:function(){i.unbind(this.el)}}))}}});
This diff is collapsed.
/**
* vuex v3.1.0
* (c) 2019 Evan You
* @license MIT
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Vuex=e()}(this,function(){"use strict";var u="undefined"!=typeof window&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function a(e,n){Object.keys(e).forEach(function(t){return n(e[t],t)})}var r=function(t,e){this.runtime=e,this._children=Object.create(null);var n=(this._rawModule=t).state;this.state=("function"==typeof n?n():n)||{}},t={namespaced:{configurable:!0}};t.namespaced.get=function(){return!!this._rawModule.namespaced},r.prototype.addChild=function(t,e){this._children[t]=e},r.prototype.removeChild=function(t){delete this._children[t]},r.prototype.getChild=function(t){return this._children[t]},r.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)},r.prototype.forEachChild=function(t){a(this._children,t)},r.prototype.forEachGetter=function(t){this._rawModule.getters&&a(this._rawModule.getters,t)},r.prototype.forEachAction=function(t){this._rawModule.actions&&a(this._rawModule.actions,t)},r.prototype.forEachMutation=function(t){this._rawModule.mutations&&a(this._rawModule.mutations,t)},Object.defineProperties(r.prototype,t);var m,f=function(t){this.register([],t,!1)};f.prototype.get=function(t){return t.reduce(function(t,e){return t.getChild(e)},this.root)},f.prototype.getNamespace=function(t){var n=this.root;return t.reduce(function(t,e){return t+((n=n.getChild(e)).namespaced?e+"/":"")},"")},f.prototype.update=function(t){!function t(e,n,o){n.update(o);if(o.modules)for(var i in o.modules){if(!n.getChild(i))return;t(e.concat(i),n.getChild(i),o.modules[i])}}([],this.root,t)},f.prototype.register=function(n,t,o){var i=this;void 0===o&&(o=!0);var e=new r(t,o);0===n.length?this.root=e:this.get(n.slice(0,-1)).addChild(n[n.length-1],e);t.modules&&a(t.modules,function(t,e){i.register(n.concat(e),t,o)})},f.prototype.unregister=function(t){var e=this.get(t.slice(0,-1)),n=t[t.length-1];e.getChild(n).runtime&&e.removeChild(n)};var e=function(t){var e=this;void 0===t&&(t={}),!m&&"undefined"!=typeof window&&window.Vue&&p(window.Vue);var n=t.plugins;void 0===n&&(n=[]);var o=t.strict;void 0===o&&(o=!1),this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new f(t),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new m;var i=this,r=this.dispatch,s=this.commit;this.dispatch=function(t,e){return r.call(i,t,e)},this.commit=function(t,e,n){return s.call(i,t,e,n)},this.strict=o;var a,c=this._modules.root.state;v(this,c,[],this._modules.root),h(this,c),n.forEach(function(t){return t(e)}),(void 0!==t.devtools?t.devtools:m.config.devtools)&&(a=this,u&&((a._devtoolHook=u).emit("vuex:init",a),u.on("vuex:travel-to-state",function(t){a.replaceState(t)}),a.subscribe(function(t,e){u.emit("vuex:mutation",t,e)})))},n={state:{configurable:!0}};function o(e,n){return n.indexOf(e)<0&&n.push(e),function(){var t=n.indexOf(e);-1<t&&n.splice(t,1)}}function i(t,e){t._actions=Object.create(null),t._mutations=Object.create(null),t._wrappedGetters=Object.create(null),t._modulesNamespaceMap=Object.create(null);var n=t.state;v(t,n,[],t._modules.root,!0),h(t,n,e)}function h(n,t,e){var o=n._vm;n.getters={};var i=n._wrappedGetters,r={};a(i,function(t,e){r[e]=function(){return t(n)},Object.defineProperty(n.getters,e,{get:function(){return n._vm[e]},enumerable:!0})});var s=m.config.silent;m.config.silent=!0,n._vm=new m({data:{$$state:t},computed:r}),m.config.silent=s,n.strict&&n._vm.$watch(function(){return this._data.$$state},function(){},{deep:!0,sync:!0}),o&&(e&&n._withCommit(function(){o._data.$$state=null}),m.nextTick(function(){return o.$destroy()}))}function v(c,n,o,t,i){var e=!o.length,u=c._modules.getNamespace(o);if(t.namespaced&&(c._modulesNamespaceMap[u]=t),!e&&!i){var r=_(n,o.slice(0,-1)),s=o[o.length-1];c._withCommit(function(){m.set(r,s,t.state)})}var a,f,h,p,l,d=t.context=(a=c,h=o,l={dispatch:(p=""===(f=u))?a.dispatch:function(t,e,n){var o=y(t,e,n),i=o.payload,r=o.options,s=o.type;return r&&r.root||(s=f+s),a.dispatch(s,i)},commit:p?a.commit:function(t,e,n){var o=y(t,e,n),i=o.payload,r=o.options,s=o.type;r&&r.root||(s=f+s),a.commit(s,i,r)}},Object.defineProperties(l,{getters:{get:p?function(){return a.getters}:function(){return n=a,i={},r=(o=f).length,Object.keys(n.getters).forEach(function(t){if(t.slice(0,r)===o){var e=t.slice(r);Object.defineProperty(i,e,{get:function(){return n.getters[t]},enumerable:!0})}}),i;var n,o,i,r}},state:{get:function(){return _(a.state,h)}}}),l);t.forEachMutation(function(t,e){var n,o,i,r;o=u+e,i=t,r=d,((n=c)._mutations[o]||(n._mutations[o]=[])).push(function(t){i.call(n,r.state,t)})}),t.forEachAction(function(t,e){var i,n,r,s,o=t.root?e:u+e,a=t.handler||t;n=o,r=a,s=d,((i=c)._actions[n]||(i._actions[n]=[])).push(function(t,e){var n,o=r.call(i,{dispatch:s.dispatch,commit:s.commit,getters:s.getters,state:s.state,rootGetters:i.getters,rootState:i.state},t,e);return(n=o)&&"function"==typeof n.then||(o=Promise.resolve(o)),i._devtoolHook?o.catch(function(t){throw i._devtoolHook.emit("vuex:error",t),t}):o})}),t.forEachGetter(function(t,e){!function(t,e,n,o){if(t._wrappedGetters[e])return;t._wrappedGetters[e]=function(t){return n(o.state,o.getters,t.state,t.getters)}}(c,u+e,t,d)}),t.forEachChild(function(t,e){v(c,n,o.concat(e),t,i)})}function _(t,e){return e.length?e.reduce(function(t,e){return t[e]},t):t}function y(t,e,n){var o;return null!==(o=t)&&"object"==typeof o&&t.type&&(n=e,t=(e=t).type),{type:t,payload:e,options:n}}function p(t){m&&t===m||function(t){if(2<=Number(t.version.split(".")[0]))t.mixin({beforeCreate:n});else{var e=t.prototype._init;t.prototype._init=function(t){void 0===t&&(t={}),t.init=t.init?[n].concat(t.init):n,e.call(this,t)}}function n(){var t=this.$options;t.store?this.$store="function"==typeof t.store?t.store():t.store:t.parent&&t.parent.$store&&(this.$store=t.parent.$store)}}(m=t)}n.state.get=function(){return this._vm._data.$$state},n.state.set=function(t){},e.prototype.commit=function(t,e,n){var o=this,i=y(t,e,n),r=i.type,s=i.payload,a={type:r,payload:s},c=this._mutations[r];c&&(this._withCommit(function(){c.forEach(function(t){t(s)})}),this._subscribers.forEach(function(t){return t(a,o.state)}))},e.prototype.dispatch=function(t,e){var n=this,o=y(t,e),i=o.type,r=o.payload,s={type:i,payload:r},a=this._actions[i];if(a){try{this._actionSubscribers.filter(function(t){return t.before}).forEach(function(t){return t.before(s,n.state)})}catch(t){}return(1<a.length?Promise.all(a.map(function(t){return t(r)})):a[0](r)).then(function(t){try{n._actionSubscribers.filter(function(t){return t.after}).forEach(function(t){return t.after(s,n.state)})}catch(t){}return t})}},e.prototype.subscribe=function(t){return o(t,this._subscribers)},e.prototype.subscribeAction=function(t){return o("function"==typeof t?{before:t}:t,this._actionSubscribers)},e.prototype.watch=function(t,e,n){var o=this;return this._watcherVM.$watch(function(){return t(o.state,o.getters)},e,n)},e.prototype.replaceState=function(t){var e=this;this._withCommit(function(){e._vm._data.$$state=t})},e.prototype.registerModule=function(t,e,n){void 0===n&&(n={}),"string"==typeof t&&(t=[t]),this._modules.register(t,e),v(this,this.state,t,this._modules.get(t),n.preserveState),h(this,this.state)},e.prototype.unregisterModule=function(e){var n=this;"string"==typeof e&&(e=[e]),this._modules.unregister(e),this._withCommit(function(){var t=_(n.state,e.slice(0,-1));m.delete(t,e[e.length-1])}),i(this)},e.prototype.hotUpdate=function(t){this._modules.update(t),i(this,!0)},e.prototype._withCommit=function(t){var e=this._committing;this._committing=!0,t(),this._committing=e},Object.defineProperties(e.prototype,n);var s=b(function(i,t){var n={};return g(t).forEach(function(t){var e=t.key,o=t.val;n[e]=function(){var t=this.$store.state,e=this.$store.getters;if(i){var n=w(this.$store,"mapState",i);if(!n)return;t=n.context.state,e=n.context.getters}return"function"==typeof o?o.call(this,t,e):t[o]},n[e].vuex=!0}),n}),c=b(function(r,t){var n={};return g(t).forEach(function(t){var e=t.key,i=t.val;n[e]=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var n=this.$store.commit;if(r){var o=w(this.$store,"mapMutations",r);if(!o)return;n=o.context.commit}return"function"==typeof i?i.apply(this,[n].concat(t)):n.apply(this.$store,[i].concat(t))}}),n}),l=b(function(o,t){var i={};return g(t).forEach(function(t){var e=t.key,n=t.val;n=o+n,i[e]=function(){if(!o||w(this.$store,"mapGetters",o))return this.$store.getters[n]},i[e].vuex=!0}),i}),d=b(function(r,t){var n={};return g(t).forEach(function(t){var e=t.key,i=t.val;n[e]=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var n=this.$store.dispatch;if(r){var o=w(this.$store,"mapActions",r);if(!o)return;n=o.context.dispatch}return"function"==typeof i?i.apply(this,[n].concat(t)):n.apply(this.$store,[i].concat(t))}}),n});function g(e){return Array.isArray(e)?e.map(function(t){return{key:t,val:t}}):Object.keys(e).map(function(t){return{key:t,val:e[t]}})}function b(n){return function(t,e){return"string"!=typeof t?(e=t,t=""):"/"!==t.charAt(t.length-1)&&(t+="/"),n(t,e)}}function w(t,e,n){return t._modulesNamespaceMap[n]}return{Store:e,install:p,version:"3.1.0",mapState:s,mapMutations:c,mapGetters:l,mapActions:d,createNamespacedHelpers:function(t){return{mapState:s.bind(null,t),mapGetters:l.bind(null,t),mapMutations:c.bind(null,t),mapActions:d.bind(null,t)}}}});
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment