mirror of
https://github.com/mindoc-org/mindoc.git
synced 2025-05-07 07:13:41 +08:00
1532 lines
38 KiB
JavaScript
1532 lines
38 KiB
JavaScript
module.exports =
|
|
/******/ (function(modules) { // webpackBootstrap
|
|
/******/ // The module cache
|
|
/******/ var installedModules = {};
|
|
|
|
/******/ // The require function
|
|
/******/ function __webpack_require__(moduleId) {
|
|
|
|
/******/ // Check if module is in cache
|
|
/******/ if(installedModules[moduleId])
|
|
/******/ return installedModules[moduleId].exports;
|
|
|
|
/******/ // Create a new module (and put it into the cache)
|
|
/******/ var module = installedModules[moduleId] = {
|
|
/******/ exports: {},
|
|
/******/ id: moduleId,
|
|
/******/ loaded: false
|
|
/******/ };
|
|
|
|
/******/ // Execute the module function
|
|
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
|
|
/******/ // Flag the module as loaded
|
|
/******/ module.loaded = true;
|
|
|
|
/******/ // Return the exports of the module
|
|
/******/ return module.exports;
|
|
/******/ }
|
|
|
|
|
|
/******/ // expose the modules object (__webpack_modules__)
|
|
/******/ __webpack_require__.m = modules;
|
|
|
|
/******/ // expose the module cache
|
|
/******/ __webpack_require__.c = installedModules;
|
|
|
|
/******/ // __webpack_public_path__
|
|
/******/ __webpack_require__.p = "/dist/";
|
|
|
|
/******/ // Load entry module and return exports
|
|
/******/ return __webpack_require__(0);
|
|
/******/ })
|
|
/************************************************************************/
|
|
/******/ ({
|
|
|
|
/***/ 0:
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
module.exports = __webpack_require__(342);
|
|
|
|
|
|
/***/ },
|
|
|
|
/***/ 3:
|
|
/***/ function(module, exports) {
|
|
|
|
module.exports = function normalizeComponent (
|
|
rawScriptExports,
|
|
compiledTemplate,
|
|
scopeId,
|
|
cssModules
|
|
) {
|
|
var esModule
|
|
var scriptExports = rawScriptExports = rawScriptExports || {}
|
|
|
|
// ES6 modules interop
|
|
var type = typeof rawScriptExports.default
|
|
if (type === 'object' || type === 'function') {
|
|
esModule = rawScriptExports
|
|
scriptExports = rawScriptExports.default
|
|
}
|
|
|
|
// Vue.extend constructor export interop
|
|
var options = typeof scriptExports === 'function'
|
|
? scriptExports.options
|
|
: scriptExports
|
|
|
|
// render functions
|
|
if (compiledTemplate) {
|
|
options.render = compiledTemplate.render
|
|
options.staticRenderFns = compiledTemplate.staticRenderFns
|
|
}
|
|
|
|
// scopedId
|
|
if (scopeId) {
|
|
options._scopeId = scopeId
|
|
}
|
|
|
|
// inject cssModules
|
|
if (cssModules) {
|
|
var computed = options.computed || (options.computed = {})
|
|
Object.keys(cssModules).forEach(function (key) {
|
|
var module = cssModules[key]
|
|
computed[key] = function () { return module }
|
|
})
|
|
}
|
|
|
|
return {
|
|
esModule: esModule,
|
|
exports: scriptExports,
|
|
options: options
|
|
}
|
|
}
|
|
|
|
|
|
/***/ },
|
|
|
|
/***/ 14:
|
|
/***/ function(module, exports) {
|
|
|
|
module.exports = require("element-ui/lib/mixins/emitter");
|
|
|
|
/***/ },
|
|
|
|
/***/ 61:
|
|
/***/ function(module, exports) {
|
|
|
|
module.exports = require("element-ui/lib/locale");
|
|
|
|
/***/ },
|
|
|
|
/***/ 80:
|
|
/***/ function(module, exports) {
|
|
|
|
module.exports = require("element-ui/lib/transitions/collapse-transition");
|
|
|
|
/***/ },
|
|
|
|
/***/ 164:
|
|
/***/ function(module, exports) {
|
|
|
|
module.exports = require("element-ui/lib/utils/merge");
|
|
|
|
/***/ },
|
|
|
|
/***/ 304:
|
|
/***/ function(module, exports) {
|
|
|
|
module.exports = require("element-ui/lib/checkbox");
|
|
|
|
/***/ },
|
|
|
|
/***/ 342:
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
exports.__esModule = true;
|
|
|
|
var _tree = __webpack_require__(343);
|
|
|
|
var _tree2 = _interopRequireDefault(_tree);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
/* istanbul ignore next */
|
|
_tree2.default.install = function (Vue) {
|
|
Vue.component(_tree2.default.name, _tree2.default);
|
|
};
|
|
|
|
exports.default = _tree2.default;
|
|
|
|
/***/ },
|
|
|
|
/***/ 343:
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var Component = __webpack_require__(3)(
|
|
/* script */
|
|
__webpack_require__(344),
|
|
/* template */
|
|
__webpack_require__(351),
|
|
/* scopeId */
|
|
null,
|
|
/* cssModules */
|
|
null
|
|
)
|
|
|
|
module.exports = Component.exports
|
|
|
|
|
|
/***/ },
|
|
|
|
/***/ 344:
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
exports.__esModule = true;
|
|
|
|
var _treeStore = __webpack_require__(345);
|
|
|
|
var _treeStore2 = _interopRequireDefault(_treeStore);
|
|
|
|
var _locale = __webpack_require__(61);
|
|
|
|
var _emitter = __webpack_require__(14);
|
|
|
|
var _emitter2 = _interopRequireDefault(_emitter);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
exports.default = {
|
|
name: 'ElTree',
|
|
|
|
mixins: [_emitter2.default],
|
|
|
|
components: {
|
|
ElTreeNode: __webpack_require__(348)
|
|
},
|
|
|
|
data: function data() {
|
|
return {
|
|
store: null,
|
|
root: null,
|
|
currentNode: null
|
|
};
|
|
},
|
|
|
|
|
|
props: {
|
|
data: {
|
|
type: Array
|
|
},
|
|
emptyText: {
|
|
type: String,
|
|
default: function _default() {
|
|
return (0, _locale.t)('el.tree.emptyText');
|
|
}
|
|
},
|
|
nodeKey: String,
|
|
checkStrictly: Boolean,
|
|
defaultExpandAll: Boolean,
|
|
expandOnClickNode: {
|
|
type: Boolean,
|
|
default: true
|
|
},
|
|
autoExpandParent: {
|
|
type: Boolean,
|
|
default: true
|
|
},
|
|
defaultCheckedKeys: Array,
|
|
defaultExpandedKeys: Array,
|
|
renderContent: Function,
|
|
showCheckbox: {
|
|
type: Boolean,
|
|
default: false
|
|
},
|
|
props: {
|
|
default: function _default() {
|
|
return {
|
|
children: 'children',
|
|
label: 'label',
|
|
icon: 'icon'
|
|
};
|
|
}
|
|
},
|
|
lazy: {
|
|
type: Boolean,
|
|
default: false
|
|
},
|
|
highlightCurrent: Boolean,
|
|
currentNodeKey: [String, Number],
|
|
load: Function,
|
|
filterNodeMethod: Function,
|
|
accordion: Boolean,
|
|
indent: {
|
|
type: Number,
|
|
default: 16
|
|
}
|
|
},
|
|
|
|
computed: {
|
|
children: {
|
|
set: function set(value) {
|
|
this.data = value;
|
|
},
|
|
get: function get() {
|
|
return this.data;
|
|
}
|
|
}
|
|
},
|
|
|
|
watch: {
|
|
defaultCheckedKeys: function defaultCheckedKeys(newVal) {
|
|
this.store.defaultCheckedKeys = newVal;
|
|
this.store.setDefaultCheckedKey(newVal);
|
|
},
|
|
defaultExpandedKeys: function defaultExpandedKeys(newVal) {
|
|
this.store.defaultExpandedKeys = newVal;
|
|
this.store.setDefaultExpandedKeys(newVal);
|
|
},
|
|
currentNodeKey: function currentNodeKey(newVal) {
|
|
this.store.setCurrentNodeKey(newVal);
|
|
this.store.currentNodeKey = newVal;
|
|
},
|
|
data: function data(newVal) {
|
|
this.store.setData(newVal);
|
|
}
|
|
},
|
|
|
|
methods: {
|
|
filter: function filter(value) {
|
|
if (!this.filterNodeMethod) throw new Error('[Tree] filterNodeMethod is required when filter');
|
|
this.store.filter(value);
|
|
},
|
|
getNodeKey: function getNodeKey(node, index) {
|
|
var nodeKey = this.nodeKey;
|
|
if (nodeKey && node) {
|
|
return node.data[nodeKey];
|
|
}
|
|
return index;
|
|
},
|
|
getCheckedNodes: function getCheckedNodes(leafOnly) {
|
|
return this.store.getCheckedNodes(leafOnly);
|
|
},
|
|
getCheckedKeys: function getCheckedKeys(leafOnly) {
|
|
return this.store.getCheckedKeys(leafOnly);
|
|
},
|
|
setCheckedNodes: function setCheckedNodes(nodes, leafOnly) {
|
|
if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in setCheckedNodes');
|
|
this.store.setCheckedNodes(nodes, leafOnly);
|
|
},
|
|
setCheckedKeys: function setCheckedKeys(keys, leafOnly) {
|
|
if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in setCheckedNodes');
|
|
this.store.setCheckedKeys(keys, leafOnly);
|
|
},
|
|
setChecked: function setChecked(data, checked, deep) {
|
|
this.store.setChecked(data, checked, deep);
|
|
},
|
|
handleNodeExpand: function handleNodeExpand(nodeData, node, instance) {
|
|
this.broadcast('ElTreeNode', 'tree-node-expand', node);
|
|
this.$emit('node-expand', nodeData, node, instance);
|
|
}
|
|
},
|
|
|
|
created: function created() {
|
|
this.isTree = true;
|
|
|
|
this.store = new _treeStore2.default({
|
|
key: this.nodeKey,
|
|
data: this.data,
|
|
lazy: this.lazy,
|
|
props: this.props,
|
|
load: this.load,
|
|
currentNodeKey: this.currentNodeKey,
|
|
checkStrictly: this.checkStrictly,
|
|
defaultCheckedKeys: this.defaultCheckedKeys,
|
|
defaultExpandedKeys: this.defaultExpandedKeys,
|
|
autoExpandParent: this.autoExpandParent,
|
|
defaultExpandAll: this.defaultExpandAll,
|
|
filterNodeMethod: this.filterNodeMethod
|
|
});
|
|
|
|
this.root = this.store.root;
|
|
}
|
|
}; //
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
/***/ },
|
|
|
|
/***/ 345:
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
exports.__esModule = true;
|
|
|
|
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
|
|
|
var _node = __webpack_require__(346);
|
|
|
|
var _node2 = _interopRequireDefault(_node);
|
|
|
|
var _util = __webpack_require__(347);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
|
|
var TreeStore = function () {
|
|
function TreeStore(options) {
|
|
var _this = this;
|
|
|
|
_classCallCheck(this, TreeStore);
|
|
|
|
this.currentNode = null;
|
|
this.currentNodeKey = null;
|
|
|
|
for (var option in options) {
|
|
if (options.hasOwnProperty(option)) {
|
|
this[option] = options[option];
|
|
}
|
|
}
|
|
|
|
this.nodesMap = {};
|
|
|
|
this.root = new _node2.default({
|
|
data: this.data,
|
|
store: this
|
|
});
|
|
|
|
if (this.lazy && this.load) {
|
|
var loadFn = this.load;
|
|
loadFn(this.root, function (data) {
|
|
_this.root.doCreateChildren(data);
|
|
_this._initDefaultCheckedNodes();
|
|
});
|
|
} else {
|
|
this._initDefaultCheckedNodes();
|
|
}
|
|
}
|
|
|
|
TreeStore.prototype.filter = function filter(value) {
|
|
var filterNodeMethod = this.filterNodeMethod;
|
|
var traverse = function traverse(node) {
|
|
var childNodes = node.root ? node.root.childNodes : node.childNodes;
|
|
|
|
childNodes.forEach(function (child) {
|
|
child.visible = filterNodeMethod.call(child, value, child.data, child);
|
|
|
|
traverse(child);
|
|
});
|
|
|
|
if (!node.visible && childNodes.length) {
|
|
var allHidden = true;
|
|
|
|
childNodes.forEach(function (child) {
|
|
if (child.visible) allHidden = false;
|
|
});
|
|
|
|
if (node.root) {
|
|
node.root.visible = allHidden === false;
|
|
} else {
|
|
node.visible = allHidden === false;
|
|
}
|
|
}
|
|
|
|
if (node.visible && !node.isLeaf) node.expand();
|
|
};
|
|
|
|
traverse(this);
|
|
};
|
|
|
|
TreeStore.prototype.setData = function setData(newVal) {
|
|
var instanceChanged = newVal !== this.root.data;
|
|
this.root.setData(newVal);
|
|
if (instanceChanged) {
|
|
this._initDefaultCheckedNodes();
|
|
}
|
|
};
|
|
|
|
TreeStore.prototype.getNode = function getNode(data) {
|
|
var key = (typeof data === 'undefined' ? 'undefined' : _typeof(data)) !== 'object' ? data : (0, _util.getNodeKey)(this.key, data);
|
|
return this.nodesMap[key];
|
|
};
|
|
|
|
TreeStore.prototype.insertBefore = function insertBefore(data, refData) {
|
|
var refNode = this.getNode(refData);
|
|
refNode.parent.insertBefore({ data: data }, refNode);
|
|
};
|
|
|
|
TreeStore.prototype.insertAfter = function insertAfter(data, refData) {
|
|
var refNode = this.getNode(refData);
|
|
refNode.parent.insertAfter({ data: data }, refNode);
|
|
};
|
|
|
|
TreeStore.prototype.remove = function remove(data) {
|
|
var node = this.getNode(data);
|
|
if (node) {
|
|
node.parent.removeChild(node);
|
|
}
|
|
};
|
|
|
|
TreeStore.prototype.append = function append(data, parentData) {
|
|
var parentNode = parentData ? this.getNode(parentData) : this.root;
|
|
|
|
if (parentNode) {
|
|
parentNode.insertChild({ data: data });
|
|
}
|
|
};
|
|
|
|
TreeStore.prototype._initDefaultCheckedNodes = function _initDefaultCheckedNodes() {
|
|
var _this2 = this;
|
|
|
|
var defaultCheckedKeys = this.defaultCheckedKeys || [];
|
|
var nodesMap = this.nodesMap;
|
|
|
|
defaultCheckedKeys.forEach(function (checkedKey) {
|
|
var node = nodesMap[checkedKey];
|
|
|
|
if (node) {
|
|
node.setChecked(true, !_this2.checkStrictly);
|
|
}
|
|
});
|
|
};
|
|
|
|
TreeStore.prototype._initDefaultCheckedNode = function _initDefaultCheckedNode(node) {
|
|
var defaultCheckedKeys = this.defaultCheckedKeys || [];
|
|
|
|
if (defaultCheckedKeys.indexOf(node.key) !== -1) {
|
|
node.setChecked(true, !this.checkStrictly);
|
|
}
|
|
};
|
|
|
|
TreeStore.prototype.setDefaultCheckedKey = function setDefaultCheckedKey(newVal) {
|
|
if (newVal !== this.defaultCheckedKeys) {
|
|
this.defaultCheckedKeys = newVal;
|
|
this._initDefaultCheckedNodes();
|
|
}
|
|
};
|
|
|
|
TreeStore.prototype.registerNode = function registerNode(node) {
|
|
var key = this.key;
|
|
if (!key || !node || !node.data) return;
|
|
|
|
var nodeKey = node.key;
|
|
if (nodeKey) this.nodesMap[node.key] = node;
|
|
};
|
|
|
|
TreeStore.prototype.deregisterNode = function deregisterNode(node) {
|
|
var key = this.key;
|
|
if (!key || !node || !node.data) return;
|
|
|
|
delete this.nodesMap[node.key];
|
|
};
|
|
|
|
TreeStore.prototype.getCheckedNodes = function getCheckedNodes() {
|
|
var leafOnly = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
|
|
var checkedNodes = [];
|
|
var traverse = function traverse(node) {
|
|
var childNodes = node.root ? node.root.childNodes : node.childNodes;
|
|
|
|
childNodes.forEach(function (child) {
|
|
if (!leafOnly && child.checked || leafOnly && child.isLeaf && child.checked) {
|
|
checkedNodes.push(child.data);
|
|
}
|
|
|
|
traverse(child);
|
|
});
|
|
};
|
|
|
|
traverse(this);
|
|
|
|
return checkedNodes;
|
|
};
|
|
|
|
TreeStore.prototype.getCheckedKeys = function getCheckedKeys() {
|
|
var leafOnly = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
|
|
var key = this.key;
|
|
var allNodes = this._getAllNodes();
|
|
var keys = [];
|
|
allNodes.forEach(function (node) {
|
|
if (!leafOnly || leafOnly && node.isLeaf) {
|
|
if (node.checked) {
|
|
keys.push((node.data || {})[key]);
|
|
}
|
|
}
|
|
});
|
|
return keys;
|
|
};
|
|
|
|
TreeStore.prototype._getAllNodes = function _getAllNodes() {
|
|
var allNodes = [];
|
|
var nodesMap = this.nodesMap;
|
|
for (var nodeKey in nodesMap) {
|
|
if (nodesMap.hasOwnProperty(nodeKey)) {
|
|
allNodes.push(nodesMap[nodeKey]);
|
|
}
|
|
}
|
|
|
|
return allNodes;
|
|
};
|
|
|
|
TreeStore.prototype._setCheckedKeys = function _setCheckedKeys(key) {
|
|
var _this3 = this;
|
|
|
|
var leafOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
var checkedKeys = arguments[2];
|
|
|
|
var allNodes = this._getAllNodes();
|
|
allNodes.sort(function (a, b) {
|
|
return a.level < b.level;
|
|
});
|
|
|
|
var keys = Object.keys(checkedKeys);
|
|
allNodes.forEach(function (node) {
|
|
var checked = keys.indexOf(node.data[key] + '') > -1;
|
|
|
|
if (!node.isLeaf) {
|
|
if (!_this3.checkStrictly) {
|
|
var childNodes = node.childNodes;
|
|
|
|
var all = true;
|
|
var none = true;
|
|
|
|
for (var i = 0, j = childNodes.length; i < j; i++) {
|
|
var child = childNodes[i];
|
|
if (child.checked !== true || child.indeterminate) {
|
|
all = false;
|
|
}
|
|
if (child.checked !== false || child.indeterminate) {
|
|
none = false;
|
|
}
|
|
}
|
|
|
|
if (all) {
|
|
node.setChecked(true, !_this3.checkStrictly);
|
|
} else if (!all && !none) {
|
|
checked = checked ? true : 'half';
|
|
node.setChecked(checked, !_this3.checkStrictly && checked === true);
|
|
} else if (none) {
|
|
node.setChecked(checked, !_this3.checkStrictly);
|
|
}
|
|
} else {
|
|
node.setChecked(checked, false);
|
|
}
|
|
|
|
if (leafOnly) {
|
|
(function () {
|
|
node.setChecked(false, false);
|
|
var traverse = function traverse(node) {
|
|
var childNodes = node.childNodes;
|
|
|
|
childNodes.forEach(function (child) {
|
|
if (!child.isLeaf) {
|
|
child.setChecked(false, false);
|
|
}
|
|
traverse(child);
|
|
});
|
|
};
|
|
|
|
traverse(node);
|
|
})();
|
|
}
|
|
} else {
|
|
node.setChecked(checked, false);
|
|
}
|
|
});
|
|
};
|
|
|
|
TreeStore.prototype.setCheckedNodes = function setCheckedNodes(array) {
|
|
var leafOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
|
|
var key = this.key;
|
|
var checkedKeys = {};
|
|
array.forEach(function (item) {
|
|
checkedKeys[(item || {})[key]] = true;
|
|
});
|
|
|
|
this._setCheckedKeys(key, leafOnly, checkedKeys);
|
|
};
|
|
|
|
TreeStore.prototype.setCheckedKeys = function setCheckedKeys(keys) {
|
|
var leafOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
|
|
this.defaultCheckedKeys = keys;
|
|
var key = this.key;
|
|
var checkedKeys = {};
|
|
keys.forEach(function (key) {
|
|
checkedKeys[key] = true;
|
|
});
|
|
|
|
this._setCheckedKeys(key, leafOnly, checkedKeys);
|
|
};
|
|
|
|
TreeStore.prototype.setDefaultExpandedKeys = function setDefaultExpandedKeys(keys) {
|
|
var _this4 = this;
|
|
|
|
keys = keys || [];
|
|
this.defaultExpandedKeys = keys;
|
|
|
|
keys.forEach(function (key) {
|
|
var node = _this4.getNode(key);
|
|
if (node) node.expand(null, _this4.autoExpandParent);
|
|
});
|
|
};
|
|
|
|
TreeStore.prototype.setChecked = function setChecked(data, checked, deep) {
|
|
var node = this.getNode(data);
|
|
|
|
if (node) {
|
|
node.setChecked(!!checked, deep);
|
|
}
|
|
};
|
|
|
|
TreeStore.prototype.getCurrentNode = function getCurrentNode() {
|
|
return this.currentNode;
|
|
};
|
|
|
|
TreeStore.prototype.setCurrentNode = function setCurrentNode(node) {
|
|
this.currentNode = node;
|
|
};
|
|
|
|
TreeStore.prototype.setCurrentNodeKey = function setCurrentNodeKey(key) {
|
|
var node = this.getNode(key);
|
|
if (node) {
|
|
this.currentNode = node;
|
|
}
|
|
};
|
|
|
|
return TreeStore;
|
|
}();
|
|
|
|
exports.default = TreeStore;
|
|
;
|
|
|
|
/***/ },
|
|
|
|
/***/ 346:
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
exports.__esModule = true;
|
|
|
|
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
|
|
var _merge = __webpack_require__(164);
|
|
|
|
var _merge2 = _interopRequireDefault(_merge);
|
|
|
|
var _util = __webpack_require__(347);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
|
|
var reInitChecked = function reInitChecked(node) {
|
|
var siblings = node.childNodes;
|
|
|
|
var all = true;
|
|
var none = true;
|
|
|
|
for (var i = 0, j = siblings.length; i < j; i++) {
|
|
var sibling = siblings[i];
|
|
if (sibling.checked !== true || sibling.indeterminate) {
|
|
all = false;
|
|
}
|
|
if (sibling.checked !== false || sibling.indeterminate) {
|
|
none = false;
|
|
}
|
|
}
|
|
|
|
if (all) {
|
|
node.setChecked(true);
|
|
} else if (!all && !none) {
|
|
node.setChecked('half');
|
|
} else if (none) {
|
|
node.setChecked(false);
|
|
}
|
|
};
|
|
|
|
var getPropertyFromData = function getPropertyFromData(node, prop) {
|
|
var props = node.store.props;
|
|
var data = node.data || {};
|
|
var config = props[prop];
|
|
|
|
if (typeof config === 'function') {
|
|
return config(data, node);
|
|
} else if (typeof config === 'string') {
|
|
return data[config];
|
|
} else if (typeof config === 'undefined') {
|
|
return '';
|
|
}
|
|
};
|
|
|
|
var nodeIdSeed = 0;
|
|
|
|
var Node = function () {
|
|
function Node(options) {
|
|
_classCallCheck(this, Node);
|
|
|
|
this.id = nodeIdSeed++;
|
|
this.text = null;
|
|
this.checked = false;
|
|
this.indeterminate = false;
|
|
this.data = null;
|
|
this.expanded = false;
|
|
this.parent = null;
|
|
this.visible = true;
|
|
|
|
for (var name in options) {
|
|
if (options.hasOwnProperty(name)) {
|
|
this[name] = options[name];
|
|
}
|
|
}
|
|
|
|
// internal
|
|
this.level = 0;
|
|
this.loaded = false;
|
|
this.childNodes = [];
|
|
this.loading = false;
|
|
|
|
if (this.parent) {
|
|
this.level = this.parent.level + 1;
|
|
}
|
|
|
|
var store = this.store;
|
|
if (!store) {
|
|
throw new Error('[Node]store is required!');
|
|
}
|
|
store.registerNode(this);
|
|
|
|
var props = store.props;
|
|
if (props && typeof props.isLeaf !== 'undefined') {
|
|
var isLeaf = getPropertyFromData(this, 'isLeaf');
|
|
if (typeof isLeaf === 'boolean') {
|
|
this.isLeafByUser = isLeaf;
|
|
}
|
|
}
|
|
|
|
if (store.lazy !== true && this.data) {
|
|
this.setData(this.data);
|
|
|
|
if (store.defaultExpandAll) {
|
|
this.expanded = true;
|
|
}
|
|
} else if (this.level > 0 && store.lazy && store.defaultExpandAll) {
|
|
this.expand();
|
|
}
|
|
|
|
if (!this.data) return;
|
|
var defaultExpandedKeys = store.defaultExpandedKeys;
|
|
var key = store.key;
|
|
if (key && defaultExpandedKeys && defaultExpandedKeys.indexOf(this.key) !== -1) {
|
|
this.expand(null, store.autoExpandParent);
|
|
}
|
|
|
|
if (key && store.currentNodeKey && this.key === store.currentNodeKey) {
|
|
store.currentNode = this;
|
|
}
|
|
|
|
if (store.lazy) {
|
|
store._initDefaultCheckedNode(this);
|
|
}
|
|
|
|
this.updateLeafState();
|
|
}
|
|
|
|
Node.prototype.setData = function setData(data) {
|
|
if (!Array.isArray(data)) {
|
|
(0, _util.markNodeData)(this, data);
|
|
}
|
|
|
|
this.data = data;
|
|
this.childNodes = [];
|
|
|
|
var children = void 0;
|
|
if (this.level === 0 && this.data instanceof Array) {
|
|
children = this.data;
|
|
} else {
|
|
children = getPropertyFromData(this, 'children') || [];
|
|
}
|
|
|
|
for (var i = 0, j = children.length; i < j; i++) {
|
|
this.insertChild({ data: children[i] });
|
|
}
|
|
};
|
|
|
|
Node.prototype.insertChild = function insertChild(child, index) {
|
|
if (!child) throw new Error('insertChild error: child is required.');
|
|
|
|
if (!(child instanceof Node)) {
|
|
(0, _merge2.default)(child, {
|
|
parent: this,
|
|
store: this.store
|
|
});
|
|
child = new Node(child);
|
|
}
|
|
|
|
child.level = this.level + 1;
|
|
|
|
if (typeof index === 'undefined' || index < 0) {
|
|
this.childNodes.push(child);
|
|
} else {
|
|
this.childNodes.splice(index, 0, child);
|
|
}
|
|
|
|
this.updateLeafState();
|
|
};
|
|
|
|
Node.prototype.insertBefore = function insertBefore(child, ref) {
|
|
var index = void 0;
|
|
if (ref) {
|
|
index = this.childNodes.indexOf(ref);
|
|
}
|
|
this.insertChild(child, index);
|
|
};
|
|
|
|
Node.prototype.insertAfter = function insertAfter(child, ref) {
|
|
var index = void 0;
|
|
if (ref) {
|
|
index = this.childNodes.indexOf(ref);
|
|
if (index !== -1) index += 1;
|
|
}
|
|
this.insertChild(child, index);
|
|
};
|
|
|
|
Node.prototype.removeChild = function removeChild(child) {
|
|
var index = this.childNodes.indexOf(child);
|
|
|
|
if (index > -1) {
|
|
this.store && this.store.deregisterNode(child);
|
|
child.parent = null;
|
|
this.childNodes.splice(index, 1);
|
|
}
|
|
|
|
this.updateLeafState();
|
|
};
|
|
|
|
Node.prototype.removeChildByData = function removeChildByData(data) {
|
|
var targetNode = null;
|
|
this.childNodes.forEach(function (node) {
|
|
if (node.data === data) {
|
|
targetNode = node;
|
|
}
|
|
});
|
|
|
|
if (targetNode) {
|
|
this.removeChild(targetNode);
|
|
}
|
|
};
|
|
|
|
Node.prototype.expand = function expand(callback, expandParent) {
|
|
var _this = this;
|
|
|
|
var done = function done() {
|
|
if (expandParent) {
|
|
var parent = _this.parent;
|
|
while (parent.level > 0) {
|
|
parent.expanded = true;
|
|
parent = parent.parent;
|
|
}
|
|
}
|
|
_this.expanded = true;
|
|
if (callback) callback();
|
|
};
|
|
|
|
if (this.shouldLoadData()) {
|
|
this.loadData(function (data) {
|
|
if (data instanceof Array) {
|
|
done();
|
|
}
|
|
});
|
|
} else {
|
|
done();
|
|
}
|
|
};
|
|
|
|
Node.prototype.doCreateChildren = function doCreateChildren(array) {
|
|
var _this2 = this;
|
|
|
|
var defaultProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
|
|
array.forEach(function (item) {
|
|
_this2.insertChild((0, _merge2.default)({ data: item }, defaultProps));
|
|
});
|
|
};
|
|
|
|
Node.prototype.collapse = function collapse() {
|
|
this.expanded = false;
|
|
};
|
|
|
|
Node.prototype.shouldLoadData = function shouldLoadData() {
|
|
return this.store.lazy === true && this.store.load && !this.loaded;
|
|
};
|
|
|
|
Node.prototype.updateLeafState = function updateLeafState() {
|
|
if (this.store.lazy === true && this.loaded !== true && typeof this.isLeafByUser !== 'undefined') {
|
|
this.isLeaf = this.isLeafByUser;
|
|
return;
|
|
}
|
|
var childNodes = this.childNodes;
|
|
if (!this.store.lazy || this.store.lazy === true && this.loaded === true) {
|
|
this.isLeaf = !childNodes || childNodes.length === 0;
|
|
return;
|
|
}
|
|
this.isLeaf = false;
|
|
};
|
|
|
|
Node.prototype.setChecked = function setChecked(value, deep) {
|
|
var _this3 = this;
|
|
|
|
this.indeterminate = value === 'half';
|
|
this.checked = value === true;
|
|
|
|
var handleDescendants = function handleDescendants() {
|
|
if (deep) {
|
|
var childNodes = _this3.childNodes;
|
|
for (var i = 0, j = childNodes.length; i < j; i++) {
|
|
var child = childNodes[i];
|
|
child.setChecked(value !== false, deep);
|
|
}
|
|
}
|
|
};
|
|
|
|
if (!this.store.checkStrictly && this.shouldLoadData()) {
|
|
// Only work on lazy load data.
|
|
this.loadData(function () {
|
|
handleDescendants();
|
|
}, {
|
|
checked: value !== false
|
|
});
|
|
} else {
|
|
handleDescendants();
|
|
}
|
|
|
|
var parent = this.parent;
|
|
if (!parent || parent.level === 0) return;
|
|
|
|
if (!this.store.checkStrictly) {
|
|
reInitChecked(parent);
|
|
}
|
|
};
|
|
|
|
Node.prototype.getChildren = function getChildren() {
|
|
// this is data
|
|
var data = this.data;
|
|
if (!data) return null;
|
|
|
|
var props = this.store.props;
|
|
var children = 'children';
|
|
if (props) {
|
|
children = props.children || 'children';
|
|
}
|
|
|
|
if (data[children] === undefined) {
|
|
data[children] = null;
|
|
}
|
|
|
|
return data[children];
|
|
};
|
|
|
|
Node.prototype.updateChildren = function updateChildren() {
|
|
var _this4 = this;
|
|
|
|
var newData = this.getChildren() || [];
|
|
var oldData = this.childNodes.map(function (node) {
|
|
return node.data;
|
|
});
|
|
|
|
var newDataMap = {};
|
|
var newNodes = [];
|
|
|
|
newData.forEach(function (item, index) {
|
|
if (item[_util.NODE_KEY]) {
|
|
newDataMap[item[_util.NODE_KEY]] = { index: index, data: item };
|
|
} else {
|
|
newNodes.push({ index: index, data: item });
|
|
}
|
|
});
|
|
|
|
oldData.forEach(function (item) {
|
|
if (!newDataMap[item[_util.NODE_KEY]]) _this4.removeChildByData(item);
|
|
});
|
|
|
|
newNodes.forEach(function (_ref) {
|
|
var index = _ref.index,
|
|
data = _ref.data;
|
|
|
|
_this4.insertChild({ data: data }, index);
|
|
});
|
|
|
|
this.updateLeafState();
|
|
};
|
|
|
|
Node.prototype.loadData = function loadData(callback) {
|
|
var _this5 = this;
|
|
|
|
var defaultProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
|
|
if (this.store.lazy === true && this.store.load && !this.loaded && !this.loading) {
|
|
this.loading = true;
|
|
|
|
var resolve = function resolve(children) {
|
|
_this5.loaded = true;
|
|
_this5.loading = false;
|
|
_this5.childNodes = [];
|
|
|
|
_this5.doCreateChildren(children, defaultProps);
|
|
|
|
_this5.updateLeafState();
|
|
if (callback) {
|
|
callback.call(_this5, children);
|
|
}
|
|
};
|
|
|
|
this.store.load(this, resolve);
|
|
} else {
|
|
if (callback) {
|
|
callback.call(this);
|
|
}
|
|
}
|
|
};
|
|
|
|
_createClass(Node, [{
|
|
key: 'label',
|
|
get: function get() {
|
|
return getPropertyFromData(this, 'label');
|
|
}
|
|
}, {
|
|
key: 'icon',
|
|
get: function get() {
|
|
return getPropertyFromData(this, 'icon');
|
|
}
|
|
}, {
|
|
key: 'key',
|
|
get: function get() {
|
|
var nodeKey = this.store.key;
|
|
if (this.data) return this.data[nodeKey];
|
|
return null;
|
|
}
|
|
}]);
|
|
|
|
return Node;
|
|
}();
|
|
|
|
exports.default = Node;
|
|
|
|
/***/ },
|
|
|
|
/***/ 347:
|
|
/***/ function(module, exports) {
|
|
|
|
'use strict';
|
|
|
|
exports.__esModule = true;
|
|
var NODE_KEY = exports.NODE_KEY = '$treeNodeId';
|
|
|
|
var markNodeData = exports.markNodeData = function markNodeData(node, data) {
|
|
if (data[NODE_KEY]) return;
|
|
Object.defineProperty(data, NODE_KEY, {
|
|
value: node.id,
|
|
enumerable: false,
|
|
configurable: false,
|
|
writable: false
|
|
});
|
|
};
|
|
|
|
var getNodeKey = exports.getNodeKey = function getNodeKey(key, data) {
|
|
if (!key) return data[NODE_KEY];
|
|
return data[key];
|
|
};
|
|
|
|
/***/ },
|
|
|
|
/***/ 348:
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
var Component = __webpack_require__(3)(
|
|
/* script */
|
|
__webpack_require__(349),
|
|
/* template */
|
|
__webpack_require__(350),
|
|
/* scopeId */
|
|
null,
|
|
/* cssModules */
|
|
null
|
|
)
|
|
|
|
module.exports = Component.exports
|
|
|
|
|
|
/***/ },
|
|
|
|
/***/ 349:
|
|
/***/ function(module, exports, __webpack_require__) {
|
|
|
|
'use strict';
|
|
|
|
exports.__esModule = true;
|
|
|
|
var _collapseTransition = __webpack_require__(80);
|
|
|
|
var _collapseTransition2 = _interopRequireDefault(_collapseTransition);
|
|
|
|
var _checkbox = __webpack_require__(304);
|
|
|
|
var _checkbox2 = _interopRequireDefault(_checkbox);
|
|
|
|
var _emitter = __webpack_require__(14);
|
|
|
|
var _emitter2 = _interopRequireDefault(_emitter);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
exports.default = {
|
|
name: 'ElTreeNode',
|
|
|
|
componentName: 'ElTreeNode',
|
|
|
|
mixins: [_emitter2.default],
|
|
|
|
props: {
|
|
node: {
|
|
default: function _default() {
|
|
return {};
|
|
}
|
|
},
|
|
props: {},
|
|
renderContent: Function
|
|
},
|
|
|
|
components: {
|
|
ElCheckbox: _checkbox2.default,
|
|
CollapseTransition: _collapseTransition2.default,
|
|
NodeContent: {
|
|
props: {
|
|
node: {
|
|
required: true
|
|
}
|
|
},
|
|
render: function render(h) {
|
|
var parent = this.$parent;
|
|
var node = this.node;
|
|
var data = node.data;
|
|
var store = node.store;
|
|
return parent.renderContent ? parent.renderContent.call(parent._renderProxy, h, { _self: parent.tree.$vnode.context, node: node, data: data, store: store }) : h(
|
|
'span',
|
|
{ 'class': 'el-tree-node__label' },
|
|
[this.node.label]
|
|
);
|
|
}
|
|
}
|
|
},
|
|
|
|
data: function data() {
|
|
return {
|
|
tree: null,
|
|
expanded: false,
|
|
childNodeRendered: false,
|
|
showCheckbox: false,
|
|
oldChecked: null,
|
|
oldIndeterminate: null
|
|
};
|
|
},
|
|
|
|
|
|
watch: {
|
|
'node.indeterminate': function nodeIndeterminate(val) {
|
|
this.handleSelectChange(this.node.checked, val);
|
|
},
|
|
'node.checked': function nodeChecked(val) {
|
|
this.handleSelectChange(val, this.node.indeterminate);
|
|
},
|
|
'node.expanded': function nodeExpanded(val) {
|
|
this.expanded = val;
|
|
if (val) {
|
|
this.childNodeRendered = true;
|
|
}
|
|
}
|
|
},
|
|
|
|
methods: {
|
|
getNodeKey: function getNodeKey(node, index) {
|
|
var nodeKey = this.tree.nodeKey;
|
|
if (nodeKey && node) {
|
|
return node.data[nodeKey];
|
|
}
|
|
return index;
|
|
},
|
|
handleSelectChange: function handleSelectChange(checked, indeterminate) {
|
|
if (this.oldChecked !== checked && this.oldIndeterminate !== indeterminate) {
|
|
this.tree.$emit('check-change', this.node.data, checked, indeterminate);
|
|
}
|
|
this.oldChecked = checked;
|
|
this.indeterminate = indeterminate;
|
|
},
|
|
handleClick: function handleClick() {
|
|
var store = this.tree.store;
|
|
store.setCurrentNode(this.node);
|
|
this.tree.$emit('current-change', store.currentNode ? store.currentNode.data : null, store.currentNode);
|
|
this.tree.currentNode = this;
|
|
if (this.tree.expandOnClickNode) {
|
|
this.handleExpandIconClick();
|
|
}
|
|
this.tree.$emit('node-click', this.node.data, this.node, this);
|
|
},
|
|
handleExpandIconClick: function handleExpandIconClick() {
|
|
if (this.node.isLeaf) return;
|
|
if (this.expanded) {
|
|
this.tree.$emit('node-collapse', this.node.data, this.node, this);
|
|
this.node.collapse();
|
|
} else {
|
|
this.node.expand();
|
|
this.$emit('node-expand', this.node.data, this.node, this);
|
|
}
|
|
},
|
|
handleUserClick: function handleUserClick() {
|
|
if (this.node.indeterminate) {
|
|
this.node.setChecked(this.node.checked, !this.tree.checkStrictly);
|
|
}
|
|
},
|
|
handleCheckChange: function handleCheckChange(ev) {
|
|
if (!this.node.indeterminate) {
|
|
this.node.setChecked(ev.target.checked, !this.tree.checkStrictly);
|
|
}
|
|
},
|
|
handleChildNodeExpand: function handleChildNodeExpand(nodeData, node, instance) {
|
|
this.broadcast('ElTreeNode', 'tree-node-expand', node);
|
|
this.tree.$emit('node-expand', nodeData, node, instance);
|
|
}
|
|
},
|
|
|
|
created: function created() {
|
|
var _this = this;
|
|
|
|
var parent = this.$parent;
|
|
|
|
if (parent.isTree) {
|
|
this.tree = parent;
|
|
} else {
|
|
this.tree = parent.tree;
|
|
}
|
|
|
|
var tree = this.tree;
|
|
if (!tree) {
|
|
console.warn('Can not find node\'s tree.');
|
|
}
|
|
|
|
var props = tree.props || {};
|
|
var childrenKey = props['children'] || 'children';
|
|
|
|
this.$watch('node.data.' + childrenKey, function () {
|
|
_this.node.updateChildren();
|
|
});
|
|
|
|
this.showCheckbox = tree.showCheckbox;
|
|
|
|
if (this.node.expanded) {
|
|
this.expanded = true;
|
|
this.childNodeRendered = true;
|
|
}
|
|
|
|
if (this.tree.accordion) {
|
|
this.$on('tree-node-expand', function (node) {
|
|
if (_this.node !== node) {
|
|
_this.node.collapse();
|
|
}
|
|
});
|
|
}
|
|
}
|
|
}; //
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
/***/ },
|
|
|
|
/***/ 350:
|
|
/***/ function(module, exports) {
|
|
|
|
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;
|
|
return _c('div', {
|
|
directives: [{
|
|
name: "show",
|
|
rawName: "v-show",
|
|
value: (_vm.node.visible),
|
|
expression: "node.visible"
|
|
}],
|
|
staticClass: "el-tree-node",
|
|
class: {
|
|
'is-expanded': _vm.childNodeRendered && _vm.expanded,
|
|
'is-current': _vm.tree.store.currentNode === _vm.node,
|
|
'is-hidden': !_vm.node.visible
|
|
},
|
|
on: {
|
|
"click": function($event) {
|
|
$event.stopPropagation();
|
|
_vm.handleClick($event)
|
|
}
|
|
}
|
|
}, [_c('div', {
|
|
staticClass: "el-tree-node__content",
|
|
style: ({
|
|
'padding-left': (_vm.node.level - 1) * _vm.tree.indent + 'px'
|
|
})
|
|
}, [_c('span', {
|
|
staticClass: "el-tree-node__expand-icon",
|
|
class: {
|
|
'is-leaf': _vm.node.isLeaf, expanded: !_vm.node.isLeaf && _vm.expanded
|
|
},
|
|
on: {
|
|
"click": function($event) {
|
|
$event.stopPropagation();
|
|
_vm.handleExpandIconClick($event)
|
|
}
|
|
}
|
|
}), (_vm.showCheckbox) ? _c('el-checkbox', {
|
|
directives: [{
|
|
name: "model",
|
|
rawName: "v-model",
|
|
value: (_vm.node.checked),
|
|
expression: "node.checked"
|
|
}],
|
|
attrs: {
|
|
"indeterminate": _vm.node.indeterminate
|
|
},
|
|
domProps: {
|
|
"value": (_vm.node.checked)
|
|
},
|
|
on: {
|
|
"change": _vm.handleCheckChange,
|
|
"input": function($event) {
|
|
_vm.node.checked = $event
|
|
}
|
|
},
|
|
nativeOn: {
|
|
"click": function($event) {
|
|
$event.stopPropagation();
|
|
_vm.handleUserClick($event)
|
|
}
|
|
}
|
|
}) : _vm._e(), (_vm.node.loading) ? _c('span', {
|
|
staticClass: "el-tree-node__loading-icon el-icon-loading"
|
|
}) : _vm._e(), _c('node-content', {
|
|
attrs: {
|
|
"node": _vm.node
|
|
}
|
|
})], 1), _c('collapse-transition', [_c('div', {
|
|
directives: [{
|
|
name: "show",
|
|
rawName: "v-show",
|
|
value: (_vm.expanded),
|
|
expression: "expanded"
|
|
}],
|
|
staticClass: "el-tree-node__children"
|
|
}, _vm._l((_vm.node.childNodes), function(child) {
|
|
return _c('el-tree-node', {
|
|
key: _vm.getNodeKey(child),
|
|
attrs: {
|
|
"render-content": _vm.renderContent,
|
|
"node": child
|
|
},
|
|
on: {
|
|
"node-expand": _vm.handleChildNodeExpand
|
|
}
|
|
})
|
|
}))])], 1)
|
|
},staticRenderFns: []}
|
|
|
|
/***/ },
|
|
|
|
/***/ 351:
|
|
/***/ function(module, exports) {
|
|
|
|
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;
|
|
return _c('div', {
|
|
staticClass: "el-tree",
|
|
class: {
|
|
'el-tree--highlight-current': _vm.highlightCurrent
|
|
}
|
|
}, [_vm._l((_vm.root.childNodes), function(child) {
|
|
return _c('el-tree-node', {
|
|
key: _vm.getNodeKey(child),
|
|
attrs: {
|
|
"node": child,
|
|
"props": _vm.props,
|
|
"render-content": _vm.renderContent
|
|
},
|
|
on: {
|
|
"node-expand": _vm.handleNodeExpand
|
|
}
|
|
})
|
|
}), (!_vm.root.childNodes || _vm.root.childNodes.length === 0) ? _c('div', {
|
|
staticClass: "el-tree__empty-block"
|
|
}, [_c('span', {
|
|
staticClass: "el-tree__empty-text"
|
|
}, [_vm._v(_vm._s(_vm.emptyText))])]) : _vm._e()], 2)
|
|
},staticRenderFns: []}
|
|
|
|
/***/ }
|
|
|
|
/******/ }); |