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] = {
/******/ 			i: moduleId,
/******/ 			l: false,
/******/ 			exports: {}
/******/ 		};
/******/
/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ 		// Flag the module as loaded
/******/ 		module.l = 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;
/******/
/******/ 	// define getter function for harmony exports
/******/ 	__webpack_require__.d = function(exports, name, getter) {
/******/ 		if(!__webpack_require__.o(exports, name)) {
/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ 		}
/******/ 	};
/******/
/******/ 	// define __esModule on exports
/******/ 	__webpack_require__.r = function(exports) {
/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 		}
/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
/******/ 	};
/******/
/******/ 	// create a fake namespace object
/******/ 	// mode & 1: value is a module id, require it
/******/ 	// mode & 2: merge all properties of value into the ns
/******/ 	// mode & 4: return value when already ns object
/******/ 	// mode & 8|1: behave like require
/******/ 	__webpack_require__.t = function(value, mode) {
/******/ 		if(mode & 1) value = __webpack_require__(value);
/******/ 		if(mode & 8) return value;
/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ 		var ns = Object.create(null);
/******/ 		__webpack_require__.r(ns);
/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ 		return ns;
/******/ 	};
/******/
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__webpack_require__.n = function(module) {
/******/ 		var getter = module && module.__esModule ?
/******/ 			function getDefault() { return module['default']; } :
/******/ 			function getModuleExports() { return module; };
/******/ 		__webpack_require__.d(getter, 'a', getter);
/******/ 		return getter;
/******/ 	};
/******/
/******/ 	// Object.prototype.hasOwnProperty.call
/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "/dist/";
/******/
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = 156);
/******/ })
/************************************************************************/
/******/ ({

/***/ 0:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
/* globals __VUE_SSR_CONTEXT__ */

// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
// This module is a runtime utility for cleaner component module output and will
// be included in the final webpack user bundle.

function normalizeComponent(
  scriptExports,
  render,
  staticRenderFns,
  functionalTemplate,
  injectStyles,
  scopeId,
  moduleIdentifier /* server only */,
  shadowMode /* vue-cli only */
) {
  // Vue.extend constructor export interop
  var options =
    typeof scriptExports === 'function' ? scriptExports.options : scriptExports

  // render functions
  if (render) {
    options.render = render
    options.staticRenderFns = staticRenderFns
    options._compiled = true
  }

  // functional template
  if (functionalTemplate) {
    options.functional = true
  }

  // scopedId
  if (scopeId) {
    options._scopeId = 'data-v-' + scopeId
  }

  var hook
  if (moduleIdentifier) {
    // server build
    hook = function (context) {
      // 2.3 injection
      context =
        context || // cached call
        (this.$vnode && this.$vnode.ssrContext) || // stateful
        (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
      // 2.2 with runInNewContext: true
      if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
        context = __VUE_SSR_CONTEXT__
      }
      // inject component styles
      if (injectStyles) {
        injectStyles.call(this, context)
      }
      // register component module identifier for async chunk inferrence
      if (context && context._registeredComponents) {
        context._registeredComponents.add(moduleIdentifier)
      }
    }
    // used by ssr in case component is cached and beforeCreate
    // never gets called
    options._ssrRegister = hook
  } else if (injectStyles) {
    hook = shadowMode
      ? function () {
          injectStyles.call(
            this,
            (options.functional ? this.parent : this).$root.$options.shadowRoot
          )
        }
      : injectStyles
  }

  if (hook) {
    if (options.functional) {
      // for template-only hot-reload because in that case the render fn doesn't
      // go through the normalizer
      options._injectStyles = hook
      // register for functional component in vue file
      var originalRender = options.render
      options.render = function renderWithStyleInjection(h, context) {
        hook.call(context)
        return originalRender(h, context)
      }
    } else {
      // inject component registration as beforeCreate hook
      var existing = options.beforeCreate
      options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
    }
  }

  return {
    exports: scriptExports,
    options: options
  }
}


/***/ }),

/***/ 156:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);

// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/virtual-tree/src/main.vue?vue&type=template&id=5aed9dc6&
var render = function () {
  var _vm = this
  var _h = _vm.$createElement
  var _c = _vm._self._c || _h
  return _c("div", { staticClass: "el-virtual-tree" }, [
    _vm.filterable
      ? _c(
          "div",
          [
            _c("el-input", {
              attrs: {
                placeholder: _vm.placeholder,
                "prefix-icon": "bi-iconfont-search",
                clearable: "",
                "validate-event": false,
                size: "small",
              },
              model: {
                value: _vm.filterValue,
                callback: function ($$v) {
                  _vm.filterValue = $$v
                },
                expression: "filterValue",
              },
            }),
          ],
          1
        )
      : _vm._e(),
    _c(
      "div",
      {
        ref: "list",
        staticClass: "virtual-tree",
        style: { height: _vm.height + "px" },
        on: {
          scroll: function ($event) {
            _vm.scrollEvent($event)
          },
        },
      },
      [
        _c("div", {
          staticClass: "virtual-tree-phantom",
          style: { height: _vm.listHeight + "px" },
        }),
        _vm.visibleData.length === 0
          ? _c("div", [_c("el-empty")], 1)
          : _c(
              "div",
              {
                staticClass: "virtual-tree-list",
                style: { transform: _vm.getTransform },
              },
              _vm._l(_vm.visibleData, function (item, index) {
                return _c(
                  "div",
                  {
                    key: item.treeStructureId,
                    ref: "items",
                    refInFor: true,
                    staticClass: "virtual-tree-item",
                    style: {
                      height: _vm.itemSize + "px",
                      lineHeight: _vm.itemSize + "px",
                      paddingLeft: _vm.itemPadding(item.treeStructureId) + "px",
                    },
                    on: {
                      dblclick: function ($event) {
                        _vm.emitData(item)
                      },
                      click: function ($event) {
                        $event.stopPropagation()
                        _vm.lineSelect(item, index)
                      },
                    },
                  },
                  [
                    _vm.isLowerLevel
                      ? _c(
                          "div",
                          {
                            staticClass: "tree-expand-wrapper",
                            on: {
                              click: function ($event) {
                                $event.stopPropagation()
                                _vm.toggleExpand(item, index)
                              },
                            },
                          },
                          [
                            !item.isLeaf
                              ? _c("div", [
                                  _c("div", {
                                    class: {
                                      "el-tree-node__expand-icon bi-iconfont-caret-right": true,
                                      rotate90: item.expand,
                                      clickAble: !item.expand,
                                    },
                                    attrs: { icon: "", pointer: "" },
                                  }),
                                ])
                              : _c("div", { staticClass: "no-expand" }),
                          ]
                        )
                      : _vm._e(),
                    _vm.isCheckbox
                      ? _c(
                          "div",
                          {
                            class: {
                              "no-check": item.selType === 1 || !item.selType,
                              check: item.selType === 2,
                              "half-check": item.selType === 3,
                            },
                            on: {
                              click: function ($event) {
                                $event.stopPropagation()
                                _vm.toggleCheck(item, index)
                              },
                            },
                          },
                          [
                            item.selType === 2
                              ? _c("div", { staticClass: "check-graphical" })
                              : _vm._e(),
                            item.selType === 3
                              ? _c("div", {
                                  staticClass: "half-check-graphical",
                                })
                              : _vm._e(),
                          ]
                        )
                      : _vm._e(),
                    _c("span", [
                      item.loadNode
                        ? _c("span", {
                            staticClass:
                              "el-tree-node__loading-icon el-icon-loading",
                          })
                        : _vm._e(),
                      _c("span", {
                        domProps: {
                          innerHTML: _vm._s(_vm.highlight(item.label)),
                        },
                      }),
                    ]),
                  ]
                )
              }),
              0
            ),
      ]
    ),
  ])
}
var staticRenderFns = []
render._withStripped = true


// CONCATENATED MODULE: ./packages/virtual-tree/src/main.vue?vue&type=template&id=5aed9dc6&

// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/virtual-tree/src/main.vue?vue&type=script&lang=js&
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; };

//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//

/* harmony default export */ var mainvue_type_script_lang_js_ = ({
  name: 'ElVirtualTree',
  props: {
    placeholder: { type: String, default: '输入表名搜索' },
    // 列表高度
    height: {
      type: Number,
      default: 300
    },
    // 所有列表数据
    list: {
      type: Array,
      default: function _default() {
        return [];
      }
    },
    // 每项高度
    itemSize: {
      type: Number,
      default: 36
    },
    // id分隔符
    separator: {
      type: String,
      default: '-'
    },
    // 是否有checkbox
    isCheckbox: {
      type: Boolean,
      default: false
    },
    // 是否展示下级
    isLowerLevel: {
      type: Boolean,
      default: true
    },
    // 是否通过点击展开下层节点
    isClickSelectNode: {
      type: Boolean,
      default: true
    },
    // 异步加载
    loadMore: Function,
    filterable: {
      type: Boolean,
      default: true
    }
  },
  computed: {
    // 列表总高度
    listHeight: function listHeight() {
      return this.listData.length * this.itemSize;
    },

    // 可显示的列表项数
    visibleCount: function visibleCount() {
      return Math.ceil(this.screenHeight / this.itemSize);
    },

    // 偏移量对应的style
    getTransform: function getTransform() {
      return 'translate3d(0,' + this.startOffset + 'px,0)';
    },

    // listData: {
    //   get:function () {
    //     return this.list;
    //   },
    //   set: function (v) {
    //     return v;
    //   }
    // },
    // 获取真实显示列表数据
    visibleData: function visibleData() {
      return this.listData.slice(this.start, Math.min(this.end, this.listData.length));
    }
  },
  watch: {
    filterValue: function filterValue(val) {
      var keysList = [];
      this.originNodeMap.forEach(function (item) {
        keysList.push(item);
      });
      val === '' ? this.storageAllNode(keysList) : this.listData = this.filterToTree(keysList);
    },

    list: {
      handler: function handler(newVal, oldVal) {
        var _this = this;

        if (newVal.length !== 0 && (typeof oldVal === 'undefined' ? 'undefined' : _typeof(oldVal)) === 'object' && oldVal.length === 0) {
          newVal.forEach(function (item) {
            _this.originNodeMap.set(item.treeStructureId, item);
          });
          this.listData = [].concat(newVal);
        }
      },

      deep: true
    }
  },
  mounted: function mounted() {
    this.start = 0;
    this.end = this.start + this.visibleCount;
  },
  data: function data() {
    return {
      filterValue: '',
      // 可视区域高度
      screenHeight: document.body.clientHeight,
      // 偏移量
      startOffset: 0,
      // 起始索引
      start: 0,
      // 结束索引
      end: null,
      listData: [],
      originNodeMap: new Map(),
      currentNodeMap: {}
    };
  },

  methods: {
    // treeToList(list) {

    //   const result = [];
    //   list.forEach((item)=>{
    //     if (item.parentId) {
    //       result.forEach(it=>{
    //         if (it.id === item.parentId) {
    //           if (!('children' in it)) it.children = [];
    //           it.children.push(item);
    //         }
    //       });
    //     } else {
    //       result.push(item);
    //     }
    //   });
    // },

    // treeToList(list) {
    //   const arr = [];
    //   list.forEach(item=>{
    //     arr.push(item);
    //     if (item.children) {
    //       arr.concat(this.treeToList(item.children));
    //       delete item.children;
    //     }
    //   });
    //   console.log(arr);
    //   return arr;
    // },
    /**
     * @description: 转化为含有children的结构
     * @param {*} data
     * @return {*}
     */
    toTree: function toTree(data) {
      var obj = {}; // 使用对象重新存储数据
      var res = []; // 存储最后结果

      data.forEach(function (item) {
        // 遍历原始数据data，构造obj数据，键名为id，值为数据
        obj[item['id']] = item;
      });
      data.forEach(function (item) {
        var parentList = obj[item['parentId']]; // 通过每条数据的 parentId 去obj中查询
        if (parentList) {
          // 根据 parentId 找到父节点，item是子节点，
          if (!parentList['children']) parentList['children'] = []; // 这里对parentList是对obj的浅拷贝 同步到obj
          parentList['children'].push(item); // 将子节点插入父节点的 children 字段中
        } else {
          res.push(item); // parentId 找不到对应值，说明是根结点，直接插到根数组中
        }
      });
      return res;
    },


    /**
     * @description: 根据children结构来排子序
     * @param {*} tree
     * @return {*}
     */
    toList: function toList(tree) {
      var list = [];
      function deepToList(data) {
        data.forEach(function (item) {
          list.push(item);
          if (item.children) deepToList(item.children);
          delete item.children;
        });
      }
      deepToList(tree);
      return list;
    },
    filterToTree: function filterToTree(list) {
      var str = 'S*' + this.filterValue + 'S*';
      var reg = new RegExp(str, 'i'); // 不区分大小写

      // 获取所有的符合标准的节点
      var getAllNode = list.filter(function (item) {
        return reg.test(item.label);
      });

      // 只针对两层进行处理 TODO
      var getAllParent = list.filter(function (item) {
        return getAllNode.map(function (_ref) {
          var parentId = _ref.parentId;
          return parentId;
        }).includes(item.treeStructureId);
      }).concat(getAllNode);

      return this.toList(this.toTree(getAllParent));
    },

    /**
     * @description: 文本高亮
     * @param {*} text
     * @return {*}
     */
    highlight: function highlight(text) {
      var value = '';
      if (this.filterable) value = this.filterValue;
      var reg = new RegExp(value, 'gi');
      return text.replace(reg, function ($1) {
        return '<span class="el-cascader-highlight-text">' + $1 + '</span>';
      });
    },
    emitData: function emitData(item) {
      this.$emit('getData', item);
    },
    scrollEvent: function scrollEvent() {
      // 当前滚动位置
      var scrollTop = this.$refs.list.scrollTop;
      // 此时的开始索引
      this.start = Math.floor(scrollTop / this.itemSize);
      // 此时的结束索引
      this.end = this.start + this.visibleCount;
      // 此时的偏移量
      this.startOffset = scrollTop - scrollTop % this.itemSize;
    },

    // 每一列padding
    itemPadding: function itemPadding(id) {
      return (id.split(this.separator).length - 1) * 14;
    },

    // 展开某一行
    lineSelect: function lineSelect(item, index) {
      if (this.isClickSelectNode) {
        this.toggleExpand(item, index);
      }
    },

    // 点击节点
    toggleExpand: function toggleExpand(item, index) {
      if (item.expand) {
        // 收纳节点
        this.storageNode(item, index);
      } else {
        // 展开节点
        this.unfoldNode(item, index);
      }
    },

    // 筛选后收纳指定节点【数组】
    storageAllNode: function storageAllNode(list) {
      var _this2 = this;

      // 设置所有节点expand为false
      list.forEach(function (childItem) {
        _this2.changeAttributes(_this2.originNodeMap, childItem.treeStructureId, 'expand', false);
      });
      this.listData = [].concat(list.filter(function (node) {
        return !node.parentId;
      }));
    },

    // 收纳节点
    storageNode: function storageNode(item, index) {
      var _this3 = this;

      console.log(index);
      // 设置所有子节点expand为false
      var childList = this.listData.filter(function (node) {
        return node.treeStructureId.startsWith(item.treeStructureId) && node.treeStructureId[item.treeStructureId.length] === _this3.separator;
      });
      childList.forEach(function (childItem) {
        _this3.changeAttributes(_this3.originNodeMap, childItem.treeStructureId, 'expand', false);
      });
      this.listData = [].concat(this.listData.filter(function (node) {
        return node.treeStructureId === item.treeStructureId || !node.treeStructureId.startsWith(item.treeStructureId) || node.treeStructureId[item.treeStructureId.length] !== _this3.separator;
      }));
      this.$set(item, 'expand', !item.expand && true);
    },

    // 展开节点
    unfoldNode: function unfoldNode(item, index) {
      var _this4 = this;

      // 如果该节点正在展开/或者属于叶子结点直接返回
      if (item.loadNode || item.isLeaf) return;

      if ('expanded' in this.originNodeMap.get(item.treeStructureId)) {
        var startIndex = this.start;
        var cacheArrStart = this.listData.slice(0, startIndex + index + 1);
        var cacheArrEnd = this.listData.slice(startIndex + index + 1);
        // 如果已经展开过子节点 获取所有有记录的节点
        var keysList = [];
        this.originNodeMap.forEach(function (item, key) {
          return keysList.push(key);
        });

        var childKeys = keysList.filter(function (keyItem) {
          return keyItem.startsWith(item.treeStructureId) && keyItem[item.treeStructureId.length] === _this4.separator && keyItem.split(_this4.separator).length - item.treeStructureId.split(_this4.separator).length === 1;
        });
        var childrenList = [];
        childKeys.forEach(function (childKeysItem) {
          childrenList.push(_this4.originNodeMap.get(childKeysItem));
        });
        this.listData = [].concat(cacheArrStart).concat(childrenList).concat(cacheArrEnd);
        this.$set(item, 'expand', !item.expand && true);
      } else {
        // 记录是否已经展开过
        // 进入loading状态
        this.$set(item, 'loadNode', !item.loadNode && true);
        var itemData = item;
        this.loadMore(itemData).then(function (nodeChildList) {
          // 设置为此id已经展开
          _this4.changeAttributes(_this4.originNodeMap, itemData.treeStructureId, 'expanded', true);
          nodeChildList.forEach(function (nodeChildItem) {
            nodeChildItem.parentId = item.treeStructureId;
          });
          if (nodeChildList.length === 0) {
            // 是否叶子节点
            _this4.$set(itemData, 'isLeaf', true);
          } else {
            // 1、如果该节点为半勾选状态则子节点的勾选状态是根据返回的数据来 2、如果该节点为勾选状态则返回的子节点全为勾选状态  3、如果改节点为为勾选状态则子节点全部未勾选
            if (item.selType === 1 || !item.selType) {
              // 该节点未勾选-所有子节点均不勾选
              nodeChildList.forEach(function (nodeChildItem) {
                nodeChildItem.selType = 1;
              });
            } else if (item.selType === 2) {
              // 该节点勾选-所有子节点均勾选
              nodeChildList.forEach(function (nodeChildItem) {
                nodeChildItem.selType = 2;
              });
            }
            // 将新节点加入map
            nodeChildList.forEach(function (childrenItem) {
              _this4.originNodeMap.set(childrenItem.treeStructureId, childrenItem);
            });
            console.log(_this4.originNodeMap, '123123');
            // 找到索引 如果该节点已经收起则不更新数据
            if (_this4.listData.filter(function (childrenItem) {
              return childrenItem.treeStructureId === itemData.treeStructureId;
            }).length !== 0) {
              var currentIndex = _this4.listData.map(function (idItem) {
                return idItem.treeStructureId;
              }).indexOf(itemData.treeStructureId);
              var _cacheArrStart = _this4.listData.slice(0, currentIndex + 1);
              var _cacheArrEnd = _this4.listData.slice(currentIndex + 1);
              _this4.listData = [].concat(_cacheArrStart).concat(nodeChildList).concat(_cacheArrEnd);
              itemData.expand = !itemData.expand && true;
            }
          }
        }).finally(function () {
          _this4.$set(itemData, 'loadNode', false);
          // this.$forceUpdate();
        });
      }
    },

    // 修改某个属性的值 map的值和list的item指向同一个堆所以只用更改一次
    changeAttributes: function changeAttributes(map, mapkey, key, value) {
      var data = map.get(mapkey);
      data[key] = value;
      // map.set(mapkey, data);
    },

    // 勾选 selType: 1未勾选 2勾选 3半勾选
    toggleCheck: function toggleCheck(item) {
      var _this5 = this;

      var setChechFn = function setChechFn(selType) {
        _this5.$set(item, 'selType', selType);
        // 处理子节点勾选状态
        _this5.setChildToggleCheck(item, selType);
        // 处理父节点勾选状态
        _this5.setParentToggleCheck(item);
      };
      var actions = {
        1: function _() {
          // 未勾选变为勾选
          setChechFn(2);
        },
        2: function _() {
          // 勾选变为未勾选
          setChechFn(1);
        },
        3: function _() {
          // 半勾选变为勾选
          setChechFn(2);
        }
      };
      var action = actions[item.selType] || actions['1'];
      action();
    },

    // 改变所有子节点的勾选状态
    setChildToggleCheck: function setChildToggleCheck(item, selType) {
      var _this6 = this;

      // 获取所有子节点key
      var keysList = [].concat(this.originNodeMap.keys());
      var childKeys = keysList.filter(function (keyItem) {
        return keyItem.startsWith(item.treeStructureId) && keyItem[item.treeStructureId.length] === _this6.separator;
      });
      childKeys.forEach(function (childKeysItem) {
        _this6.changeAttributes(_this6.originNodeMap, childKeysItem, 'selType', selType);
      });
    },

    // 设置父节点的勾选状态
    setParentToggleCheck: function setParentToggleCheck(item) {
      var _this7 = this;

      var pid = item.treeStructureId;
      var number = pid.split(this.separator).length - 1;

      var _loop = function _loop(i) {
        if (pid.lastIndexOf(_this7.separator) > -1) ;
        // 截取每次父节点的值
        pid = pid.slice(0, pid.lastIndexOf(_this7.separator));
        // 获取该节点下级子节点
        var keysList = [].concat(_this7.originNodeMap.keys());
        var childKeys = keysList.filter(function (keyItem) {
          return keyItem.startsWith(pid) && keyItem.split(_this7.separator).length - pid.split(_this7.separator).length === 1;
        });
        var checkNumber = 0,
            halfCheckNumber = 0;

        childKeys.forEach(function (childKeysItem) {
          if (_this7.originNodeMap.get(childKeysItem).selType === 2) {
            checkNumber = checkNumber + 1;
          } else if (_this7.originNodeMap.get(childKeysItem).selType === 3) {
            halfCheckNumber = halfCheckNumber + 1;
          }
        });
        if (childKeys.length === checkNumber) {
          // 全选
          _this7.changeAttributes(_this7.originNodeMap, pid, 'selType', 2);
        } else if (checkNumber === 0 && halfCheckNumber === 0) {
          // 全没选
          _this7.changeAttributes(_this7.originNodeMap, pid, 'selType', 1);
        } else {
          _this7.changeAttributes(_this7.originNodeMap, pid, 'selType', 3);
        }
      };

      for (var i = 0; i < number; i++) {
        _loop(i);
      }
    },

    // 获取所有叶子结点选择状态
    getLeafStatus: function getLeafStatus() {
      var _this8 = this;

      // 筛选叶子结点
      console.time();
      var keysList = [].concat(this.originNodeMap.keys());
      var list = new Set();
      keysList.forEach(function (key) {
        if (_this8.originNodeMap.get(key).parentId) {
          list.add(_this8.originNodeMap.get(key).parentId);
        }
      });
      var parentIdList = Array.from(list);
      var leafKeyList = keysList.concat(parentIdList).filter(function (v) {
        return !parentIdList.includes(v);
      });
      var chechKeyList = [],
          halfCheckKeyList = [];

      leafKeyList.forEach(function (key) {
        var obj = _this8.originNodeMap.get(key);
        if (obj.selType === 2) {
          chechKeyList.push(key);
        } else if (obj.selType === 3) {
          halfCheckKeyList.push(key);
        }
      });
      console.timeEnd();
      return {
        chechKeyList: chechKeyList,
        halfCheckKeyList: halfCheckKeyList
      };
    }
  }
});
// CONCATENATED MODULE: ./packages/virtual-tree/src/main.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_mainvue_type_script_lang_js_ = (mainvue_type_script_lang_js_); 
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__(0);

// CONCATENATED MODULE: ./packages/virtual-tree/src/main.vue





/* normalize component */

var component = Object(componentNormalizer["a" /* default */])(
  src_mainvue_type_script_lang_js_,
  render,
  staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* harmony default export */ var main = (component.exports);
// CONCATENATED MODULE: ./packages/virtual-tree/index.js


/* istanbul ignore next */
main.install = function (Vue) {
  Vue.component(main.name, main);
};

/* harmony default export */ var virtual_tree = __webpack_exports__["default"] = (main);

/***/ })

/******/ });