element-gui
Version:
A Component Library for Vue.js.
1,168 lines (1,071 loc) • 32.5 kB
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] = {
/******/ 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 = 122);
/******/ })
/************************************************************************/
/******/ ({
/***/ 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, 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 functioal 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
}
}
/***/ }),
/***/ 10:
/***/ (function(module, exports) {
module.exports = require("element-gui/lib/input");
/***/ }),
/***/ 12:
/***/ (function(module, exports) {
module.exports = require("element-gui/lib/utils/clickoutside");
/***/ }),
/***/ 122:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__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/tree-select/src/main.vue?vue&type=template&id=5febe2cc&
var render = function() {
var _vm = this
var _h = _vm.$createElement
var _c = _vm._self._c || _h
return _c(
"div",
{
directives: [
{
name: "clickoutside",
rawName: "v-clickoutside",
value: _vm.handleClose,
expression: "handleClose"
}
],
staticClass: "el-tree-select",
class: [_vm.selectSize ? "el-tree-select--" + _vm.selectSize : ""],
on: {
click: function($event) {
$event.stopPropagation()
return _vm.toggleTree($event)
}
}
},
[
_vm.multiple
? _c(
"div",
{
ref: "tags",
staticClass: "el-tree-select__tags",
style: { "max-width": _vm.inputWidth - 32 + "px" }
},
[
_c(
"transition-group",
{ on: { "after-leave": _vm.resetInputHeight } },
_vm._l(_vm.selected, function(item) {
return _c(
"el-tag",
{
key: item.value,
style: { "max-width": _vm.inputWidth - 32 + "px" },
attrs: {
closable: !_vm.selectDisabled,
size: _vm.collapseTagSize,
type: "info",
"disable-transitions": ""
},
on: {
close: function($event) {
$event.stopPropagation()
_vm.deleteTag(item)
}
}
},
[
_c(
"span",
{
staticClass: "el-tree-select__tags-text",
style: { "max-width": _vm.inputWidth - 74 + "px" }
},
[_vm._v(_vm._s(item.label))]
)
]
)
}),
1
),
_vm.filterable
? _c("input", {
directives: [
{
name: "model",
rawName: "v-model",
value: _vm.query,
expression: "query"
}
],
ref: "input",
staticClass: "el-tree-select__input",
style: { width: _vm.inputLength + "px" },
attrs: {
type: "text",
disabled: _vm.selectDisabled,
autocomplete: false
},
domProps: { value: _vm.query },
on: {
click: function($event) {
$event.stopPropagation()
},
focus: _vm.handleFocus,
keydown: [
function($event) {
if (
!("button" in $event) &&
_vm._k($event.keyCode, "esc", 27, $event.key, [
"Esc",
"Escape"
])
) {
return null
}
$event.stopPropagation()
$event.preventDefault()
_vm.visible = false
},
function($event) {
if (
!("button" in $event) &&
_vm._k(
$event.keyCode,
"delete",
[8, 46],
$event.key,
["Backspace", "Delete", "Del"]
)
) {
return null
}
return _vm.deletePrevTag($event)
}
],
input: [
function($event) {
if ($event.target.composing) {
return
}
_vm.query = $event.target.value
},
function(e) {
return _vm.handleQueryChange(e.target.value)
}
]
}
})
: _vm._e()
],
1
)
: _vm._e(),
_c(
"el-input",
{
ref: "reference",
class: { "is-focus": _vm.visible },
attrs: {
type: "text",
disabled: _vm.selectDisabled,
readonly: _vm.readonly,
"validate-event": false,
size: _vm.selectSize,
placeholder: _vm.currentPlaceholder
},
on: { focus: _vm.handleFocus },
nativeOn: {
keyup: function($event) {
return _vm.onInputChange($event)
},
mouseenter: function($event) {
_vm.inputHovering = true
},
mouseleave: function($event) {
_vm.inputHovering = false
}
},
model: {
value: _vm.selectedLabel,
callback: function($$v) {
_vm.selectedLabel = $$v
},
expression: "selectedLabel"
}
},
[
_vm.$slots.prefix
? _c("template", { slot: "prefix" }, [_vm._t("prefix")], 2)
: _vm._e(),
_c("i", {
class: _vm.suffixIconClass,
attrs: { slot: "suffix" },
on: { click: _vm.handleIconClick },
slot: "suffix"
})
],
2
),
_c("transition", { attrs: { name: "el-zoom-in-top" } }, [
_c(
"div",
{
directives: [
{
name: "show",
rawName: "v-show",
value: _vm.visible,
expression: "visible"
}
],
ref: "popper",
staticClass: "el-tree-select-dropdown el-popper",
style: { minWidth: _vm.inputWidth + "px" }
},
[
_c(
"el-scrollbar",
{
ref: "scrollbar",
attrs: {
"wrap-class": "el-select-dropdown__wrap",
"view-class": "el-select-dropdown__list"
}
},
[
_c("el-tree", {
ref: "tree",
attrs: {
data: _vm.data,
lazy: _vm.lazy,
load: _vm.load,
"check-on-click-node": _vm.checkOnClickNode,
props: _vm.props,
"default-expand-all": "",
"node-key": "value",
"show-checkbox": _vm.showCheckbox,
"expand-on-click-node": false,
"check-strictly": _vm.checkStrictly,
"filter-node-method": _vm.filterNodeMethod,
"default-checked-keys": _vm.checkedKeys
},
on: {
check: _vm.handleCheck,
"node-click": _vm.handleNodeClick
}
})
],
1
)
],
1
)
])
],
1
)
}
var staticRenderFns = []
render._withStripped = true
// CONCATENATED MODULE: ./packages/tree-select/src/main.vue?vue&type=template&id=5febe2cc&
// EXTERNAL MODULE: external "element-gui/lib/input"
var input_ = __webpack_require__(10);
var input_default = /*#__PURE__*/__webpack_require__.n(input_);
// EXTERNAL MODULE: external "element-gui/lib/tree"
var tree_ = __webpack_require__(54);
var tree_default = /*#__PURE__*/__webpack_require__.n(tree_);
// EXTERNAL MODULE: external "element-gui/lib/utils/clickoutside"
var clickoutside_ = __webpack_require__(12);
var clickoutside_default = /*#__PURE__*/__webpack_require__.n(clickoutside_);
// EXTERNAL MODULE: external "element-gui/lib/utils/vue-popper"
var vue_popper_ = __webpack_require__(5);
var vue_popper_default = /*#__PURE__*/__webpack_require__.n(vue_popper_);
// EXTERNAL MODULE: external "element-gui/lib/utils/util"
var util_ = __webpack_require__(3);
// EXTERNAL MODULE: external "element-gui/lib/utils/resize-event"
var resize_event_ = __webpack_require__(13);
// EXTERNAL MODULE: external "element-gui/lib/mixins/emitter"
var emitter_ = __webpack_require__(4);
var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
// EXTERNAL MODULE: external "element-gui/lib/locale"
var locale_ = __webpack_require__(17);
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/tree-select/src/main.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
// todo: 等 vue-popper 合并后,这里还需要做出调整
var popperMixin = {
props: {
placement: {
type: String,
default: 'bottom-start'
},
appendToBody: vue_popper_default.a.props.appendToBody,
arrowOffset: vue_popper_default.a.props.arrowOffset,
offset: vue_popper_default.a.props.offset,
boundariesPadding: vue_popper_default.a.props.boundariesPadding,
popperOptions: vue_popper_default.a.props.popperOptions,
visibleArrow: {
type: Boolean,
default: true
}
},
methods: vue_popper_default.a.methods,
data: vue_popper_default.a.data,
beforeDestroy: vue_popper_default.a.beforeDestroy
};
var sizeMap = {
'medium': 32,
'small': 30,
'mini': 28
};
/* harmony default export */ var mainvue_type_script_lang_js_ = ({
name: 'ElTreeSelect',
mixins: [popperMixin, emitter_default.a],
provide: function provide() {
return {
elTreeSelect: this
};
},
inject: {
elForm: {
default: ''
},
elFormItem: {
default: ''
}
},
props: {
data: {
type: Array,
required: true
},
value: {
required: true,
type: [String, Number, Array]
},
multiple: Boolean,
disabled: Boolean,
clearable: Boolean,
size: {
type: String,
validator: function validator(val) {
return ['medium', 'small', 'mini'].indexOf(val) > -1;
}
},
props: Object,
placeholder: {
type: String,
default: function _default() {
return Object(locale_["t"])('el.treeSelect.placeholder');
}
},
lazy: Boolean,
load: Function,
showCheckbox: Boolean,
checkStrictly: {
type: Boolean,
default: false
},
filterable: Boolean,
filterMethod: Function,
// emptyText: String,
showCheckedStrategy: {
type: String,
default: 'child',
validator: function validator(val) {
return ['parent', 'child'].indexOf(val) > -1;
}
}
},
components: {
ElInput: input_default.a,
ElTree: tree_default.a
},
directives: { Clickoutside: clickoutside_default.a },
data: function data() {
return {
query: '',
selectedLabel: '',
inputLength: 20,
visible: false,
inputWidth: 0,
inputHovering: false,
treeVisibleOnFocus: false,
selected: this.multiple ? [] : {},
checkOnClickNode: false
};
},
computed: {
suffixIconClass: function suffixIconClass() {
var classes = ['el-tree-select__caret', 'el-input__icon'];
var criteria = this.clearable && !this.selectDisabled && this.inputHovering && !this.multiple && this.value !== undefined && this.value !== null && this.value !== '';
if (criteria) {
classes = [].concat(classes, ['el-icon-circle-close', 'is-show-close']);
} else {
classes.push('el-icon-arrow-down');
if (this.visible) {
classes.push('is-reverse');
}
}
return classes;
},
selectDisabled: function selectDisabled() {
return this.disabled || (this.elForm || {}).disabled;
},
selectSize: function selectSize() {
return this.size || (this.elFormItem || {}).elFormItemSize || (this.$ELEMENT || {}).size;
},
collapseTagSize: function collapseTagSize() {
return ['small', 'mini'].indexOf(this.selectSize) > -1 ? 'mini' : 'small';
},
readonly: function readonly() {
var isIE = !this.$isServer && !isNaN(Number(document.documentMode));
return !this.filterable || this.multiple || !isIE && !this.visible;
},
checkedKeys: function checkedKeys() {
if (this.multiple && this.showCheckbox) {
return this.value || [];
} else {
return [];
}
},
currentPlaceholder: function currentPlaceholder() {
if (!this.value || Array.isArray(this.value) && this.value.length === 0) {
return this.placeholder;
} else {
return '';
}
}
},
watch: {
visible: function visible(val) {
var _this = this;
if (val) {
this.updatePopper();
if (this.multiple && this.filterable) {
this.$refs.input.focus();
}
this.$emit('focus', this);
if (!this.multiple && this.filterable) {
this.broadcast('ElInput', 'inputSelect');
}
} else {
this.destroyPopper();
if (this.$refs.input) {
this.$refs.input.blur();
}
this.$emit('blur', this);
this.query = '';
this.selectedLabel = '';
if (!this.multiple) {
this.selectedLabel = this.selected.label || '';
if (this.filterable) this.query = this.selectedLabel;
}
if (this.filterable) {
setTimeout(function () {
_this.handleQueryChange('');
}, 100);
}
}
},
value: function value(val, oldVal) {
if (this.multiple) {
this.resetInputHeight();
} else {
if (oldVal) {
this.$refs.tree.getNode(oldVal).isSelect = false;
};
if (val) {
this.$refs.tree.getNode(val).isSelect = true;
};
};
this.setSelected();
if (!Object(util_["valueEquals"])(val, oldVal)) {
this.dispatch('ElFormItem', 'el.form.change', val);
};
}
},
methods: {
handleFocus: function handleFocus(event) {
this.treeVisibleOnFocus = true;
this.visible = true;
// this.$emit('focus', event);
},
handleClose: function handleClose() {
this.visible = false;
},
toggleTree: function toggleTree() {
if (!this.selectDisabled) {
if (this.treeVisibleOnFocus) {
this.treeVisibleOnFocus = false;
} else {
this.visible = !this.visible;
}
}
},
handleIconClick: function handleIconClick(event) {
if (this.suffixIconClass.indexOf('el-icon-circle-close') > -1) {
event.stopPropagation();
this.visible = false;
this.$emit('input', '');
this.emitChange('');
this.$emit('clear');
this.selected = {};
this.selectedLabel = '';
}
},
emitChange: function emitChange(val) {
if (!Object(util_["valueEquals"])(this.value, val)) {
this.$emit('change', val);
}
},
handleQueryChange: function handleQueryChange(val) {
this.$refs.tree.filter(val);
},
handleNodeClick: function handleNodeClick(data, node, tree) {
if (this.showCheckbox) return;
var value = node.data.value;
var child = node.childNodes;
if (child.length == 0) {
if (this.multiple) {
var valueCopy = this.value.slice();
var index = this.getValueIndex(valueCopy, value);
if (index > -1) {
this.$refs.tree.getNode(valueCopy[index]).isSelect = false;
valueCopy.splice(index, 1);
} else {
valueCopy.push(value);
this.$refs.tree.getNode(value).isSelect = true;
}
if (this.$refs.input) {
this.$refs.input.focus();
}
this.$emit('input', valueCopy);
this.emitChange(valueCopy);
} else {
if (value === this.value) {
value = '';
}
this.$emit('input', value);
this.emitChange(value);
this.visible = false;
}
} else {
return;
}
},
handleCheck: function handleCheck(data, info) {
var checkedNodes = info.checkedNodes;
var nodes = [];
switch (this.showCheckedStrategy) {
case 'parent':
nodes = this.getTreeCheckedParentNodes();
break;
case 'child':
nodes = checkedNodes.filter(function (_ref) {
var children = _ref.children;
return !(children && children.length);
});
break;
default:
nodes = checkedNodes;
break;
}
var values = nodes.map(function (_ref2) {
var value = _ref2.value;
return value;
});
if (this.filterable) this.$refs.input.focus();
this.$emit('input', values);
this.emitChange(values);
},
getTreeCheckedParentNodes: function getTreeCheckedParentNodes() {
var checkedNodes = [];
var traverse = function traverse(node) {
var childNodes = node.root ? node.root.childNodes : node.childNodes;
childNodes.forEach(function (child) {
if (child.checked && !child.isLeaf) {
checkedNodes.push({
label: child.data.label,
value: child.data.value
});
} else {
traverse(child);
}
});
};
traverse(this.$refs.tree.store);
return checkedNodes;
},
getNodeData: function getNodeData(value) {
var node = null;
if (Array.isArray(this.data)) {
var traverse = function traverse(arr) {
for (var i = 0; i < arr.length; i++) {
var child = arr[i];
if (child.value === value) {
node = {
label: child.label,
value: child.value
};
break;
} else if (child.children && child.children.length > 0) {
traverse(child.children);
}
}
};
traverse(this.data);
}
return node;
},
onInputChange: function onInputChange() {
if (this.filterable && this.query !== this.selectedLabel) {
this.query = this.selectedLabel;
this.handleQueryChange(this.query);
}
},
filterNodeMethod: function filterNodeMethod(value, data) {
if (!value) return true;
this.$nextTick(this.updatePopper);
if (typeof this.filterMethod === 'function') {
return this.filterMethod(value, data);
} else {
return data.label.indexOf(value) !== -1;
}
},
resetInputHeight: function resetInputHeight() {
var _this2 = this;
this.$nextTick(function () {
if (!_this2.$refs.reference) return;
var inputEl = _this2.$refs.reference.$refs.input;
var tags = _this2.$refs.tags;
var height = sizeMap[_this2.selectSize] || 34;
if (_this2.selected.length !== 0) {
height = Math.max(tags.clientHeight + (tags.clientHeight > height ? 6 : 0), height);
}
inputEl.style.height = height + 'px';
if (_this2.visible) {
_this2.updatePopper();
}
});
},
getValueIndex: function getValueIndex() {
var arr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
var value = arguments[1];
var index = -1;
arr.some(function (item, i) {
if (item === value) {
index = i;
return true;
} else {
return false;
}
});
return index;
},
deletePrevTag: function deletePrevTag(e) {
if (e.target.value.length <= 0) {
this.selected.splice(-1, 1);
var values = this.selected.map(function (_ref3) {
var value = _ref3.value;
return value;
});
this.$emit('input', values);
this.$refs.tree.setCheckedKeys(values);
this.emitChange(values);
}
},
deleteTag: function deleteTag(item) {
this.selected = this.selected.filter(function (selectItem) {
return selectItem !== item;
});
var values = this.selected.map(function (_ref4) {
var value = _ref4.value;
return value;
});
this.$emit('input', values);
this.$refs.tree.getNode(item.value).isSelect = false;
this.$refs.tree.setCheckedKeys(values);
this.emitChange(values);
},
resetInputWidth: function resetInputWidth() {
this.inputWidth = this.$refs.reference.$el.getBoundingClientRect().width;
},
handleResize: function handleResize() {
this.resetInputWidth();
if (this.multiple) {
this.resetInputHeight();
};
},
setSelected: function setSelected() {
var _this3 = this;
if (this.multiple) {
var result = [];
if (Array.isArray(this.value)) {
this.value.forEach(function (value) {
var node = _this3.getNodeData(value);
if (node) result.push(node);
});
}
this.selected = result;
this.$nextTick(this.resetInputHeight);
} else {
var node = this.getNodeData(this.value);
if (node) {
this.selected = node;
this.selectedLabel = node.label;
if (this.filterable) this.query = this.selectedLabel;
}
}
},
// 初始化高亮选中
treeSelect: function treeSelect() {
var select = this.selected;
if (this.multiple && select.length > 0) {
for (var i = 0; i < select.length; i++) {
this.$refs.tree.getNode(select[i].value).isSelect = true;
}
}
if (!this.multiple && select.value) {
this.$refs.tree.getNode(select.value).isSelect = true;
}
},
// 获取两个数组不同
getArrDifference: function getArrDifference(arr1, arr2) {
return arr1.concat(arr2).filter(function (v, i, arr) {
return arr.indexOf(v) === arr.lastIndexOf(v);
});
}
},
mounted: function mounted() {
if (this.multiple && this.showCheckbox) {
this.checkOnClickNode = true;
};
if (this.checkStrictly) {
this.showCheckedStrategy = 'all';
};
this.referenceElm = this.$refs.reference.$el;
this.popperElm = this.$refs.popper;
this.inputWidth = this.$refs.reference.$el.getBoundingClientRect().width;
Object(resize_event_["addResizeListener"])(this.$el, this.handleResize);
this.setSelected();
this.treeSelect();
},
beforeDestroy: function beforeDestroy() {
Object(resize_event_["removeResizeListener"])(this.$el, this.handleResize);
}
});
// CONCATENATED MODULE: ./packages/tree-select/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/tree-select/src/main.vue
/* normalize component */
var component = Object(componentNormalizer["a" /* default */])(
src_mainvue_type_script_lang_js_,
render,
staticRenderFns,
false,
null,
null,
null
)
/* hot reload */
if (false) { var api; }
component.options.__file = "packages/tree-select/src/main.vue"
/* harmony default export */ var main = (component.exports);
// CONCATENATED MODULE: ./packages/tree-select/index.js
/* istanbul ignore next */
main.install = function (Vue) {
Vue.component(main.name, main);
};
/* harmony default export */ var tree_select = __webpack_exports__["default"] = (main);
/***/ }),
/***/ 13:
/***/ (function(module, exports) {
module.exports = require("element-gui/lib/utils/resize-event");
/***/ }),
/***/ 17:
/***/ (function(module, exports) {
module.exports = require("element-gui/lib/locale");
/***/ }),
/***/ 3:
/***/ (function(module, exports) {
module.exports = require("element-gui/lib/utils/util");
/***/ }),
/***/ 4:
/***/ (function(module, exports) {
module.exports = require("element-gui/lib/mixins/emitter");
/***/ }),
/***/ 5:
/***/ (function(module, exports) {
module.exports = require("element-gui/lib/utils/vue-popper");
/***/ }),
/***/ 54:
/***/ (function(module, exports) {
module.exports = require("element-gui/lib/tree");
/***/ })
/******/ });