@smallwei/avue 3.4.5 → 3.4.6

Sign up to get free protection for your applications and to get access to all the features.
package/lib/avue.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Avue.js v3.4.5
2
+ * Avue.js v3.4.6
3
3
  * (c) 2017-2024 Smallwei
4
4
  * Released under the MIT License.
5
5
  *
@@ -598,7 +598,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var coun
598
598
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
599
599
 
600
600
  "use strict";
601
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var core_locale__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core/locale */ \"./src/core/locale.js\");\n/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../config.js */ \"./packages/element-ui/crud/config.js\");\n/* harmony import */ var _grid_item__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../grid/item */ \"./packages/element-ui/crud/grid/item.vue\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"crud\",\n data: function data() {\n return {\n config: _config_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]\n };\n },\n components: {\n tableItemCard: _grid_item__WEBPACK_IMPORTED_MODULE_3__[\"default\"]\n },\n mixins: [core_locale__WEBPACK_IMPORTED_MODULE_1__[\"default\"]],\n inject: [\"crud\"],\n mounted: function mounted() {\n this.setSort();\n },\n methods: {\n indexMethod: function indexMethod(index) {\n return index + 1 + ((this.crud.page.currentPage || 1) - 1) * (this.crud.page.pageSize || 10);\n },\n setSort: function setSort() {\n this.rowDrop();\n this.columnDrop();\n },\n rowDrop: function rowDrop() {\n var _this = this;\n if (!this.crud.$refs.table.$el) return;\n var el = this.crud.$refs.table.$el.querySelectorAll(this.config.dropRowClass)[0];\n this.crud.tableDrop('row', el, function (evt) {\n var oldIndex = evt.oldIndex;\n var newIndex = evt.newIndex;\n var targetRow = _this.crud.list.splice(oldIndex, 1)[0];\n _this.crud.list.splice(newIndex, 0, targetRow);\n _this.crud.$emit('sortable-change', oldIndex, newIndex);\n _this.crud.refreshTable(function () {\n return _this.rowDrop();\n });\n });\n },\n columnDrop: function columnDrop() {\n var _this2 = this;\n if (!this.crud.$refs.table.$el) return;\n var el = this.crud.$refs.table.$el.querySelector(this.config.dropColClass);\n var noIndexCount = 0;\n ['selection', 'index', 'expand'].forEach(function (ele) {\n if (_this2.crud.tableOption[ele]) {\n noIndexCount += 1;\n }\n });\n this.crud.tableDrop('column', el, function (evt) {\n _this2.crud.headerSort(evt.oldIndex - noIndexCount, evt.newIndex - noIndexCount);\n _this2.columnDrop();\n });\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/crud/column/column-default.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/dist??ref--1");
601
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var core_locale__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core/locale */ \"./src/core/locale.js\");\n/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../config.js */ \"./packages/element-ui/crud/config.js\");\n/* harmony import */ var _grid_item__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../grid/item */ \"./packages/element-ui/crud/grid/item.vue\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"crud\",\n data: function data() {\n return {\n config: _config_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n rowSortable: null,\n columnSortable: null\n };\n },\n components: {\n tableItemCard: _grid_item__WEBPACK_IMPORTED_MODULE_3__[\"default\"]\n },\n mixins: [core_locale__WEBPACK_IMPORTED_MODULE_1__[\"default\"]],\n inject: [\"crud\"],\n watch: {\n 'crud.isSortable': function crudIsSortable(val) {\n this.rowDrop(val);\n this.columnDrop(val);\n },\n 'crud.isRowSort': function crudIsRowSort(val) {\n this.rowDrop(val);\n },\n 'crud.isColumnSort': function crudIsColumnSort(val) {\n this.columnDrop(val);\n }\n },\n mounted: function mounted() {\n this.rowDrop();\n this.columnDrop();\n },\n methods: {\n indexMethod: function indexMethod(index) {\n return index + 1 + ((this.crud.page.currentPage || 1) - 1) * (this.crud.page.pageSize || 10);\n },\n rowDrop: function rowDrop(flag) {\n var _this = this;\n this.$nextTick(function () {\n if (flag == false) {\n _this.rowSortable && _this.rowSortable.destroy();\n return;\n }\n if (!_this.crud.$refs.table.$el) return;\n var el = _this.crud.$refs.table.$el.querySelectorAll(_this.config.dropRowClass)[0];\n _this.rowSortable = _this.crud.tableDrop('row', el, function (evt) {\n var oldIndex = evt.oldIndex;\n var newIndex = evt.newIndex;\n var targetRow = _this.crud.list.splice(oldIndex, 1)[0];\n _this.crud.list.splice(newIndex, 0, targetRow);\n _this.crud.$emit('sortable-change', oldIndex, newIndex);\n });\n });\n },\n columnDrop: function columnDrop(flag) {\n var _this2 = this;\n this.$nextTick(function () {\n if (flag == false) {\n _this2.columnSortable && _this2.columnSortable.destroy();\n return;\n }\n if (!_this2.crud.$refs.table.$el) return;\n var el = _this2.crud.$refs.table.$el.querySelector(_this2.config.dropColClass);\n var noIndexCount = 0;\n ['selection', 'index', 'expand'].forEach(function (ele) {\n if (_this2.crud.tableOption[ele]) {\n noIndexCount += 1;\n }\n });\n _this2.columnSortable = _this2.crud.tableDrop('column', el, function (evt) {\n _this2.crud.headerSort(evt.oldIndex - noIndexCount, evt.newIndex - noIndexCount);\n });\n });\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/crud/column/column-default.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/dist??ref--1");
602
602
 
603
603
  /***/ }),
604
604
 
@@ -658,7 +658,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab
658
658
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
659
659
 
660
660
  "use strict";
661
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var core_locale__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core/locale */ \"./src/core/locale.js\");\n/* harmony import */ var core_packages__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core/packages */ \"./src/core/packages.js\");\n/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../config.js */ \"./packages/element-ui/crud/config.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: 'crud',\n mixins: [core_locale__WEBPACK_IMPORTED_MODULE_1__[\"default\"]],\n inject: [\"crud\"],\n data: function data() {\n return {\n data: [],\n columnBox: false\n };\n },\n computed: {\n defaultColumn: function defaultColumn() {\n return [{\n label: this.t('crud.column.hide'),\n prop: 'hide'\n }, {\n label: this.t('crud.column.fixed'),\n prop: 'fixed'\n }, {\n label: this.t('crud.column.filters'),\n prop: 'filters'\n }, {\n label: this.t('crud.column.sortable'),\n prop: 'sortable'\n }, {\n label: this.t('crud.column.width'),\n prop: 'width',\n hide: true\n }];\n }\n },\n methods: {\n handleShow: function handleShow() {\n var _this = this;\n this.data = [];\n this.crud.propOption.forEach(function (column) {\n if (column.showColumn != false) _this.data.push(column);\n });\n this.columnBox = true;\n this.$nextTick(function () {\n return _this.rowDrop();\n });\n },\n handleChange: function handleChange(prop) {\n if (['hide', 'filters'].includes(prop)) {\n this.crud.refreshTable();\n }\n },\n rowDrop: function rowDrop() {\n var _this2 = this;\n var el = this.$refs.table.$el.querySelectorAll(_config_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"].dropRowClass)[0];\n this.crud.tableDrop('column', el, function (evt) {\n var oldIndex = evt.oldIndex;\n var newIndex = evt.newIndex;\n _this2.crud.headerSort(oldIndex, newIndex);\n _this2.crud.refreshTable(function () {\n return _this2.rowDrop();\n });\n });\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/crud/dialog/dialog-column.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/dist??ref--1");
661
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var core_locale__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core/locale */ \"./src/core/locale.js\");\n/* harmony import */ var core_packages__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core/packages */ \"./src/core/packages.js\");\n/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../config.js */ \"./packages/element-ui/crud/config.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: 'crud',\n mixins: [core_locale__WEBPACK_IMPORTED_MODULE_1__[\"default\"]],\n inject: [\"crud\"],\n data: function data() {\n return {\n data: [],\n columnBox: false\n };\n },\n computed: {\n defaultColumn: function defaultColumn() {\n return [{\n label: this.t('crud.column.hide'),\n prop: 'hide'\n }, {\n label: this.t('crud.column.fixed'),\n prop: 'fixed'\n }, {\n label: this.t('crud.column.filters'),\n prop: 'filters'\n }, {\n label: this.t('crud.column.sortable'),\n prop: 'sortable'\n }, {\n label: this.t('crud.column.width'),\n prop: 'width',\n hide: true\n }];\n }\n },\n methods: {\n handleShow: function handleShow() {\n var _this = this;\n this.data = [];\n this.crud.propOption.forEach(function (column) {\n if (column.showColumn != false) _this.data.push(column);\n });\n this.columnBox = true;\n this.$nextTick(function () {\n return _this.rowDrop();\n });\n },\n handleChange: function handleChange(prop) {\n if (['hide', 'filters'].includes(prop)) {\n this.crud.doLayout();\n }\n },\n rowDrop: function rowDrop() {\n var _this2 = this;\n var el = this.$refs.table.$el.querySelectorAll(_config_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"].dropRowClass)[0];\n this.crud.tableDrop('column', el, function (evt) {\n var oldIndex = evt.oldIndex;\n var newIndex = evt.newIndex;\n _this2.crud.headerSort(oldIndex, newIndex);\n });\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/crud/dialog/dialog-column.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/dist??ref--1");
662
662
 
663
663
  /***/ }),
664
664
 
@@ -730,7 +730,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */
730
730
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
731
731
 
732
732
  "use strict";
733
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var core_packages__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core/packages */ \"./src/core/packages.js\");\n/* harmony import */ var core_locale__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core/locale */ \"./src/core/locale.js\");\n/* harmony import */ var common_directive_permission__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! common/directive/permission */ \"./packages/core/directive/permission.js\");\n/* harmony import */ var common_common_init_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! common/common/init.js */ \"./packages/core/common/init.js\");\n/* harmony import */ var _grid_index__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./grid/index */ \"./packages/element-ui/crud/grid/index.vue\");\n/* harmony import */ var _grid_item__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./grid/item */ \"./packages/element-ui/crud/grid/item.vue\");\n/* harmony import */ var _menu_table_page__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./menu/table-page */ \"./packages/element-ui/crud/menu/table-page.vue\");\n/* harmony import */ var _menu_header_search__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./menu/header-search */ \"./packages/element-ui/crud/menu/header-search.vue\");\n/* harmony import */ var _menu_header_menu__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./menu/header-menu */ \"./packages/element-ui/crud/menu/header-menu.vue\");\n/* harmony import */ var _dialog_dialog_column__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./dialog/dialog-column */ \"./packages/element-ui/crud/dialog/dialog-column.vue\");\n/* harmony import */ var _dialog_dialog_filter__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./dialog/dialog-filter */ \"./packages/element-ui/crud/dialog/dialog-filter.vue\");\n/* harmony import */ var _dialog_dialog_form__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./dialog/dialog-form */ \"./packages/element-ui/crud/dialog/dialog-form.vue\");\n/* harmony import */ var _dialog_dialog_excel__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./dialog/dialog-excel */ \"./packages/element-ui/crud/dialog/dialog-excel.vue\");\n/* harmony import */ var _column_column__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./column/column */ \"./packages/element-ui/crud/column/column.vue\");\n/* harmony import */ var _column_column_menu__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./column/column-menu */ \"./packages/element-ui/crud/column/column-menu.vue\");\n/* harmony import */ var _column_column_default__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./column/column-default */ \"./packages/element-ui/crud/column/column-default.vue\");\n/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./config.js */ \"./packages/element-ui/crud/config.js\");\n/* harmony import */ var core_dataformat__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! core/dataformat */ \"./src/core/dataformat.js\");\n/* harmony import */ var global_variable__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! global/variable */ \"./src/global/variable.js\");\n/* harmony import */ var element_plus__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! element-plus */ \"element-plus\");\n/* harmony import */ var element_plus__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(element_plus__WEBPACK_IMPORTED_MODULE_20__);\n/* harmony import */ var utils_util__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! utils/util */ \"./src/utils/util.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"crud\",\n mixins: [Object(common_common_init_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])('crud'), core_locale__WEBPACK_IMPORTED_MODULE_2__[\"default\"]],\n emits: ['update:modelValue', 'tree-load', 'selection-clear', 'header-dragend', 'expand-change', 'current-row-change', 'refresh-change', 'selection-change', 'select', 'select-all', 'sortable-change', 'filter', 'filter-change', 'sort-change', 'row-dblclick', 'row-click', 'cell-mouse-enter', 'cell-mouse-leave', 'cell-click', 'header-click', 'tab-click', 'error', 'date-change', 'update:search', 'update:page', 'search-change', 'search-reset', 'on-load', 'current-change', 'size-change', 'row-contextmenu', 'header-contextmenu', 'cell-dblclick', 'row-del', 'row-save', 'row-update', 'change'],\n directives: {\n permission: common_directive_permission__WEBPACK_IMPORTED_MODULE_3__[\"default\"]\n },\n provide: function provide() {\n return {\n crud: this\n };\n },\n components: {\n tableCard: _grid_index__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n tableItemCard: _grid_item__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n column: _column_column__WEBPACK_IMPORTED_MODULE_14__[\"default\"],\n columnDefault: _column_column_default__WEBPACK_IMPORTED_MODULE_16__[\"default\"],\n //其它列,\n columnMenu: _column_column_menu__WEBPACK_IMPORTED_MODULE_15__[\"default\"],\n //操作栏,\n tablePage: _menu_table_page__WEBPACK_IMPORTED_MODULE_7__[\"default\"],\n //分页\n headerSearch: _menu_header_search__WEBPACK_IMPORTED_MODULE_8__[\"default\"],\n //搜索\n headerMenu: _menu_header_menu__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n //菜单头部\n dialogColumn: _dialog_dialog_column__WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n //显隐列\n dialogFilter: _dialog_dialog_filter__WEBPACK_IMPORTED_MODULE_11__[\"default\"],\n //过滤器\n dialogForm: _dialog_dialog_form__WEBPACK_IMPORTED_MODULE_12__[\"default\"],\n //分页\n dialogExcel: _dialog_dialog_excel__WEBPACK_IMPORTED_MODULE_13__[\"default\"] //导出\n },\n data: function data() {\n return {\n reload: Math.random(),\n cellForm: {\n list: []\n },\n config: _config_js__WEBPACK_IMPORTED_MODULE_17__[\"default\"],\n list: [],\n listError: {},\n tableForm: {},\n tableHeight: undefined,\n tableIndex: -1,\n tableSelect: [],\n sumsList: {},\n cascaderIndexList: [],\n cascaderDicList: {},\n cascaderFormList: {},\n btnDisabledList: {},\n btnDisabled: false,\n \"default\": {},\n gridShow: false\n };\n },\n mounted: function mounted() {\n this.dataInit();\n this.getTableHeight();\n },\n computed: {\n tableName: function tableName() {\n return this.gridShow ? 'tableCard' : 'elTable';\n },\n tableColumnName: function tableColumnName() {\n return this.gridShow ? 'tableItemCard' : 'elTableColumn';\n },\n size: function size() {\n return this.tableOption.size || this.$AVUE.tableSize || this.$AVUE.size;\n },\n isSortable: function isSortable() {\n return this.tableOption.sortable;\n },\n isRowSort: function isRowSort() {\n return this.tableOption.rowSort;\n },\n isColumnSort: function isColumnSort() {\n return this.tableOption.columnSort;\n },\n rowParentKey: function rowParentKey() {\n return this.option.rowParentKey || global_variable__WEBPACK_IMPORTED_MODULE_19__[\"DIC_PROPS\"].rowParentKey;\n },\n childrenKey: function childrenKey() {\n return this.treeProps.children || global_variable__WEBPACK_IMPORTED_MODULE_19__[\"DIC_PROPS\"].children;\n },\n hasChildrenKey: function hasChildrenKey() {\n return this.treeProps.hasChildren || global_variable__WEBPACK_IMPORTED_MODULE_19__[\"DIC_PROPS\"].hasChildren;\n },\n treeProps: function treeProps() {\n return this.tableOption.treeProps || {};\n },\n isAutoHeight: function isAutoHeight() {\n return this.tableOption.height === \"auto\";\n },\n formSlot: function formSlot() {\n return this.getSlotList(['-error', '-label', '-type', '-form', '-header'], this.$slots, this.propOption);\n },\n searchSlot: function searchSlot() {\n return this.getSlotList(['-search'], this.$slots, this.propOption);\n },\n mainSlot: function mainSlot() {\n var _this = this;\n var result = [];\n this.propOption.forEach(function (item) {\n var prop = item.prop;\n if (_this.$slots[prop]) result.push(prop);\n });\n return this.getSlotList(['-header', '-form'], this.$slots, this.propOption).concat(result);\n },\n calcHeight: function calcHeight() {\n return (this.tableOption.calcHeight || 0) + this.$AVUE.calcHeight;\n },\n propOption: function propOption() {\n var result = [];\n function findProp() {\n var list = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n if (!Array.isArray(list)) return;\n list.forEach(function (ele) {\n if (Array.isArray(ele.children)) findProp(ele.children);else result.push(ele);\n });\n }\n findProp(this.columnOption);\n result = Object(core_dataformat__WEBPACK_IMPORTED_MODULE_18__[\"calcCascader\"])(result);\n return result;\n },\n isShowSummary: function isShowSummary() {\n return this.option.showSummary;\n },\n isHeader: function isHeader() {\n var flag = false;\n this.columnOption.forEach(function (ele) {\n if (ele.children) {\n flag = true;\n }\n });\n return flag;\n },\n isTree: function isTree() {\n var flag = false;\n this.data.forEach(function (ele) {\n if (ele.children) {\n flag = true;\n }\n });\n return this.validData(this.tableOption.tree, flag);\n },\n isCard: function isCard() {\n return this.option.card ? 'always' : 'never';\n },\n expandLevel: function expandLevel() {\n return this.parentOption.expandLevel || 0;\n },\n expandAll: function expandAll() {\n return this.parentOption.expandAll || false;\n },\n parentOption: function parentOption() {\n return this.tableOption || {};\n },\n columnOption: function columnOption() {\n return Object(utils_util__WEBPACK_IMPORTED_MODULE_21__[\"getColumn\"])(this.tableOption.column);\n },\n sumColumnList: function sumColumnList() {\n return this.tableOption.sumColumnList || [];\n },\n selectLen: function selectLen() {\n return this.tableSelect ? this.tableSelect.length : 0;\n }\n },\n watch: {\n modelValue: {\n handler: function handler(val) {\n this.tableForm = val;\n },\n immediate: true,\n deep: true\n },\n list: {\n handler: function handler() {\n this.cellForm.list = this.list;\n },\n deep: true\n },\n data: {\n handler: function handler() {\n this.dataInit();\n },\n deep: true\n },\n tableOption: {\n handler: function handler() {\n this.gridShow = this.tableOption.grid;\n },\n immediate: true\n }\n },\n props: {\n spanMethod: Function,\n summaryMethod: Function,\n beforeClose: Function,\n beforeOpen: Function,\n rowStyle: [Function, Object],\n cellStyle: [Function, Object],\n rowClassName: [Function, String],\n cellClassName: [Function, String],\n headerCellClassName: [Function, String],\n headerRowClassName: [Function, String],\n headerRowStyle: [Function, Object],\n headerCellStyle: [Function, Object],\n uploadSized: Function,\n uploadBefore: Function,\n uploadAfter: Function,\n uploadDelete: Function,\n uploadPreview: Function,\n uploadError: Function,\n uploadExceed: Function,\n permission: {\n type: [Function, Object],\n \"default\": function _default() {\n return {};\n }\n },\n modelValue: {\n type: Object,\n \"default\": function _default() {\n return {};\n }\n },\n search: {\n type: Object,\n \"default\": function _default() {\n return {};\n }\n },\n page: {\n type: Object,\n \"default\": function _default() {\n return {};\n }\n },\n tableLoading: {\n type: Boolean,\n \"default\": false\n },\n disabled: {\n type: Boolean,\n \"default\": false\n },\n data: {\n type: Array,\n required: true,\n \"default\": function _default() {\n return [];\n }\n }\n },\n methods: {\n handleGridShow: function handleGridShow() {\n this.gridShow = !this.gridShow;\n },\n handleValidate: function handleValidate(prop, valid, msg) {\n if (!this.listError[prop]) this.listError[prop] = {\n valid: false,\n msg: ''\n };\n this.listError[prop].valid = !valid;\n this.listError[prop].msg = msg;\n },\n getPermission: function getPermission(key, row, index) {\n if (typeof this.permission === \"function\") {\n return this.permission(key, row, index);\n } else if (!this.validatenull(this.permission[key])) {\n return this.permission[key];\n } else {\n return true;\n }\n },\n getTableHeight: function getTableHeight() {\n var _this2 = this;\n this.$nextTick(function () {\n if (_this2.isAutoHeight) {\n var clientHeight = document.documentElement.clientHeight;\n var calcHeight = _this2.calcHeight || 0;\n var tableRef = _this2.$refs.table;\n var tablePageRef = _this2.$refs.tablePage;\n var tableHeight = clientHeight - calcHeight;\n if (tableRef) {\n var height = tableRef.$el.offsetTop || 0;\n tableHeight -= height;\n }\n if (tablePageRef) {\n var _height = tablePageRef.$el.offsetHeight || 0;\n tableHeight -= _height;\n }\n _this2.tableHeight = tableHeight;\n } else {\n _this2.tableHeight = _this2.tableOption.height;\n }\n _this2.refreshTable();\n });\n },\n doLayout: function doLayout() {\n this.$refs.table.doLayout();\n },\n refreshTable: function refreshTable(callback) {\n this.reload = Math.random();\n this.tableSelect = [];\n this.$nextTick(function () {\n callback && callback();\n });\n },\n //树懒加载\n treeLoad: function treeLoad(tree, treeNode, resolve) {\n this.$emit('tree-load', tree, treeNode, function (data) {\n tree.children = data;\n resolve(data);\n });\n },\n menuIcon: function menuIcon(value) {\n return this.validData(this.tableOption[value + 'Text'], this.t(\"crud.\" + value));\n },\n getBtnIcon: function getBtnIcon(value) {\n var name = value + 'Icon';\n return this.tableOption[name] ? this.tableOption[name].trim() : _config_js__WEBPACK_IMPORTED_MODULE_17__[\"default\"][name];\n },\n //对部分表单字段进行校验的方法\n validateField: function validateField(val) {\n return this.$refs.dialogForm.$refs.tableForm.validateField(val);\n },\n clearSelection: function clearSelection() {\n this.$emit('selection-clear', this.deepClone(this.tableSelect));\n this.$refs.table.clearSelection();\n },\n toggleAllSelection: function toggleAllSelection() {\n this.$refs.table.toggleAllSelection();\n },\n toggleRowSelection: function toggleRowSelection(row, selected) {\n this.$refs.table.toggleRowSelection(row, selected);\n },\n toggleRowExpansion: function toggleRowExpansion(row, expanded) {\n this.$refs.table.toggleRowExpansion(row, expanded);\n },\n setCurrentRow: function setCurrentRow(row) {\n this.$refs.table.setCurrentRow(row);\n },\n dataInit: function dataInit() {\n var _this3 = this;\n this.list = this.data;\n //初始化序列的参数\n this.list.forEach(function (ele, index) {\n if (ele.$cellEdit && !_this3.cascaderFormList[index]) {\n _this3.cascaderFormList[index] = _this3.deepClone(ele);\n }\n ele.$cellEdit = ele.$cellEdit || false;\n ele.$index = index;\n });\n },\n //拖动表头事件\n headerDragend: function headerDragend(newWidth, oldWidth, column, event) {\n var obj = this.objectOption[column.property];\n if (obj) this.objectOption[column.property].width = newWidth;\n this.$emit(\"header-dragend\", newWidth, oldWidth, column, event);\n },\n headerSort: function headerSort(oldIndex, newIndex) {\n var column = this.columnOption;\n var targetRow = column.splice(oldIndex, 1)[0];\n column.splice(newIndex, 0, targetRow);\n this.refreshTable();\n },\n clearFilter: function clearFilter(name) {\n this.$refs.table.clearFilter(name);\n },\n //展开或则关闭\n expandChange: function expandChange(row, expand) {\n this.$emit(\"expand-change\", row, expand);\n },\n //设置单选\n currentRowChange: function currentRowChange(row) {\n this.$emit(\"current-row-change\", row);\n },\n //刷新事件\n refreshChange: function refreshChange() {\n this.$emit(\"refresh-change\");\n },\n // 选中实例\n toggleSelection: function toggleSelection(rows, checked) {\n var _this4 = this;\n if (rows) {\n rows.forEach(function (row) {\n _this4.$refs.table.toggleRowSelection(row, checked);\n });\n } else {\n this.$refs.table.clearSelection();\n }\n },\n // 选择回调\n selectionChange: function selectionChange(val) {\n this.tableSelect = val;\n this.$emit(\"selection-change\", this.tableSelect);\n },\n // 单个选择回调\n select: function select(selection, row) {\n this.$emit(\"select\", selection, row);\n },\n // 点击勾选全选 Checkbox\n selectAll: function selectAll(selection) {\n this.$emit(\"select-all\", selection);\n },\n //筛选回调用\n filterChange: function filterChange(filters) {\n this.$emit(\"filter-change\", filters);\n },\n // 排序回调\n sortChange: function sortChange(val) {\n this.$emit(\"sort-change\", val);\n },\n // 行双击\n rowDblclick: function rowDblclick(row, event) {\n this.$emit(\"row-dblclick\", row, event);\n },\n // 行单机\n rowClick: function rowClick(row, event, column) {\n this.$emit(\"row-click\", row, event, column);\n },\n //清空排序\n clearSort: function clearSort() {\n this.$refs.table.clearSort();\n },\n //当单元格 hover 进入时会触发该事件\n cellMouseEnter: function cellMouseEnter(row, column, cell, event) {\n this.$emit(\"cell-mouse-enter\", row, column, cell, event);\n },\n //当单元格 hover 退出时会触发该事件\n cellMouseLeave: function cellMouseLeave(row, column, cell, event) {\n this.$emit(\"cell-mouse-leave\", row, column, cell, event);\n },\n //当某个单元格被点击时会触发该事件\n cellClick: function cellClick(row, column, cell, event) {\n this.$emit(\"cell-click\", row, column, cell, event);\n },\n //\t当某一列的表头被点击时会触发该事件\n headerClick: function headerClick(column, event) {\n this.$emit(\"header-click\", column, event);\n },\n //当某一行被鼠标右键点击时会触发该事件\n rowContextmenu: function rowContextmenu(row, column, event) {\n this.$emit(\"row-contextmenu\", row, column, event);\n },\n //当某一列的表头被鼠标右键点击时触发该事件\n headerContextmenu: function headerContextmenu(column, event) {\n this.$emit(\"header-contextmenu\", column, event);\n },\n //当某个单元格被双击击时会触发该事件\n cellDblclick: function cellDblclick(row, column, cell, event) {\n this.$emit(\"cell-dblclick\", row, column, cell, event);\n },\n //单元格新增\n rowCellAdd: function rowCellAdd() {\n var row = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var len = this.list.length;\n var formDefault = Object(core_dataformat__WEBPACK_IMPORTED_MODULE_18__[\"formInitVal\"])(this.propOption);\n row = this.deepClone(Object.assign({\n $cellEdit: true,\n $index: len\n }, formDefault, row));\n this.list.push(row);\n },\n //行取消\n rowCancel: function rowCancel(row, index) {\n if (this.validatenull(row[this.rowKey])) {\n this.list.splice(index, 1);\n delete this.cascaderDIC[index];\n } else {\n this.cascaderFormList[index].$cellEdit = false;\n this.cascaderDIC[index] = this.cascaderDicList[index];\n this.list[index] = this.cascaderFormList[index];\n }\n delete this.cascaderDicList[index];\n delete this.cascaderFormList[index];\n this.cascaderIndexList.splice(this.cascaderIndexList.indexOf(index), 1);\n },\n //行编辑点击\n rowCell: function rowCell(row, index) {\n if (row.$cellEdit) {\n this.rowCellUpdate(row, index);\n } else {\n this.rowCellEdit(row, index);\n }\n },\n rowCellUpdate: function rowCellUpdate(row, index) {\n var _this5 = this;\n row = this.deepClone(row);\n var done = function done(row) {\n _this5.btnDisabledList[index] = false;\n _this5.btnDisabled = false;\n if (row) _this5.list[index] = row;\n _this5.list[index].$cellEdit = false;\n _this5.cascaderIndexList.splice(_this5.cascaderIndexList.indexOf(index), 1);\n delete _this5.cascaderFormList[index];\n };\n var loading = function loading() {\n _this5.btnDisabledList[index] = false;\n _this5.btnDisabled = false;\n };\n this.validateCellField(index).then(function () {\n _this5.btnDisabledList[index] = true;\n _this5.btnDisabled = true;\n if (_this5.validatenull(row[_this5.rowKey])) {\n _this5.$emit(\"row-save\", row, done, loading);\n } else {\n _this5.$emit(\"row-update\", row, index, done, loading);\n }\n });\n },\n // 单元格编辑\n rowCellEdit: function rowCellEdit(row, index) {\n row.$cellEdit = true;\n //缓冲行数据\n this.cascaderFormList[index] = this.deepClone(row);\n //缓冲级联字典\n this.cascaderDicList[index] = this.deepClone(this.cascaderDIC[index]);\n },\n // 对部分表单字段进行校验\n validateCellForm: function validateCellForm(cb) {\n var _this6 = this;\n return new Promise(function (resolve) {\n _this6.$refs.cellForm.validate(function (valid, msg) {\n resolve(msg);\n });\n });\n },\n validateCellField: function validateCellField(index) {\n var _this7 = this;\n return new Promise(function (resolve, reject) {\n _this7.$refs.cellForm.validate(function (valid) {\n var msg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var result = true;\n var list = [];\n Object.keys(msg).forEach(function (ele) {\n if (ele.indexOf(\"list.\".concat(index)) !== -1) {\n result = false;\n } else {\n list.push(ele);\n }\n });\n if (!_this7.validatenull(list)) _this7.$refs.cellForm.clearValidate(list);\n if (result) resolve();\n });\n });\n },\n rowAdd: function rowAdd() {\n this.$refs.dialogForm.show(\"add\");\n },\n rowSave: function rowSave() {\n return this.$refs.dialogForm.$refs.tableForm.submit();\n },\n rowUpdate: function rowUpdate() {\n return this.$refs.dialogForm.$refs.tableForm.submit();\n },\n closeDialog: function closeDialog() {\n return this.$refs.dialogForm.closeDialog();\n },\n getPropRef: function getPropRef(prop) {\n return this.$refs.dialogForm.$refs.tableForm.getPropRef(prop);\n },\n setVal: function setVal() {\n this.$emit('update:modelValue', this.tableForm);\n this.$emit('change', this.tableForm);\n },\n // 编辑\n rowEdit: function rowEdit(row, index) {\n this.tableForm = this.deepClone(row);\n this.tableIndex = index;\n this.setVal();\n this.$refs.dialogForm.show(\"edit\");\n },\n //复制\n rowCopy: function rowCopy(row) {\n this.tableForm = this.deepClone(row);\n delete this.tableForm[this.rowKey];\n this.tableIndex = -1;\n this.setVal();\n this.$refs.dialogForm.show(\"add\");\n },\n //查看\n rowView: function rowView(row, index) {\n this.tableForm = this.deepClone(row);\n this.tableIndex = index;\n this.setVal();\n this.$refs.dialogForm.show(\"view\");\n },\n // 删除\n rowDel: function rowDel(row, index) {\n var _this8 = this;\n this.$emit(\"row-del\", row, index, function () {\n var _this8$findData = _this8.findData(row[_this8.rowKey]),\n parentList = _this8$findData.parentList,\n index = _this8$findData.index;\n if (parentList) parentList.splice(index, 1);\n });\n },\n //合并行\n tableSpanMethod: function tableSpanMethod(param) {\n if (typeof this.spanMethod === \"function\") return this.spanMethod(param);\n },\n //合集统计逻辑\n tableSummaryMethod: function tableSummaryMethod(param) {\n var _this9 = this;\n var sumsList = {};\n var sums = [];\n var columns = param.columns,\n data = param.data;\n //如果自己写逻辑则调用summaryMethod方法\n if (typeof this.summaryMethod === \"function\") {\n sums = this.summaryMethod(param);\n columns.forEach(function (column, index) {\n sumsList[column.property] = sums[index];\n });\n this.sumsList = sumsList;\n } else {\n columns.forEach(function (column, index) {\n var currItem = _this9.sumColumnList.find(function (item) {\n return item.name === column.property;\n });\n if (currItem) {\n var decimals = currItem.decimals || 2;\n var label = currItem.label || '';\n switch (currItem.type) {\n case \"count\":\n sums[index] = label + data.length;\n break;\n case \"avg\":\n var avgValues = data.map(function (item) {\n return Number(item[column.property]);\n });\n var nowindex = 1;\n sums[index] = avgValues.reduce(function (perv, curr) {\n var value = Number(curr);\n if (!isNaN(value)) {\n return (perv * (nowindex - 1) + curr) / nowindex++;\n } else {\n return perv;\n }\n }, 0);\n sums[index] = label + sums[index].toFixed(decimals);\n break;\n case \"sum\":\n var values = data.map(function (item) {\n return Number(item[column.property]);\n });\n sums[index] = values.reduce(function (perv, curr) {\n var value = Number(curr);\n if (!isNaN(value)) {\n return perv + curr;\n } else {\n return perv;\n }\n }, 0);\n sums[index] = label + sums[index].toFixed(decimals);\n break;\n }\n sumsList[column.property] = sums[index];\n } else {\n sums[index] = \"\";\n }\n });\n }\n this.sumsList = sumsList;\n return sums;\n },\n tableDrop: function tableDrop(type, el, callback) {\n if (this.isSortable !== true) {\n if (type == 'row' && !this.isRowSort) {\n return;\n } else if (type == 'column' && !this.isColumnSort) {\n return;\n }\n }\n if (!window.Sortable) {\n core_packages__WEBPACK_IMPORTED_MODULE_1__[\"default\"].logs(\"Sortable\");\n return;\n }\n window.Sortable.create(el, {\n ghostClass: _config_js__WEBPACK_IMPORTED_MODULE_17__[\"default\"].ghostClass,\n chosenClass: _config_js__WEBPACK_IMPORTED_MODULE_17__[\"default\"].ghostClass,\n animation: 100,\n delay: 0,\n onEnd: function onEnd(evt) {\n return callback(evt);\n }\n });\n },\n findData: function findData(id) {\n var _this10 = this;\n var result = {};\n var callback = function callback(parentList, parent) {\n parentList.forEach(function (ele, index) {\n if (ele[_this10.rowKey] == id) {\n result = {\n item: ele,\n index: index,\n parentList: parentList,\n parent: parent\n };\n }\n if (ele[_this10.childrenKey]) {\n callback(ele[_this10.childrenKey], ele);\n }\n });\n };\n callback(this.list);\n return result;\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/crud/index.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/dist??ref--1");
733
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var core_packages__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core/packages */ \"./src/core/packages.js\");\n/* harmony import */ var core_locale__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core/locale */ \"./src/core/locale.js\");\n/* harmony import */ var common_directive_permission__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! common/directive/permission */ \"./packages/core/directive/permission.js\");\n/* harmony import */ var common_common_init_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! common/common/init.js */ \"./packages/core/common/init.js\");\n/* harmony import */ var _grid_index__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./grid/index */ \"./packages/element-ui/crud/grid/index.vue\");\n/* harmony import */ var _grid_item__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./grid/item */ \"./packages/element-ui/crud/grid/item.vue\");\n/* harmony import */ var _menu_table_page__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./menu/table-page */ \"./packages/element-ui/crud/menu/table-page.vue\");\n/* harmony import */ var _menu_header_search__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./menu/header-search */ \"./packages/element-ui/crud/menu/header-search.vue\");\n/* harmony import */ var _menu_header_menu__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./menu/header-menu */ \"./packages/element-ui/crud/menu/header-menu.vue\");\n/* harmony import */ var _dialog_dialog_column__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./dialog/dialog-column */ \"./packages/element-ui/crud/dialog/dialog-column.vue\");\n/* harmony import */ var _dialog_dialog_filter__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./dialog/dialog-filter */ \"./packages/element-ui/crud/dialog/dialog-filter.vue\");\n/* harmony import */ var _dialog_dialog_form__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./dialog/dialog-form */ \"./packages/element-ui/crud/dialog/dialog-form.vue\");\n/* harmony import */ var _dialog_dialog_excel__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./dialog/dialog-excel */ \"./packages/element-ui/crud/dialog/dialog-excel.vue\");\n/* harmony import */ var _column_column__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./column/column */ \"./packages/element-ui/crud/column/column.vue\");\n/* harmony import */ var _column_column_menu__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./column/column-menu */ \"./packages/element-ui/crud/column/column-menu.vue\");\n/* harmony import */ var _column_column_default__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./column/column-default */ \"./packages/element-ui/crud/column/column-default.vue\");\n/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./config.js */ \"./packages/element-ui/crud/config.js\");\n/* harmony import */ var core_dataformat__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! core/dataformat */ \"./src/core/dataformat.js\");\n/* harmony import */ var global_variable__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! global/variable */ \"./src/global/variable.js\");\n/* harmony import */ var element_plus__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! element-plus */ \"element-plus\");\n/* harmony import */ var element_plus__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(element_plus__WEBPACK_IMPORTED_MODULE_20__);\n/* harmony import */ var utils_util__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! utils/util */ \"./src/utils/util.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"crud\",\n mixins: [Object(common_common_init_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])('crud'), core_locale__WEBPACK_IMPORTED_MODULE_2__[\"default\"]],\n emits: ['update:modelValue', 'tree-load', 'selection-clear', 'header-dragend', 'expand-change', 'current-row-change', 'refresh-change', 'selection-change', 'select', 'select-all', 'sortable-change', 'filter', 'filter-change', 'sort-change', 'row-dblclick', 'row-click', 'cell-mouse-enter', 'cell-mouse-leave', 'cell-click', 'header-click', 'tab-click', 'error', 'date-change', 'update:search', 'update:page', 'search-change', 'search-reset', 'on-load', 'current-change', 'size-change', 'row-contextmenu', 'header-contextmenu', 'cell-dblclick', 'row-del', 'row-save', 'row-update', 'change'],\n directives: {\n permission: common_directive_permission__WEBPACK_IMPORTED_MODULE_3__[\"default\"]\n },\n provide: function provide() {\n return {\n crud: this\n };\n },\n components: {\n tableCard: _grid_index__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n tableItemCard: _grid_item__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n column: _column_column__WEBPACK_IMPORTED_MODULE_14__[\"default\"],\n columnDefault: _column_column_default__WEBPACK_IMPORTED_MODULE_16__[\"default\"],\n //其它列,\n columnMenu: _column_column_menu__WEBPACK_IMPORTED_MODULE_15__[\"default\"],\n //操作栏,\n tablePage: _menu_table_page__WEBPACK_IMPORTED_MODULE_7__[\"default\"],\n //分页\n headerSearch: _menu_header_search__WEBPACK_IMPORTED_MODULE_8__[\"default\"],\n //搜索\n headerMenu: _menu_header_menu__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n //菜单头部\n dialogColumn: _dialog_dialog_column__WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n //显隐列\n dialogFilter: _dialog_dialog_filter__WEBPACK_IMPORTED_MODULE_11__[\"default\"],\n //过滤器\n dialogForm: _dialog_dialog_form__WEBPACK_IMPORTED_MODULE_12__[\"default\"],\n //分页\n dialogExcel: _dialog_dialog_excel__WEBPACK_IMPORTED_MODULE_13__[\"default\"] //导出\n },\n data: function data() {\n return {\n reload: Math.random(),\n cellForm: {\n list: []\n },\n config: _config_js__WEBPACK_IMPORTED_MODULE_17__[\"default\"],\n list: [],\n listError: {},\n tableForm: {},\n tableHeight: undefined,\n tableIndex: -1,\n tableSelect: [],\n sumsList: {},\n cascaderIndexList: [],\n cascaderDicList: {},\n cascaderFormList: {},\n btnDisabledList: {},\n btnDisabled: false,\n \"default\": {},\n gridShow: false\n };\n },\n mounted: function mounted() {\n this.dataInit();\n this.getTableHeight();\n },\n computed: {\n tableName: function tableName() {\n return this.gridShow ? 'tableCard' : 'elTable';\n },\n tableColumnName: function tableColumnName() {\n return this.gridShow ? 'tableItemCard' : 'elTableColumn';\n },\n size: function size() {\n return this.tableOption.size || this.$AVUE.tableSize || this.$AVUE.size;\n },\n isSortable: function isSortable() {\n return this.tableOption.sortable;\n },\n isRowSort: function isRowSort() {\n return this.tableOption.rowSort;\n },\n isColumnSort: function isColumnSort() {\n return this.tableOption.columnSort;\n },\n rowParentKey: function rowParentKey() {\n return this.option.rowParentKey || global_variable__WEBPACK_IMPORTED_MODULE_19__[\"DIC_PROPS\"].rowParentKey;\n },\n childrenKey: function childrenKey() {\n return this.treeProps.children || global_variable__WEBPACK_IMPORTED_MODULE_19__[\"DIC_PROPS\"].children;\n },\n hasChildrenKey: function hasChildrenKey() {\n return this.treeProps.hasChildren || global_variable__WEBPACK_IMPORTED_MODULE_19__[\"DIC_PROPS\"].hasChildren;\n },\n treeProps: function treeProps() {\n return this.tableOption.treeProps || {};\n },\n isAutoHeight: function isAutoHeight() {\n return this.tableOption.height === \"auto\";\n },\n formSlot: function formSlot() {\n return this.getSlotList(['-error', '-label', '-type', '-form', '-header'], this.$slots, this.propOption);\n },\n searchSlot: function searchSlot() {\n return this.getSlotList(['-search'], this.$slots, this.propOption);\n },\n mainSlot: function mainSlot() {\n var _this = this;\n var result = [];\n this.propOption.forEach(function (item) {\n var prop = item.prop;\n if (_this.$slots[prop]) result.push(prop);\n });\n return this.getSlotList(['-header', '-form'], this.$slots, this.propOption).concat(result);\n },\n calcHeight: function calcHeight() {\n return (this.tableOption.calcHeight || 0) + this.$AVUE.calcHeight;\n },\n propOption: function propOption() {\n var result = [];\n function findProp() {\n var list = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n if (!Array.isArray(list)) return;\n list.forEach(function (ele) {\n if (Array.isArray(ele.children)) findProp(ele.children);else result.push(ele);\n });\n }\n findProp(this.columnOption);\n result = Object(core_dataformat__WEBPACK_IMPORTED_MODULE_18__[\"calcCascader\"])(result);\n return result;\n },\n isShowSummary: function isShowSummary() {\n return this.option.showSummary;\n },\n isHeader: function isHeader() {\n var flag = false;\n this.columnOption.forEach(function (ele) {\n if (ele.children) {\n flag = true;\n }\n });\n return flag;\n },\n isTree: function isTree() {\n var flag = false;\n this.data.forEach(function (ele) {\n if (ele.children) {\n flag = true;\n }\n });\n return this.validData(this.tableOption.tree, flag);\n },\n isCard: function isCard() {\n return this.option.card ? 'always' : 'never';\n },\n expandLevel: function expandLevel() {\n return this.parentOption.expandLevel || 0;\n },\n expandAll: function expandAll() {\n return this.parentOption.expandAll || false;\n },\n parentOption: function parentOption() {\n return this.tableOption || {};\n },\n columnOption: function columnOption() {\n return Object(utils_util__WEBPACK_IMPORTED_MODULE_21__[\"getColumn\"])(this.tableOption.column);\n },\n sumColumnList: function sumColumnList() {\n return this.tableOption.sumColumnList || [];\n },\n selectLen: function selectLen() {\n return this.tableSelect ? this.tableSelect.length : 0;\n }\n },\n watch: {\n modelValue: {\n handler: function handler(val) {\n this.tableForm = val;\n },\n immediate: true,\n deep: true\n },\n list: {\n handler: function handler() {\n this.cellForm.list = this.list;\n },\n deep: true\n },\n data: {\n handler: function handler() {\n this.dataInit();\n },\n deep: true\n },\n tableOption: {\n handler: function handler() {\n this.gridShow = this.tableOption.grid;\n },\n immediate: true\n }\n },\n props: {\n spanMethod: Function,\n summaryMethod: Function,\n beforeClose: Function,\n beforeOpen: Function,\n rowStyle: [Function, Object],\n cellStyle: [Function, Object],\n rowClassName: [Function, String],\n cellClassName: [Function, String],\n headerCellClassName: [Function, String],\n headerRowClassName: [Function, String],\n headerRowStyle: [Function, Object],\n headerCellStyle: [Function, Object],\n uploadSized: Function,\n uploadBefore: Function,\n uploadAfter: Function,\n uploadDelete: Function,\n uploadPreview: Function,\n uploadError: Function,\n uploadExceed: Function,\n permission: {\n type: [Function, Object],\n \"default\": function _default() {\n return {};\n }\n },\n modelValue: {\n type: Object,\n \"default\": function _default() {\n return {};\n }\n },\n search: {\n type: Object,\n \"default\": function _default() {\n return {};\n }\n },\n page: {\n type: Object,\n \"default\": function _default() {\n return {};\n }\n },\n tableLoading: {\n type: Boolean,\n \"default\": false\n },\n disabled: {\n type: Boolean,\n \"default\": false\n },\n data: {\n type: Array,\n required: true,\n \"default\": function _default() {\n return [];\n }\n }\n },\n methods: {\n handleGridShow: function handleGridShow() {\n this.gridShow = !this.gridShow;\n },\n handleValidate: function handleValidate(prop, valid, msg) {\n if (!this.listError[prop]) this.listError[prop] = {\n valid: false,\n msg: ''\n };\n this.listError[prop].valid = !valid;\n this.listError[prop].msg = msg;\n },\n getPermission: function getPermission(key, row, index) {\n if (typeof this.permission === \"function\") {\n return this.permission(key, row, index);\n } else if (!this.validatenull(this.permission[key])) {\n return this.permission[key];\n } else {\n return true;\n }\n },\n getTableHeight: function getTableHeight() {\n var _this2 = this;\n this.$nextTick(function () {\n if (_this2.isAutoHeight) {\n var clientHeight = document.documentElement.clientHeight;\n var calcHeight = _this2.calcHeight || 0;\n var tableRef = _this2.$refs.table;\n var tablePageRef = _this2.$refs.tablePage;\n var tableHeight = clientHeight - calcHeight;\n if (tableRef) {\n var height = tableRef.$el.offsetTop || 0;\n tableHeight -= height;\n }\n if (tablePageRef) {\n var _height = tablePageRef.$el.offsetHeight || 0;\n tableHeight -= _height;\n }\n _this2.tableHeight = tableHeight;\n } else {\n _this2.tableHeight = _this2.tableOption.height;\n }\n _this2.doLayout();\n });\n },\n doLayout: function doLayout() {\n this.$refs.table.doLayout();\n },\n refreshTable: function refreshTable(callback) {\n this.reload = Math.random();\n this.tableSelect = [];\n this.$nextTick(function () {\n callback && callback();\n });\n },\n //树懒加载\n treeLoad: function treeLoad(tree, treeNode, resolve) {\n this.$emit('tree-load', tree, treeNode, function (data) {\n tree.children = data;\n resolve(data);\n });\n },\n menuIcon: function menuIcon(value) {\n return this.validData(this.tableOption[value + 'Text'], this.t(\"crud.\" + value));\n },\n getBtnIcon: function getBtnIcon(value) {\n var name = value + 'Icon';\n return this.tableOption[name] ? this.tableOption[name].trim() : _config_js__WEBPACK_IMPORTED_MODULE_17__[\"default\"][name];\n },\n //对部分表单字段进行校验的方法\n validateField: function validateField(val) {\n return this.$refs.dialogForm.$refs.tableForm.validateField(val);\n },\n clearSelection: function clearSelection() {\n this.$emit('selection-clear', this.deepClone(this.tableSelect));\n this.$refs.table.clearSelection();\n },\n toggleAllSelection: function toggleAllSelection() {\n this.$refs.table.toggleAllSelection();\n },\n toggleRowSelection: function toggleRowSelection(row, selected) {\n this.$refs.table.toggleRowSelection(row, selected);\n },\n toggleRowExpansion: function toggleRowExpansion(row, expanded) {\n this.$refs.table.toggleRowExpansion(row, expanded);\n },\n setCurrentRow: function setCurrentRow(row) {\n this.$refs.table.setCurrentRow(row);\n },\n dataInit: function dataInit() {\n var _this3 = this;\n this.list = this.data;\n //初始化序列的参数\n this.list.forEach(function (ele, index) {\n if (ele.$cellEdit && !_this3.cascaderFormList[index]) {\n _this3.cascaderFormList[index] = _this3.deepClone(ele);\n }\n ele.$cellEdit = ele.$cellEdit || false;\n ele.$index = index;\n });\n },\n //拖动表头事件\n headerDragend: function headerDragend(newWidth, oldWidth, column, event) {\n var obj = this.objectOption[column.property];\n if (obj) this.objectOption[column.property].width = newWidth;\n this.$emit(\"header-dragend\", newWidth, oldWidth, column, event);\n },\n headerSort: function headerSort(oldIndex, newIndex) {\n var column = this.columnOption;\n var targetRow = column.splice(oldIndex, 1)[0];\n column.splice(newIndex, 0, targetRow);\n this.doLayout();\n },\n clearFilter: function clearFilter(name) {\n this.$refs.table.clearFilter(name);\n },\n //展开或则关闭\n expandChange: function expandChange(row, expand) {\n this.$emit(\"expand-change\", row, expand);\n },\n //设置单选\n currentRowChange: function currentRowChange(row) {\n this.$emit(\"current-row-change\", row);\n },\n //刷新事件\n refreshChange: function refreshChange() {\n this.$emit(\"refresh-change\");\n },\n // 选中实例\n toggleSelection: function toggleSelection(rows, checked) {\n var _this4 = this;\n if (rows) {\n rows.forEach(function (row) {\n _this4.$refs.table.toggleRowSelection(row, checked);\n });\n } else {\n this.$refs.table.clearSelection();\n }\n },\n // 选择回调\n selectionChange: function selectionChange(val) {\n this.tableSelect = val;\n this.$emit(\"selection-change\", this.tableSelect);\n },\n // 单个选择回调\n select: function select(selection, row) {\n this.$emit(\"select\", selection, row);\n },\n // 点击勾选全选 Checkbox\n selectAll: function selectAll(selection) {\n this.$emit(\"select-all\", selection);\n },\n //筛选回调用\n filterChange: function filterChange(filters) {\n this.$emit(\"filter-change\", filters);\n },\n // 排序回调\n sortChange: function sortChange(val) {\n this.$emit(\"sort-change\", val);\n },\n // 行双击\n rowDblclick: function rowDblclick(row, event) {\n this.$emit(\"row-dblclick\", row, event);\n },\n // 行单机\n rowClick: function rowClick(row, event, column) {\n this.$emit(\"row-click\", row, event, column);\n },\n //清空排序\n clearSort: function clearSort() {\n this.$refs.table.clearSort();\n },\n //当单元格 hover 进入时会触发该事件\n cellMouseEnter: function cellMouseEnter(row, column, cell, event) {\n this.$emit(\"cell-mouse-enter\", row, column, cell, event);\n },\n //当单元格 hover 退出时会触发该事件\n cellMouseLeave: function cellMouseLeave(row, column, cell, event) {\n this.$emit(\"cell-mouse-leave\", row, column, cell, event);\n },\n //当某个单元格被点击时会触发该事件\n cellClick: function cellClick(row, column, cell, event) {\n this.$emit(\"cell-click\", row, column, cell, event);\n },\n //\t当某一列的表头被点击时会触发该事件\n headerClick: function headerClick(column, event) {\n this.$emit(\"header-click\", column, event);\n },\n //当某一行被鼠标右键点击时会触发该事件\n rowContextmenu: function rowContextmenu(row, column, event) {\n this.$emit(\"row-contextmenu\", row, column, event);\n },\n //当某一列的表头被鼠标右键点击时触发该事件\n headerContextmenu: function headerContextmenu(column, event) {\n this.$emit(\"header-contextmenu\", column, event);\n },\n //当某个单元格被双击击时会触发该事件\n cellDblclick: function cellDblclick(row, column, cell, event) {\n this.$emit(\"cell-dblclick\", row, column, cell, event);\n },\n //单元格新增\n rowCellAdd: function rowCellAdd() {\n var row = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var len = this.list.length;\n var formDefault = Object(core_dataformat__WEBPACK_IMPORTED_MODULE_18__[\"formInitVal\"])(this.propOption);\n row = this.deepClone(Object.assign({\n $cellEdit: true,\n $index: len\n }, formDefault, row));\n this.list.push(row);\n },\n //行取消\n rowCancel: function rowCancel(row, index) {\n if (this.validatenull(row[this.rowKey])) {\n this.list.splice(index, 1);\n delete this.cascaderDIC[index];\n } else {\n this.cascaderFormList[index].$cellEdit = false;\n this.cascaderDIC[index] = this.cascaderDicList[index];\n this.list[index] = this.cascaderFormList[index];\n }\n delete this.cascaderDicList[index];\n delete this.cascaderFormList[index];\n this.cascaderIndexList.splice(this.cascaderIndexList.indexOf(index), 1);\n },\n //行编辑点击\n rowCell: function rowCell(row, index) {\n if (row.$cellEdit) {\n this.rowCellUpdate(row, index);\n } else {\n this.rowCellEdit(row, index);\n }\n },\n rowCellUpdate: function rowCellUpdate(row, index) {\n var _this5 = this;\n row = this.deepClone(row);\n var done = function done(row) {\n _this5.btnDisabledList[index] = false;\n _this5.btnDisabled = false;\n if (row) _this5.list[index] = row;\n _this5.list[index].$cellEdit = false;\n _this5.cascaderIndexList.splice(_this5.cascaderIndexList.indexOf(index), 1);\n delete _this5.cascaderFormList[index];\n };\n var loading = function loading() {\n _this5.btnDisabledList[index] = false;\n _this5.btnDisabled = false;\n };\n this.validateCellField(index).then(function () {\n _this5.btnDisabledList[index] = true;\n _this5.btnDisabled = true;\n if (_this5.validatenull(row[_this5.rowKey])) {\n _this5.$emit(\"row-save\", row, done, loading);\n } else {\n _this5.$emit(\"row-update\", row, index, done, loading);\n }\n });\n },\n // 单元格编辑\n rowCellEdit: function rowCellEdit(row, index) {\n row.$cellEdit = true;\n //缓冲行数据\n this.cascaderFormList[index] = this.deepClone(row);\n //缓冲级联字典\n this.cascaderDicList[index] = this.deepClone(this.cascaderDIC[index]);\n },\n // 对部分表单字段进行校验\n validateCellForm: function validateCellForm(cb) {\n var _this6 = this;\n return new Promise(function (resolve) {\n _this6.$refs.cellForm.validate(function (valid, msg) {\n resolve(msg);\n });\n });\n },\n validateCellField: function validateCellField(index) {\n var _this7 = this;\n return new Promise(function (resolve, reject) {\n _this7.$refs.cellForm.validate(function (valid) {\n var msg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var result = true;\n var list = [];\n Object.keys(msg).forEach(function (ele) {\n if (ele.indexOf(\"list.\".concat(index)) !== -1) {\n result = false;\n } else {\n list.push(ele);\n }\n });\n if (!_this7.validatenull(list)) _this7.$refs.cellForm.clearValidate(list);\n if (result) resolve();\n });\n });\n },\n rowAdd: function rowAdd() {\n this.$refs.dialogForm.show(\"add\");\n },\n rowSave: function rowSave() {\n return this.$refs.dialogForm.$refs.tableForm.submit();\n },\n rowUpdate: function rowUpdate() {\n return this.$refs.dialogForm.$refs.tableForm.submit();\n },\n closeDialog: function closeDialog() {\n return this.$refs.dialogForm.closeDialog();\n },\n getPropRef: function getPropRef(prop) {\n return this.$refs.dialogForm.$refs.tableForm.getPropRef(prop);\n },\n setVal: function setVal() {\n this.$emit('update:modelValue', this.tableForm);\n this.$emit('change', this.tableForm);\n },\n // 编辑\n rowEdit: function rowEdit(row, index) {\n this.tableForm = this.deepClone(row);\n this.tableIndex = index;\n this.setVal();\n this.$refs.dialogForm.show(\"edit\");\n },\n //复制\n rowCopy: function rowCopy(row) {\n this.tableForm = this.deepClone(row);\n delete this.tableForm[this.rowKey];\n this.tableIndex = -1;\n this.setVal();\n this.$refs.dialogForm.show(\"add\");\n },\n //查看\n rowView: function rowView(row, index) {\n this.tableForm = this.deepClone(row);\n this.tableIndex = index;\n this.setVal();\n this.$refs.dialogForm.show(\"view\");\n },\n // 删除\n rowDel: function rowDel(row, index) {\n var _this8 = this;\n this.$emit(\"row-del\", row, index, function () {\n var _this8$findData = _this8.findData(row[_this8.rowKey]),\n parentList = _this8$findData.parentList,\n index = _this8$findData.index;\n if (parentList) parentList.splice(index, 1);\n });\n },\n //合并行\n tableSpanMethod: function tableSpanMethod(param) {\n if (typeof this.spanMethod === \"function\") return this.spanMethod(param);\n },\n //合集统计逻辑\n tableSummaryMethod: function tableSummaryMethod(param) {\n var _this9 = this;\n var sumsList = {};\n var sums = [];\n var columns = param.columns,\n data = param.data;\n //如果自己写逻辑则调用summaryMethod方法\n if (typeof this.summaryMethod === \"function\") {\n sums = this.summaryMethod(param);\n columns.forEach(function (column, index) {\n sumsList[column.property] = sums[index];\n });\n this.sumsList = sumsList;\n } else {\n columns.forEach(function (column, index) {\n var currItem = _this9.sumColumnList.find(function (item) {\n return item.name === column.property;\n });\n if (currItem) {\n var decimals = currItem.decimals || 2;\n var label = currItem.label || '';\n switch (currItem.type) {\n case \"count\":\n sums[index] = label + data.length;\n break;\n case \"avg\":\n var avgValues = data.map(function (item) {\n return Number(item[column.property]);\n });\n var nowindex = 1;\n sums[index] = avgValues.reduce(function (perv, curr) {\n var value = Number(curr);\n if (!isNaN(value)) {\n return (perv * (nowindex - 1) + curr) / nowindex++;\n } else {\n return perv;\n }\n }, 0);\n sums[index] = label + sums[index].toFixed(decimals);\n break;\n case \"sum\":\n var values = data.map(function (item) {\n return Number(item[column.property]);\n });\n sums[index] = values.reduce(function (perv, curr) {\n var value = Number(curr);\n if (!isNaN(value)) {\n return perv + curr;\n } else {\n return perv;\n }\n }, 0);\n sums[index] = label + sums[index].toFixed(decimals);\n break;\n }\n sumsList[column.property] = sums[index];\n } else {\n sums[index] = \"\";\n }\n });\n }\n this.sumsList = sumsList;\n return sums;\n },\n tableDrop: function tableDrop(type, el, callback) {\n if (this.isSortable !== true) {\n if (type == 'row' && !this.isRowSort) {\n return;\n } else if (type == 'column' && !this.isColumnSort) {\n return;\n }\n }\n if (!window.Sortable) {\n core_packages__WEBPACK_IMPORTED_MODULE_1__[\"default\"].logs(\"Sortable\");\n return;\n }\n return window.Sortable.create(el, {\n ghostClass: _config_js__WEBPACK_IMPORTED_MODULE_17__[\"default\"].ghostClass,\n chosenClass: _config_js__WEBPACK_IMPORTED_MODULE_17__[\"default\"].ghostClass,\n animation: 100,\n delay: 0,\n onEnd: function onEnd(evt) {\n return callback(evt);\n }\n });\n },\n findData: function findData(id) {\n var _this10 = this;\n var result = {};\n var callback = function callback(parentList, parent) {\n parentList.forEach(function (ele, index) {\n if (ele[_this10.rowKey] == id) {\n result = {\n item: ele,\n index: index,\n parentList: parentList,\n parent: parent\n };\n }\n if (ele[_this10.childrenKey]) {\n callback(ele[_this10.childrenKey], ele);\n }\n });\n };\n callback(this.list);\n return result;\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/crud/index.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/dist??ref--1");
734
734
 
735
735
  /***/ }),
736
736
 
@@ -1018,7 +1018,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
1018
1018
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1019
1019
 
1020
1020
  "use strict";
1021
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_packages__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/packages */ \"./src/core/packages.js\");\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var common_common_props_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! common/common/props.js */ \"./packages/core/common/props.js\");\n/* harmony import */ var common_common_event_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! common/common/event.js */ \"./packages/core/common/event.js\");\n/* harmony import */ var core_dic__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core/dic */ \"./src/core/dic.js\");\n/* harmony import */ var global_variable__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! global/variable */ \"./src/global/variable.js\");\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n name: \"select\",\n mixins: [Object(common_common_props_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(), Object(common_common_event_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])()],\n data: function data() {\n return {\n checked: false,\n indeterminate: false,\n create: false,\n netDic: [],\n loading: false\n };\n },\n props: {\n virtualize: Boolean,\n emptyValues: Array,\n valueOnClear: [String, Number, Boolean, Function],\n loadingText: {\n type: String\n },\n noMatchText: {\n type: String\n },\n noDataText: {\n type: String\n },\n drag: {\n type: Boolean,\n \"default\": false\n },\n remote: {\n type: Boolean,\n \"default\": false\n },\n tags: {\n type: Boolean,\n \"default\": false\n },\n collapseTags: Boolean,\n collapseTagsTooltip: Boolean,\n maxCollapseTags: Number,\n limit: {\n type: Number,\n \"default\": 0\n },\n filterable: {\n type: Boolean,\n \"default\": false\n },\n allowCreate: {\n type: Boolean,\n \"default\": false\n },\n defaultFirstOption: {\n type: Boolean,\n \"default\": false\n },\n all: {\n type: Boolean,\n \"default\": false\n },\n popperAppendToBody: {\n type: Boolean,\n \"default\": true\n }\n },\n watch: {\n dic: {\n handler: function handler(val) {\n this.netDic = val;\n },\n immediate: true\n }\n },\n computed: {\n classNameKey: function classNameKey() {\n return this.props.className || 'className';\n },\n options: function options() {\n var _this = this;\n var dicData = this.deepClone(this.netDic);\n return dicData.map(function (ele) {\n return Object.assign(ele, {\n label: ele[_this.labelKey],\n value: ele[_this.valueKey],\n disabled: ele[_this.disabledKey]\n });\n });\n },\n componentName: function componentName() {\n return 'elSelect' + (this.virtualize ? 'V2' : '');\n }\n },\n mounted: function mounted() {\n if (this.drag) {\n this.setSort();\n }\n },\n methods: {\n handleModelValue: function handleModelValue(val) {\n if (!this.validatenull(this.text)) {\n if (this.remote && !this.created) {\n this.created = true;\n this.handleRemoteMethod(this.multiple ? this.text.join(global_variable__WEBPACK_IMPORTED_MODULE_5__[\"DIC_SPLIT\"]) : this.text);\n }\n }\n if (this.multiple) {\n if (this.text.length == 0) {\n this.checked = false;\n this.indeterminate = false;\n } else if (this.text.length == this.netDic.length) {\n this.checked = true;\n this.indeterminate = false;\n } else {\n this.checked = false;\n this.indeterminate = true;\n }\n }\n },\n setSort: function setSort() {\n var _this2 = this;\n if (!window.Sortable) {\n core_packages__WEBPACK_IMPORTED_MODULE_0__[\"default\"].logs('Sortable');\n return;\n }\n var el = this.$refs.main.$el.querySelectorAll('.el-select__selection')[0];\n this.sortable = window.Sortable.create(el, {\n animation: 100,\n onEnd: function onEnd(evt) {\n var targetRow = _this2.modelValue.splice(evt.oldIndex, 1)[0];\n _this2.modelValue.splice(evt.newIndex, 0, targetRow);\n }\n });\n },\n handleRemoteMethod: function handleRemoteMethod(query) {\n var _this3 = this;\n this.loading = true;\n Object(core_dic__WEBPACK_IMPORTED_MODULE_4__[\"sendDic\"])({\n column: this.column,\n value: query\n }, this).then(function (res) {\n _this3.loading = false;\n _this3.netDic = res;\n });\n },\n checkChange: function checkChange(val) {\n var _this4 = this;\n this.text = [];\n this.checked = val;\n this.indeterminate = false;\n if (val) {\n this.text = this.netDic.filter(function (ele) {\n return !ele[_this4.disabledKey];\n }).map(function (ele) {\n return ele[_this4.valueKey];\n });\n }\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/select/index.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/dist??ref--1");
1021
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_packages__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/packages */ \"./src/core/packages.js\");\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var common_common_props_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! common/common/props.js */ \"./packages/core/common/props.js\");\n/* harmony import */ var common_common_event_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! common/common/event.js */ \"./packages/core/common/event.js\");\n/* harmony import */ var core_dic__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core/dic */ \"./src/core/dic.js\");\n/* harmony import */ var global_variable__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! global/variable */ \"./src/global/variable.js\");\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n name: \"select\",\n mixins: [Object(common_common_props_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(), Object(common_common_event_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])()],\n data: function data() {\n return {\n checked: false,\n indeterminate: false,\n create: false,\n netDic: [],\n loading: false\n };\n },\n props: {\n virtualize: Boolean,\n emptyValues: Array,\n valueOnClear: {\n type: [String, Number, Boolean, Function],\n \"default\": undefined\n },\n loadingText: {\n type: String\n },\n noMatchText: {\n type: String\n },\n noDataText: {\n type: String\n },\n drag: {\n type: Boolean,\n \"default\": false\n },\n remote: {\n type: Boolean,\n \"default\": false\n },\n tags: {\n type: Boolean,\n \"default\": false\n },\n collapseTags: Boolean,\n collapseTagsTooltip: Boolean,\n maxCollapseTags: Number,\n limit: {\n type: Number,\n \"default\": 0\n },\n filterable: {\n type: Boolean,\n \"default\": false\n },\n allowCreate: {\n type: Boolean,\n \"default\": false\n },\n defaultFirstOption: {\n type: Boolean,\n \"default\": false\n },\n all: {\n type: Boolean,\n \"default\": false\n },\n popperAppendToBody: {\n type: Boolean,\n \"default\": true\n }\n },\n watch: {\n dic: {\n handler: function handler(val) {\n this.netDic = val;\n },\n immediate: true\n }\n },\n computed: {\n classNameKey: function classNameKey() {\n return this.props.className || 'className';\n },\n options: function options() {\n var _this = this;\n var dicData = this.deepClone(this.netDic);\n return dicData.map(function (ele) {\n return Object.assign(ele, {\n label: ele[_this.labelKey],\n value: ele[_this.valueKey],\n disabled: ele[_this.disabledKey]\n });\n });\n },\n componentName: function componentName() {\n return 'elSelect' + (this.virtualize ? 'V2' : '');\n }\n },\n mounted: function mounted() {\n if (this.drag) {\n this.setSort();\n }\n },\n methods: {\n handleModelValue: function handleModelValue(val) {\n if (!this.validatenull(this.text)) {\n if (this.remote && !this.created) {\n this.created = true;\n this.handleRemoteMethod(this.multiple ? this.text.join(global_variable__WEBPACK_IMPORTED_MODULE_5__[\"DIC_SPLIT\"]) : this.text);\n }\n }\n if (this.multiple) {\n if (this.text.length == 0) {\n this.checked = false;\n this.indeterminate = false;\n } else if (this.text.length == this.netDic.length) {\n this.checked = true;\n this.indeterminate = false;\n } else {\n this.checked = false;\n this.indeterminate = true;\n }\n }\n },\n setSort: function setSort() {\n var _this2 = this;\n if (!window.Sortable) {\n core_packages__WEBPACK_IMPORTED_MODULE_0__[\"default\"].logs('Sortable');\n return;\n }\n var el = this.$refs.main.$el.querySelectorAll('.el-select__selection')[0];\n this.sortable = window.Sortable.create(el, {\n animation: 100,\n onEnd: function onEnd(evt) {\n var targetRow = _this2.modelValue.splice(evt.oldIndex, 1)[0];\n _this2.modelValue.splice(evt.newIndex, 0, targetRow);\n }\n });\n },\n handleRemoteMethod: function handleRemoteMethod(query) {\n var _this3 = this;\n this.loading = true;\n Object(core_dic__WEBPACK_IMPORTED_MODULE_4__[\"sendDic\"])({\n column: this.column,\n value: query\n }, this).then(function (res) {\n _this3.loading = false;\n _this3.netDic = res;\n });\n },\n checkChange: function checkChange(val) {\n var _this4 = this;\n this.text = [];\n this.checked = val;\n this.indeterminate = false;\n if (val) {\n this.text = this.netDic.filter(function (ele) {\n return !ele[_this4.disabledKey];\n }).map(function (ele) {\n return ele[_this4.valueKey];\n });\n }\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/select/index.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/dist??ref--1");
1022
1022
 
1023
1023
  /***/ }),
1024
1024
 
@@ -5132,7 +5132,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
5132
5132
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
5133
5133
 
5134
5134
  "use strict";
5135
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"version\", function() { return version; });\nvar version = '3.4.5';\n\n//# sourceURL=webpack://AVUE/./src/version.js?");
5135
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"version\", function() { return version; });\nvar version = '3.4.6';\n\n//# sourceURL=webpack://AVUE/./src/version.js?");
5136
5136
 
5137
5137
  /***/ }),
5138
5138