htui-yllkbz 1.2.42 → 1.2.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/htui.common.js +239 -11
- package/lib/htui.common.js.gz +0 -0
- package/lib/htui.umd.js +239 -11
- package/lib/htui.umd.js.gz +0 -0
- package/lib/htui.umd.min.js +3 -3
- package/lib/htui.umd.min.js.gz +0 -0
- package/package.json +1 -1
- package/src/packages/HtTable/index.vue +160 -3
- package/src/packages/type.ts +4 -1
- package/src/views/About.vue +3 -1
package/lib/htui.common.js
CHANGED
|
@@ -592,6 +592,35 @@ fixRegExpWellKnownSymbolLogic('split', 2, function (SPLIT, nativeSplit, maybeCal
|
|
|
592
592
|
}, !SUPPORTS_Y);
|
|
593
593
|
|
|
594
594
|
|
|
595
|
+
/***/ }),
|
|
596
|
+
|
|
597
|
+
/***/ "13d5":
|
|
598
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
599
|
+
|
|
600
|
+
"use strict";
|
|
601
|
+
|
|
602
|
+
var $ = __webpack_require__("23e7");
|
|
603
|
+
var $reduce = __webpack_require__("d58f").left;
|
|
604
|
+
var arrayMethodIsStrict = __webpack_require__("a640");
|
|
605
|
+
var arrayMethodUsesToLength = __webpack_require__("ae40");
|
|
606
|
+
var CHROME_VERSION = __webpack_require__("2d00");
|
|
607
|
+
var IS_NODE = __webpack_require__("605d");
|
|
608
|
+
|
|
609
|
+
var STRICT_METHOD = arrayMethodIsStrict('reduce');
|
|
610
|
+
var USES_TO_LENGTH = arrayMethodUsesToLength('reduce', { 1: 0 });
|
|
611
|
+
// Chrome 80-82 has a critical bug
|
|
612
|
+
// https://bugs.chromium.org/p/chromium/issues/detail?id=1049982
|
|
613
|
+
var CHROME_BUG = !IS_NODE && CHROME_VERSION > 79 && CHROME_VERSION < 83;
|
|
614
|
+
|
|
615
|
+
// `Array.prototype.reduce` method
|
|
616
|
+
// https://tc39.github.io/ecma262/#sec-array.prototype.reduce
|
|
617
|
+
$({ target: 'Array', proto: true, forced: !STRICT_METHOD || !USES_TO_LENGTH || CHROME_BUG }, {
|
|
618
|
+
reduce: function reduce(callbackfn /* , initialValue */) {
|
|
619
|
+
return $reduce(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);
|
|
620
|
+
}
|
|
621
|
+
});
|
|
622
|
+
|
|
623
|
+
|
|
595
624
|
/***/ }),
|
|
596
625
|
|
|
597
626
|
/***/ "14c3":
|
|
@@ -7801,6 +7830,53 @@ module.exports = function (it, TAG, STATIC) {
|
|
|
7801
7830
|
};
|
|
7802
7831
|
|
|
7803
7832
|
|
|
7833
|
+
/***/ }),
|
|
7834
|
+
|
|
7835
|
+
/***/ "d58f":
|
|
7836
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
7837
|
+
|
|
7838
|
+
var aFunction = __webpack_require__("1c0b");
|
|
7839
|
+
var toObject = __webpack_require__("7b0b");
|
|
7840
|
+
var IndexedObject = __webpack_require__("44ad");
|
|
7841
|
+
var toLength = __webpack_require__("50c4");
|
|
7842
|
+
|
|
7843
|
+
// `Array.prototype.{ reduce, reduceRight }` methods implementation
|
|
7844
|
+
var createMethod = function (IS_RIGHT) {
|
|
7845
|
+
return function (that, callbackfn, argumentsLength, memo) {
|
|
7846
|
+
aFunction(callbackfn);
|
|
7847
|
+
var O = toObject(that);
|
|
7848
|
+
var self = IndexedObject(O);
|
|
7849
|
+
var length = toLength(O.length);
|
|
7850
|
+
var index = IS_RIGHT ? length - 1 : 0;
|
|
7851
|
+
var i = IS_RIGHT ? -1 : 1;
|
|
7852
|
+
if (argumentsLength < 2) while (true) {
|
|
7853
|
+
if (index in self) {
|
|
7854
|
+
memo = self[index];
|
|
7855
|
+
index += i;
|
|
7856
|
+
break;
|
|
7857
|
+
}
|
|
7858
|
+
index += i;
|
|
7859
|
+
if (IS_RIGHT ? index < 0 : length <= index) {
|
|
7860
|
+
throw TypeError('Reduce of empty array with no initial value');
|
|
7861
|
+
}
|
|
7862
|
+
}
|
|
7863
|
+
for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
|
|
7864
|
+
memo = callbackfn(memo, self[index], index, O);
|
|
7865
|
+
}
|
|
7866
|
+
return memo;
|
|
7867
|
+
};
|
|
7868
|
+
};
|
|
7869
|
+
|
|
7870
|
+
module.exports = {
|
|
7871
|
+
// `Array.prototype.reduce` method
|
|
7872
|
+
// https://tc39.github.io/ecma262/#sec-array.prototype.reduce
|
|
7873
|
+
left: createMethod(false),
|
|
7874
|
+
// `Array.prototype.reduceRight` method
|
|
7875
|
+
// https://tc39.github.io/ecma262/#sec-array.prototype.reduceright
|
|
7876
|
+
right: createMethod(true)
|
|
7877
|
+
};
|
|
7878
|
+
|
|
7879
|
+
|
|
7804
7880
|
/***/ }),
|
|
7805
7881
|
|
|
7806
7882
|
/***/ "d784":
|
|
@@ -11402,25 +11478,31 @@ PageInfo.install = function (Vue) {
|
|
|
11402
11478
|
};
|
|
11403
11479
|
|
|
11404
11480
|
/* harmony default export */ var packages_PageInfo = (PageInfo);
|
|
11405
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"48d53131-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/HtTable/index.vue?vue&type=template&id=
|
|
11406
|
-
var
|
|
11481
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"48d53131-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/packages/HtTable/index.vue?vue&type=template&id=ed816e74&scoped=true&
|
|
11482
|
+
var HtTablevue_type_template_id_ed816e74_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{directives:[{name:"loading",rawName:"v-loading",value:(_vm.state.loading),expression:"state.loading"}]},[_c('article',[_c('el-table',{ref:"comTable",attrs:{"height":_vm.height,"max-height":_vm.maxHeight,"border":_vm.border,"stripe":_vm.stripe,"size":_vm.size,"fit":_vm.fit,"show-header":_vm.showHeader,"empty-text":_vm.emptyText||'暂无数据',"row-style":_vm.rowStyle,"row-class-name":_vm.rowClassName,"current-row-key":_vm.currentRowKey,"highlight-current-row":_vm.highlightCurrentRow,"row-key":_vm.rowKey||'id',"data":_vm.data,"tooltip-effect":"dark"},on:{"row-click":function (row, column, event){ return _vm.$emit('row-click',row, column, event); },"row-contextmenu":function (row, column, event){ return _vm.$emit('row-contextmenu',row, column, event); },"row-dblclick":function (row, column, event){ return _vm.$emit('row-dblclick',row, column, event); },"header-click":function ( column, event){ return _vm.$emit('header-click', column, event); },"header-contextmenu":function ( column, event){ return _vm.$emit('header-contextmenu', column, event); },"sort-change":function (ref){
|
|
11407
11483
|
var column = ref.column;
|
|
11408
11484
|
var prop = ref.prop;
|
|
11409
11485
|
var order = ref.order;
|
|
11410
11486
|
|
|
11411
11487
|
return _vm.$emit('sort-change', { column: column, prop: prop, order: order});
|
|
11412
|
-
},"filter-change":function (filter){ return _vm.$emit('filter-change', filter); },"current-change":function (currentRow, oldCurrentRow){ return _vm.$emit('current-change', currentRow, oldCurrentRow); },"select":function (selection, row){ return _vm.$emit('select',selection, row); },"select-all":function (selection){ return _vm.$emit('select-all',selection); },"selection-change":function (selection){ return _vm.$emit('selection-change',selection); },"cell-mouse-enter":function (row, column, cell, event){ return _vm.$emit('cell-mouse-enter',row, column, cell, event); },"cell-mouse-leave":function (row, column, cell, event){ return _vm.$emit('cell-mouse-leave',row, column, cell, event); },"cell-click":function (row, column, cell, event){ return _vm.$emit('cell-click',row, column, cell, event); },"cell-dblclick":function (row, column, cell, event){ return _vm.$emit('cell-dblclick',row, column, cell, event); }}},[(_vm.checked)?_c('el-table-column',{attrs:{"width":"55","reserve-selection":_vm.reserveSelection,"selectable":_vm.selectable,"type":"selection"}}):_vm._e(),(!_vm.hideOrder)?_c('el-table-column',{attrs:{"label":_vm.keyName===undefined?'序号':_vm.keyName,"align":'center',"width":"55"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [_vm._v(" "+_vm._s((_vm.state.pageInfo.currentPage-1)*_vm.state.pageInfo.pageSize+(scope.$index+1))+" ")]}}],null,false,2272936552)},[_c('template',{slot:"header"},[_vm._t('header_order')],2)],2):_vm._e(),_vm._l((_vm.
|
|
11488
|
+
},"filter-change":function (filter){ return _vm.$emit('filter-change', filter); },"current-change":function (currentRow, oldCurrentRow){ return _vm.$emit('current-change', currentRow, oldCurrentRow); },"select":function (selection, row){ return _vm.$emit('select',selection, row); },"select-all":function (selection){ return _vm.$emit('select-all',selection); },"selection-change":function (selection){ return _vm.$emit('selection-change',selection); },"cell-mouse-enter":function (row, column, cell, event){ return _vm.$emit('cell-mouse-enter',row, column, cell, event); },"cell-mouse-leave":function (row, column, cell, event){ return _vm.$emit('cell-mouse-leave',row, column, cell, event); },"cell-click":function (row, column, cell, event){ return _vm.$emit('cell-click',row, column, cell, event); },"cell-dblclick":function (row, column, cell, event){ return _vm.$emit('cell-dblclick',row, column, cell, event); }}},[(_vm.checked)?_c('el-table-column',{attrs:{"width":"55","resizable":false,"reserve-selection":_vm.reserveSelection,"selectable":_vm.selectable,"type":"selection"}}):_vm._e(),(!_vm.hideOrder)?_c('el-table-column',{attrs:{"resizable":false,"label":_vm.keyName===undefined?'序号':_vm.keyName,"align":'center',"width":"55"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [_vm._v(" "+_vm._s((_vm.state.pageInfo.currentPage-1)*_vm.state.pageInfo.pageSize+(scope.$index+1))+" ")]}}],null,false,2272936552)},[_c('template',{slot:"header"},[_vm._t('header_order',[(_vm.showFilter)?_c('div',{attrs:{"title":"筛选排序"},on:{"click":_vm.showFilterModel}},[_c('el-button',{attrs:{"type":"text"}},[_c('i',{staticClass:"el-icon-s-grid"})])],1):_c('span',[_vm._v(_vm._s(_vm.keyName||'序号'))])])],2)],2):_vm._e(),_vm._l((_vm.showColumns),function(item){return [(!item.hide)?_c('el-table-column',{key:item.key,attrs:{"label":item.title,"fixed":item.fixed,"align":item.align,"resizable":item.resizable,"header-align":item.headerAlign,"column-key":item.columnKey,"class-name":item.className,"prop":item.key,"show-overflow-tooltip":item.type==='common'||item.type==='org'||item.type==='userId'?false:(item.showOverflowTooltip===false?false:true),"sortable":item.sortable,"sort-method":item.sortMethod,"sort-orders":item.sortOrders,"formatter":item.formatter,"sort-by":item.sortBy,"min-width":item.minWidth,"width":item.width},scopedSlots:_vm._u([{key:"default",fn:function(ref){
|
|
11413
11489
|
var row = ref.row;
|
|
11414
11490
|
var column = ref.column;
|
|
11415
11491
|
var rowIndex = ref.rowIndex;
|
|
11416
11492
|
return [_vm._t(item.key,[(item.type==='org')?[(_vm.getPropByPath(row,item.key))?_c('common-org-info',{attrs:{"org-id":_vm.getPropByPath(row,item.key),"type":"tag"}}):_c('span',[_vm._v("--")])]:(item.type==='common')?[(_vm.getPropByPath(row,item.key))?_c("common-datas-info-id",{tag:"div",attrs:{"user-id":item.commonType['userId']?_vm.getPropByPath(row,item.key):'[]',"department-id":item.commonType['departmentId']?_vm.getPropByPath(row,item.key):'[]',"role-id":item.commonType['roleId']?_vm.getPropByPath(row,item.key):'[]',"base-data-id":item.commonType['baseDataId']?_vm.getPropByPath(row,item.key):'',"base-data-value":item.commonType['baseDataValue']?_vm.getPropByPath(row,item.key):'',"base-data-name":item.commonType['baseDataName']?_vm.getPropByPath(row,item.key):'',"base-data-info":true}}):_c('span',[_vm._v("--")])]:(item.type==='userId')?[(_vm.getPropByPath(row,item.key))?_c("common-datas-info-id",{tag:"div",attrs:{"user-id":JSON.stringify(_vm.getPropByPath(row,item.key)),"base-data-info":true}}):_c('span',[_vm._v("--")])]:(item.type==='time')?[(_vm.getPropByPath(row,item.key))?_c('div',{staticClass:"ht-column-cell"},[(!item.spread)?_c('span',[_vm._v(" "+_vm._s(_vm.getPropByPath(row,item.key).replace('T', ' ').slice(0,19)))]):[_c('p',{staticStyle:{"color":"var(--primary)","margin":"0","padding":"0"}},[_vm._v(_vm._s(_vm.getPropByPath(row,item.key).slice(11,19)))]),_c('p',{staticStyle:{"margin":"0","padding":"0"}},[_vm._v(_vm._s(_vm.getPropByPath(row,item.key).replace('T', ' ').slice(0,10)))])]],2):_c('span',[_vm._v("--")])]:(item.type==='boolean')?[(_vm.getPropByPath(row,item.key))?_c('el-tag',{attrs:{"type":'success'}},[_vm._v("是")]):_c('el-tag',{attrs:{"type":"danger"}},[_vm._v("否")])]:_c('span',[_vm._v(_vm._s(_vm.getPropByPath(row,item.key)))])],{"row":row,"column":column,"rowIndex":rowIndex})]}},{key:"header",fn:function(ref){
|
|
11417
11493
|
var column = ref.column;
|
|
11418
11494
|
var $index = ref.$index;
|
|
11419
|
-
return [_vm._t('header_'+item.key,[_vm._v(_vm._s(item.title))],{"column":column,"$index":$index})]}}],null,true)}):_vm._e()]})],2)],1),(!_vm.hidePage)?_c('footer',[_c('el-row',{attrs:{"name":"footer"}},[_vm._t("footerLeft"),_c('el-col',{attrs:{"span":12}},[_c('PageInfo',{attrs:{"hide-on-single-page":_vm.pagination&&_vm.pagination.hideOnSinglePage,"small":_vm.pagination&&_vm.pagination.small,"page-sizes":_vm.pagination&&_vm.pagination.pageSizes,"page-info":_vm.state.pageInfo},on:{"onchange":function (e){ return _vm.$emit('onchange',e); }}})],1)],2)],1):_vm._e()
|
|
11420
|
-
var
|
|
11495
|
+
return [_vm._t('header_'+item.key,[_vm._v(_vm._s(item.title))],{"column":column,"$index":$index})]}}],null,true)}):_vm._e()]})],2)],1),(!_vm.hidePage)?_c('footer',[_c('el-row',{attrs:{"name":"footer"}},[_vm._t("footerLeft"),_c('el-col',{attrs:{"span":12}},[_c('PageInfo',{attrs:{"hide-on-single-page":_vm.pagination&&_vm.pagination.hideOnSinglePage,"small":_vm.pagination&&_vm.pagination.small,"page-sizes":_vm.pagination&&_vm.pagination.pageSizes,"page-info":_vm.state.pageInfo},on:{"onchange":function (e){ return _vm.$emit('onchange',e); }}})],1)],2)],1):_vm._e(),_c('el-dialog',{attrs:{"visible":_vm.state.visibleFilter,"title":"属性设置","close-on-click-modal":true,"width":"400px","center":true},on:{"update:visible":function($event){return _vm.$set(_vm.state, "visibleFilter", $event)}}},[_c('div',{staticStyle:{"overflow":"hidden","height":"500px"}},[_c('el-scrollbar',{staticStyle:{"height":"calc(100% + 17px)"}},[_c('el-tree',{ref:"tree",attrs:{"data":_vm.columns,"show-checkbox":"","node-key":"key","check-on-click-node":false,"default-checked-keys":_vm.state.showColumnKeys,"allow-drag":_vm.allowDrag,"draggable":"","allow-drop":_vm.allowDrop},on:{"node-drag-start":_vm.handleDragStart,"node-drag-enter":_vm.handleDragEnter,"node-drag-leave":_vm.handleDragLeave,"node-drag-over":_vm.handleDragOver,"node-drag-end":_vm.handleDragEnd,"node-drop":_vm.handleDrop,"check-change":_vm.changeColumns},scopedSlots:_vm._u([{key:"default",fn:function(ref){
|
|
11496
|
+
var node = ref.node;
|
|
11497
|
+
var data = ref.data;
|
|
11498
|
+
return _c('span',{staticClass:"custom-tree-node"},[_vm._t('header_'+data.key,[_vm._v(_vm._s(data.title))],{"column":data})],2)}}],null,true)})],1)],1)])],1)}
|
|
11499
|
+
var HtTablevue_type_template_id_ed816e74_scoped_true_staticRenderFns = []
|
|
11421
11500
|
|
|
11422
11501
|
|
|
11423
|
-
// CONCATENATED MODULE: ./src/packages/HtTable/index.vue?vue&type=template&id=
|
|
11502
|
+
// CONCATENATED MODULE: ./src/packages/HtTable/index.vue?vue&type=template&id=ed816e74&scoped=true&
|
|
11503
|
+
|
|
11504
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.reduce.js
|
|
11505
|
+
var es_array_reduce = __webpack_require__("13d5");
|
|
11424
11506
|
|
|
11425
11507
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.replace.js
|
|
11426
11508
|
var es_string_replace = __webpack_require__("5319");
|
|
@@ -11443,6 +11525,10 @@ var es_string_split = __webpack_require__("1276");
|
|
|
11443
11525
|
|
|
11444
11526
|
|
|
11445
11527
|
|
|
11528
|
+
|
|
11529
|
+
|
|
11530
|
+
|
|
11531
|
+
|
|
11446
11532
|
var HtTablevue_type_script_lang_ts_HtTable = /*#__PURE__*/function (_Vue) {
|
|
11447
11533
|
_inherits(HtTable, _Vue);
|
|
11448
11534
|
|
|
@@ -11461,7 +11547,11 @@ var HtTablevue_type_script_lang_ts_HtTable = /*#__PURE__*/function (_Vue) {
|
|
|
11461
11547
|
pageSize: 10,
|
|
11462
11548
|
skipCount: 0,
|
|
11463
11549
|
totalCount: 0
|
|
11464
|
-
}
|
|
11550
|
+
},
|
|
11551
|
+
showColumns: [],
|
|
11552
|
+
currentColumn: undefined,
|
|
11553
|
+
visibleFilter: false,
|
|
11554
|
+
showColumnKeys: []
|
|
11465
11555
|
};
|
|
11466
11556
|
return _this;
|
|
11467
11557
|
}
|
|
@@ -11470,6 +11560,103 @@ var HtTablevue_type_script_lang_ts_HtTable = /*#__PURE__*/function (_Vue) {
|
|
|
11470
11560
|
key: "created",
|
|
11471
11561
|
value: function created() {
|
|
11472
11562
|
this.setPageInfo(this.pageInfo);
|
|
11563
|
+
this.state.showColumns = this.columns;
|
|
11564
|
+
|
|
11565
|
+
if (this.uuId) {
|
|
11566
|
+
//通过uuid获取缓存起来的header显示信息
|
|
11567
|
+
var showKeys = window.localStorage.getItem("table_" + this.uuId);
|
|
11568
|
+
|
|
11569
|
+
if (showKeys) {
|
|
11570
|
+
this.state.showColumnKeys = JSON.parse(showKeys);
|
|
11571
|
+
} else {
|
|
11572
|
+
this.creatInitColumnKey();
|
|
11573
|
+
}
|
|
11574
|
+
} else {
|
|
11575
|
+
this.creatInitColumnKey();
|
|
11576
|
+
}
|
|
11577
|
+
}
|
|
11578
|
+
}, {
|
|
11579
|
+
key: "creatInitColumnKey",
|
|
11580
|
+
value: function creatInitColumnKey() {
|
|
11581
|
+
this.state.showColumnKeys = this.columns.reduce(function (arr, item) {
|
|
11582
|
+
arr.push(item.key);
|
|
11583
|
+
return arr;
|
|
11584
|
+
}, []);
|
|
11585
|
+
}
|
|
11586
|
+
}, {
|
|
11587
|
+
key: "changeColumns",
|
|
11588
|
+
value: function changeColumns(node, checked) {
|
|
11589
|
+
var showColumnKeys = this.state.showColumnKeys;
|
|
11590
|
+
|
|
11591
|
+
if (checked) {
|
|
11592
|
+
showColumnKeys.push(node.key);
|
|
11593
|
+
} else {
|
|
11594
|
+
showColumnKeys = showColumnKeys.filter(function (item) {
|
|
11595
|
+
return item !== node.key;
|
|
11596
|
+
});
|
|
11597
|
+
}
|
|
11598
|
+
|
|
11599
|
+
this.state.showColumnKeys = showColumnKeys;
|
|
11600
|
+
}
|
|
11601
|
+
}, {
|
|
11602
|
+
key: "handleDragStart",
|
|
11603
|
+
value: function handleDragStart(node) {
|
|
11604
|
+
this.state.currentColumn = node.data;
|
|
11605
|
+
}
|
|
11606
|
+
}, {
|
|
11607
|
+
key: "handleDragEnter",
|
|
11608
|
+
value: function handleDragEnter() {// console.log("tree drag enter: ", dropNode.label);
|
|
11609
|
+
}
|
|
11610
|
+
}, {
|
|
11611
|
+
key: "handleDragLeave",
|
|
11612
|
+
value: function handleDragLeave() {//console.log("tree drag leave: ", dropNode.label);
|
|
11613
|
+
}
|
|
11614
|
+
}, {
|
|
11615
|
+
key: "handleDragOver",
|
|
11616
|
+
value: function handleDragOver() {// console.log("tree drag over: ", dropNode.label);
|
|
11617
|
+
}
|
|
11618
|
+
}, {
|
|
11619
|
+
key: "handleDragEnd",
|
|
11620
|
+
value: function handleDragEnd(draggingNode, dropNode, dropType) {
|
|
11621
|
+
var _this2 = this;
|
|
11622
|
+
|
|
11623
|
+
var _this$state = this.state,
|
|
11624
|
+
showColumns = _this$state.showColumns,
|
|
11625
|
+
currentColumn = _this$state.currentColumn,
|
|
11626
|
+
showColumnKeys = _this$state.showColumnKeys; // if ((dropType === "before" || dropType === "after") && currentColumn) {
|
|
11627
|
+
// const data = showColumns.filter(
|
|
11628
|
+
// (item) => item.key !== currentColumn?.key
|
|
11629
|
+
// );
|
|
11630
|
+
// const index = data.findIndex((item) => item.key === dropNode.data.key);
|
|
11631
|
+
// dropType === "before"
|
|
11632
|
+
// ? data.splice(index, 0, currentColumn)
|
|
11633
|
+
// : data.splice(index + 1, 0, currentColumn);
|
|
11634
|
+
// console.log("tree drag end: ", currentColumn, showColumnKeys);
|
|
11635
|
+
|
|
11636
|
+
if (currentColumn && showColumnKeys.includes(currentColumn.key)) {
|
|
11637
|
+
setTimeout(function () {
|
|
11638
|
+
_this2.$refs.tree.setChecked(currentColumn, true);
|
|
11639
|
+
}, 0);
|
|
11640
|
+
} // }
|
|
11641
|
+
|
|
11642
|
+
}
|
|
11643
|
+
}, {
|
|
11644
|
+
key: "handleDrop",
|
|
11645
|
+
value: function handleDrop() {// console.log("tree drop: ", dropNode, dropType);
|
|
11646
|
+
}
|
|
11647
|
+
/** 节点是否被插入 */
|
|
11648
|
+
|
|
11649
|
+
}, {
|
|
11650
|
+
key: "allowDrop",
|
|
11651
|
+
value: function allowDrop(draggingNode, dropNode, type) {
|
|
11652
|
+
return type !== "inner";
|
|
11653
|
+
}
|
|
11654
|
+
/** 节点是否允许拖动 */
|
|
11655
|
+
|
|
11656
|
+
}, {
|
|
11657
|
+
key: "allowDrag",
|
|
11658
|
+
value: function allowDrag(draggingNode) {
|
|
11659
|
+
return !draggingNode.data.disabled;
|
|
11473
11660
|
}
|
|
11474
11661
|
/** 处理table里面根据字段获取对应的值 */
|
|
11475
11662
|
|
|
@@ -11505,6 +11692,11 @@ var HtTablevue_type_script_lang_ts_HtTable = /*#__PURE__*/function (_Vue) {
|
|
|
11505
11692
|
|
|
11506
11693
|
return tempObj ? tempObj[keyArr[i]] : null;
|
|
11507
11694
|
}
|
|
11695
|
+
}, {
|
|
11696
|
+
key: "showFilterModel",
|
|
11697
|
+
value: function showFilterModel() {
|
|
11698
|
+
this.state.visibleFilter = true;
|
|
11699
|
+
}
|
|
11508
11700
|
/** 遍历循环展示row数据 */
|
|
11509
11701
|
|
|
11510
11702
|
}, {
|
|
@@ -11532,10 +11724,12 @@ var HtTablevue_type_script_lang_ts_HtTable = /*#__PURE__*/function (_Vue) {
|
|
|
11532
11724
|
return "";
|
|
11533
11725
|
}
|
|
11534
11726
|
}
|
|
11535
|
-
/**
|
|
11727
|
+
/** 获取显示出来的table头信息 */
|
|
11536
11728
|
|
|
11537
11729
|
}, {
|
|
11538
11730
|
key: "setPageInfo",
|
|
11731
|
+
|
|
11732
|
+
/** 监听 */
|
|
11539
11733
|
value: function setPageInfo(val) {
|
|
11540
11734
|
if (val) {
|
|
11541
11735
|
var pageInfo = val;
|
|
@@ -11547,6 +11741,34 @@ var HtTablevue_type_script_lang_ts_HtTable = /*#__PURE__*/function (_Vue) {
|
|
|
11547
11741
|
};
|
|
11548
11742
|
}
|
|
11549
11743
|
}
|
|
11744
|
+
}, {
|
|
11745
|
+
key: "setColumns",
|
|
11746
|
+
value: function setColumns(columns) {
|
|
11747
|
+
this.state.showColumns = columns || [];
|
|
11748
|
+
}
|
|
11749
|
+
}, {
|
|
11750
|
+
key: "showColumns",
|
|
11751
|
+
get: function get() {
|
|
11752
|
+
var _this$state2 = this.state,
|
|
11753
|
+
showColumnKeys = _this$state2.showColumnKeys,
|
|
11754
|
+
showColumns = _this$state2.showColumns;
|
|
11755
|
+
var obj = {};
|
|
11756
|
+
|
|
11757
|
+
for (var key in showColumnKeys) {
|
|
11758
|
+
obj = _objectSpread2(_objectSpread2({}, obj), {}, defineProperty_defineProperty({}, showColumnKeys[key], true));
|
|
11759
|
+
}
|
|
11760
|
+
/** 缓存起来下次使用 --todo只做了显示没有做排序缓存 */
|
|
11761
|
+
|
|
11762
|
+
|
|
11763
|
+
if (this.uuId) {
|
|
11764
|
+
window.localStorage.setItem("table_" + this.uuId, JSON.stringify(showColumnKeys));
|
|
11765
|
+
}
|
|
11766
|
+
|
|
11767
|
+
var data = showColumns.filter(function (item) {
|
|
11768
|
+
return obj[item.key];
|
|
11769
|
+
});
|
|
11770
|
+
return data;
|
|
11771
|
+
}
|
|
11550
11772
|
}]);
|
|
11551
11773
|
|
|
11552
11774
|
return HtTable;
|
|
@@ -11558,6 +11780,10 @@ __decorate([Prop()], HtTablevue_type_script_lang_ts_HtTable.prototype, "data", v
|
|
|
11558
11780
|
|
|
11559
11781
|
__decorate([Prop()], HtTablevue_type_script_lang_ts_HtTable.prototype, "keyName", void 0);
|
|
11560
11782
|
|
|
11783
|
+
__decorate([Prop()], HtTablevue_type_script_lang_ts_HtTable.prototype, "showFilter", void 0);
|
|
11784
|
+
|
|
11785
|
+
__decorate([Prop()], HtTablevue_type_script_lang_ts_HtTable.prototype, "uuId", void 0);
|
|
11786
|
+
|
|
11561
11787
|
__decorate([Prop()], HtTablevue_type_script_lang_ts_HtTable.prototype, "hidePage", void 0);
|
|
11562
11788
|
|
|
11563
11789
|
__decorate([Prop()], HtTablevue_type_script_lang_ts_HtTable.prototype, "checked", void 0);
|
|
@@ -11600,6 +11826,8 @@ __decorate([Prop()], HtTablevue_type_script_lang_ts_HtTable.prototype, "paginati
|
|
|
11600
11826
|
|
|
11601
11827
|
__decorate([Watch("pageInfo")], HtTablevue_type_script_lang_ts_HtTable.prototype, "setPageInfo", null);
|
|
11602
11828
|
|
|
11829
|
+
__decorate([Watch("columns")], HtTablevue_type_script_lang_ts_HtTable.prototype, "setColumns", null);
|
|
11830
|
+
|
|
11603
11831
|
HtTablevue_type_script_lang_ts_HtTable = __decorate([vue_class_component_esm({
|
|
11604
11832
|
name: "HtTable",
|
|
11605
11833
|
components: {
|
|
@@ -11619,11 +11847,11 @@ HtTablevue_type_script_lang_ts_HtTable = __decorate([vue_class_component_esm({
|
|
|
11619
11847
|
|
|
11620
11848
|
var HtTable_component = normalizeComponent(
|
|
11621
11849
|
packages_HtTablevue_type_script_lang_ts_,
|
|
11622
|
-
|
|
11623
|
-
|
|
11850
|
+
HtTablevue_type_template_id_ed816e74_scoped_true_render,
|
|
11851
|
+
HtTablevue_type_template_id_ed816e74_scoped_true_staticRenderFns,
|
|
11624
11852
|
false,
|
|
11625
11853
|
null,
|
|
11626
|
-
"
|
|
11854
|
+
"ed816e74",
|
|
11627
11855
|
null
|
|
11628
11856
|
|
|
11629
11857
|
)
|
package/lib/htui.common.js.gz
CHANGED
|
Binary file
|