htui-yllkbz 1.2.42 → 1.2.46
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 +246 -12
- package/lib/htui.common.js.gz +0 -0
- package/lib/htui.umd.js +246 -12
- 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 +178 -3
- package/src/packages/type.ts +6 -3
- package/src/views/About.vue +4 -2
package/lib/htui.umd.js
CHANGED
|
@@ -601,6 +601,35 @@ fixRegExpWellKnownSymbolLogic('split', 2, function (SPLIT, nativeSplit, maybeCal
|
|
|
601
601
|
}, !SUPPORTS_Y);
|
|
602
602
|
|
|
603
603
|
|
|
604
|
+
/***/ }),
|
|
605
|
+
|
|
606
|
+
/***/ "13d5":
|
|
607
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
608
|
+
|
|
609
|
+
"use strict";
|
|
610
|
+
|
|
611
|
+
var $ = __webpack_require__("23e7");
|
|
612
|
+
var $reduce = __webpack_require__("d58f").left;
|
|
613
|
+
var arrayMethodIsStrict = __webpack_require__("a640");
|
|
614
|
+
var arrayMethodUsesToLength = __webpack_require__("ae40");
|
|
615
|
+
var CHROME_VERSION = __webpack_require__("2d00");
|
|
616
|
+
var IS_NODE = __webpack_require__("605d");
|
|
617
|
+
|
|
618
|
+
var STRICT_METHOD = arrayMethodIsStrict('reduce');
|
|
619
|
+
var USES_TO_LENGTH = arrayMethodUsesToLength('reduce', { 1: 0 });
|
|
620
|
+
// Chrome 80-82 has a critical bug
|
|
621
|
+
// https://bugs.chromium.org/p/chromium/issues/detail?id=1049982
|
|
622
|
+
var CHROME_BUG = !IS_NODE && CHROME_VERSION > 79 && CHROME_VERSION < 83;
|
|
623
|
+
|
|
624
|
+
// `Array.prototype.reduce` method
|
|
625
|
+
// https://tc39.github.io/ecma262/#sec-array.prototype.reduce
|
|
626
|
+
$({ target: 'Array', proto: true, forced: !STRICT_METHOD || !USES_TO_LENGTH || CHROME_BUG }, {
|
|
627
|
+
reduce: function reduce(callbackfn /* , initialValue */) {
|
|
628
|
+
return $reduce(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);
|
|
629
|
+
}
|
|
630
|
+
});
|
|
631
|
+
|
|
632
|
+
|
|
604
633
|
/***/ }),
|
|
605
634
|
|
|
606
635
|
/***/ "14c3":
|
|
@@ -7810,6 +7839,53 @@ module.exports = function (it, TAG, STATIC) {
|
|
|
7810
7839
|
};
|
|
7811
7840
|
|
|
7812
7841
|
|
|
7842
|
+
/***/ }),
|
|
7843
|
+
|
|
7844
|
+
/***/ "d58f":
|
|
7845
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
7846
|
+
|
|
7847
|
+
var aFunction = __webpack_require__("1c0b");
|
|
7848
|
+
var toObject = __webpack_require__("7b0b");
|
|
7849
|
+
var IndexedObject = __webpack_require__("44ad");
|
|
7850
|
+
var toLength = __webpack_require__("50c4");
|
|
7851
|
+
|
|
7852
|
+
// `Array.prototype.{ reduce, reduceRight }` methods implementation
|
|
7853
|
+
var createMethod = function (IS_RIGHT) {
|
|
7854
|
+
return function (that, callbackfn, argumentsLength, memo) {
|
|
7855
|
+
aFunction(callbackfn);
|
|
7856
|
+
var O = toObject(that);
|
|
7857
|
+
var self = IndexedObject(O);
|
|
7858
|
+
var length = toLength(O.length);
|
|
7859
|
+
var index = IS_RIGHT ? length - 1 : 0;
|
|
7860
|
+
var i = IS_RIGHT ? -1 : 1;
|
|
7861
|
+
if (argumentsLength < 2) while (true) {
|
|
7862
|
+
if (index in self) {
|
|
7863
|
+
memo = self[index];
|
|
7864
|
+
index += i;
|
|
7865
|
+
break;
|
|
7866
|
+
}
|
|
7867
|
+
index += i;
|
|
7868
|
+
if (IS_RIGHT ? index < 0 : length <= index) {
|
|
7869
|
+
throw TypeError('Reduce of empty array with no initial value');
|
|
7870
|
+
}
|
|
7871
|
+
}
|
|
7872
|
+
for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
|
|
7873
|
+
memo = callbackfn(memo, self[index], index, O);
|
|
7874
|
+
}
|
|
7875
|
+
return memo;
|
|
7876
|
+
};
|
|
7877
|
+
};
|
|
7878
|
+
|
|
7879
|
+
module.exports = {
|
|
7880
|
+
// `Array.prototype.reduce` method
|
|
7881
|
+
// https://tc39.github.io/ecma262/#sec-array.prototype.reduce
|
|
7882
|
+
left: createMethod(false),
|
|
7883
|
+
// `Array.prototype.reduceRight` method
|
|
7884
|
+
// https://tc39.github.io/ecma262/#sec-array.prototype.reduceright
|
|
7885
|
+
right: createMethod(true)
|
|
7886
|
+
};
|
|
7887
|
+
|
|
7888
|
+
|
|
7813
7889
|
/***/ }),
|
|
7814
7890
|
|
|
7815
7891
|
/***/ "d784":
|
|
@@ -11411,25 +11487,31 @@ PageInfo.install = function (Vue) {
|
|
|
11411
11487
|
};
|
|
11412
11488
|
|
|
11413
11489
|
/* harmony default export */ var packages_PageInfo = (PageInfo);
|
|
11414
|
-
// 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=
|
|
11415
|
-
var
|
|
11490
|
+
// 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=292d8f4f&scoped=true&
|
|
11491
|
+
var HtTablevue_type_template_id_292d8f4f_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,"header-row-style":_vm.headerRowStyle,"header-row-class-name":_vm.headerRowClassName,"header-cell-class-name":_vm.headerCellClassName,"header-cell-style":_vm.headerCellStyle,"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){
|
|
11416
11492
|
var column = ref.column;
|
|
11417
11493
|
var prop = ref.prop;
|
|
11418
11494
|
var order = ref.order;
|
|
11419
11495
|
|
|
11420
11496
|
return _vm.$emit('sort-change', { column: column, prop: prop, order: order});
|
|
11421
|
-
},"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.
|
|
11497
|
+
},"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){
|
|
11422
11498
|
var row = ref.row;
|
|
11423
11499
|
var column = ref.column;
|
|
11424
11500
|
var rowIndex = ref.rowIndex;
|
|
11425
|
-
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){
|
|
11501
|
+
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("否")])]:(item.type==='img')?[(_vm.fileToken in _vm.getPropByPath(row,item.key).split(','))?_c('span',[_c('el-image',{staticStyle:{"width":"38px","height":"38px","margin-right":"5px"},attrs:{"src":'/files/api/filing/file/download/'+_vm.fileToken,"preview-src-list":['/files/api/filing/file/download/'+_vm.fileToken]}})],1):_vm._e()]:_c('span',[_vm._v(_vm._s(_vm.getPropByPath(row,item.key)))])],{"row":row,"column":column,"rowIndex":rowIndex})]}},{key:"header",fn:function(ref){
|
|
11426
11502
|
var column = ref.column;
|
|
11427
11503
|
var $index = ref.$index;
|
|
11428
|
-
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()
|
|
11429
|
-
var
|
|
11504
|
+
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":"517px"}},[_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){
|
|
11505
|
+
var node = ref.node;
|
|
11506
|
+
var data = ref.data;
|
|
11507
|
+
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)}
|
|
11508
|
+
var HtTablevue_type_template_id_292d8f4f_scoped_true_staticRenderFns = []
|
|
11509
|
+
|
|
11430
11510
|
|
|
11511
|
+
// CONCATENATED MODULE: ./src/packages/HtTable/index.vue?vue&type=template&id=292d8f4f&scoped=true&
|
|
11431
11512
|
|
|
11432
|
-
//
|
|
11513
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.reduce.js
|
|
11514
|
+
var es_array_reduce = __webpack_require__("13d5");
|
|
11433
11515
|
|
|
11434
11516
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.replace.js
|
|
11435
11517
|
var es_string_replace = __webpack_require__("5319");
|
|
@@ -11452,6 +11534,10 @@ var es_string_split = __webpack_require__("1276");
|
|
|
11452
11534
|
|
|
11453
11535
|
|
|
11454
11536
|
|
|
11537
|
+
|
|
11538
|
+
|
|
11539
|
+
|
|
11540
|
+
|
|
11455
11541
|
var HtTablevue_type_script_lang_ts_HtTable = /*#__PURE__*/function (_Vue) {
|
|
11456
11542
|
_inherits(HtTable, _Vue);
|
|
11457
11543
|
|
|
@@ -11470,7 +11556,11 @@ var HtTablevue_type_script_lang_ts_HtTable = /*#__PURE__*/function (_Vue) {
|
|
|
11470
11556
|
pageSize: 10,
|
|
11471
11557
|
skipCount: 0,
|
|
11472
11558
|
totalCount: 0
|
|
11473
|
-
}
|
|
11559
|
+
},
|
|
11560
|
+
showColumns: [],
|
|
11561
|
+
currentColumn: undefined,
|
|
11562
|
+
visibleFilter: false,
|
|
11563
|
+
showColumnKeys: []
|
|
11474
11564
|
};
|
|
11475
11565
|
return _this;
|
|
11476
11566
|
}
|
|
@@ -11479,6 +11569,103 @@ var HtTablevue_type_script_lang_ts_HtTable = /*#__PURE__*/function (_Vue) {
|
|
|
11479
11569
|
key: "created",
|
|
11480
11570
|
value: function created() {
|
|
11481
11571
|
this.setPageInfo(this.pageInfo);
|
|
11572
|
+
this.state.showColumns = this.columns;
|
|
11573
|
+
|
|
11574
|
+
if (this.uuId) {
|
|
11575
|
+
//通过uuid获取缓存起来的header显示信息
|
|
11576
|
+
var showKeys = window.localStorage.getItem("table_" + this.uuId);
|
|
11577
|
+
|
|
11578
|
+
if (showKeys) {
|
|
11579
|
+
this.state.showColumnKeys = JSON.parse(showKeys);
|
|
11580
|
+
} else {
|
|
11581
|
+
this.creatInitColumnKey();
|
|
11582
|
+
}
|
|
11583
|
+
} else {
|
|
11584
|
+
this.creatInitColumnKey();
|
|
11585
|
+
}
|
|
11586
|
+
}
|
|
11587
|
+
}, {
|
|
11588
|
+
key: "creatInitColumnKey",
|
|
11589
|
+
value: function creatInitColumnKey() {
|
|
11590
|
+
this.state.showColumnKeys = this.columns.reduce(function (arr, item) {
|
|
11591
|
+
arr.push(item.key);
|
|
11592
|
+
return arr;
|
|
11593
|
+
}, []);
|
|
11594
|
+
}
|
|
11595
|
+
}, {
|
|
11596
|
+
key: "changeColumns",
|
|
11597
|
+
value: function changeColumns(node, checked) {
|
|
11598
|
+
var showColumnKeys = this.state.showColumnKeys;
|
|
11599
|
+
|
|
11600
|
+
if (checked) {
|
|
11601
|
+
showColumnKeys.push(node.key);
|
|
11602
|
+
} else {
|
|
11603
|
+
showColumnKeys = showColumnKeys.filter(function (item) {
|
|
11604
|
+
return item !== node.key;
|
|
11605
|
+
});
|
|
11606
|
+
}
|
|
11607
|
+
|
|
11608
|
+
this.state.showColumnKeys = showColumnKeys;
|
|
11609
|
+
}
|
|
11610
|
+
}, {
|
|
11611
|
+
key: "handleDragStart",
|
|
11612
|
+
value: function handleDragStart(node) {
|
|
11613
|
+
this.state.currentColumn = node.data;
|
|
11614
|
+
}
|
|
11615
|
+
}, {
|
|
11616
|
+
key: "handleDragEnter",
|
|
11617
|
+
value: function handleDragEnter() {// console.log("tree drag enter: ", dropNode.label);
|
|
11618
|
+
}
|
|
11619
|
+
}, {
|
|
11620
|
+
key: "handleDragLeave",
|
|
11621
|
+
value: function handleDragLeave() {//console.log("tree drag leave: ", dropNode.label);
|
|
11622
|
+
}
|
|
11623
|
+
}, {
|
|
11624
|
+
key: "handleDragOver",
|
|
11625
|
+
value: function handleDragOver() {// console.log("tree drag over: ", dropNode.label);
|
|
11626
|
+
}
|
|
11627
|
+
}, {
|
|
11628
|
+
key: "handleDragEnd",
|
|
11629
|
+
value: function handleDragEnd(draggingNode, dropNode, dropType) {
|
|
11630
|
+
var _this2 = this;
|
|
11631
|
+
|
|
11632
|
+
var _this$state = this.state,
|
|
11633
|
+
showColumns = _this$state.showColumns,
|
|
11634
|
+
currentColumn = _this$state.currentColumn,
|
|
11635
|
+
showColumnKeys = _this$state.showColumnKeys; // if ((dropType === "before" || dropType === "after") && currentColumn) {
|
|
11636
|
+
// const data = showColumns.filter(
|
|
11637
|
+
// (item) => item.key !== currentColumn?.key
|
|
11638
|
+
// );
|
|
11639
|
+
// const index = data.findIndex((item) => item.key === dropNode.data.key);
|
|
11640
|
+
// dropType === "before"
|
|
11641
|
+
// ? data.splice(index, 0, currentColumn)
|
|
11642
|
+
// : data.splice(index + 1, 0, currentColumn);
|
|
11643
|
+
// console.log("tree drag end: ", currentColumn, showColumnKeys);
|
|
11644
|
+
|
|
11645
|
+
if (currentColumn && showColumnKeys.includes(currentColumn.key)) {
|
|
11646
|
+
setTimeout(function () {
|
|
11647
|
+
_this2.$refs.tree.setChecked(currentColumn, true);
|
|
11648
|
+
}, 0);
|
|
11649
|
+
} // }
|
|
11650
|
+
|
|
11651
|
+
}
|
|
11652
|
+
}, {
|
|
11653
|
+
key: "handleDrop",
|
|
11654
|
+
value: function handleDrop() {// console.log("tree drop: ", dropNode, dropType);
|
|
11655
|
+
}
|
|
11656
|
+
/** 节点是否被插入 */
|
|
11657
|
+
|
|
11658
|
+
}, {
|
|
11659
|
+
key: "allowDrop",
|
|
11660
|
+
value: function allowDrop(draggingNode, dropNode, type) {
|
|
11661
|
+
return type !== "inner";
|
|
11662
|
+
}
|
|
11663
|
+
/** 节点是否允许拖动 */
|
|
11664
|
+
|
|
11665
|
+
}, {
|
|
11666
|
+
key: "allowDrag",
|
|
11667
|
+
value: function allowDrag(draggingNode) {
|
|
11668
|
+
return !draggingNode.data.disabled;
|
|
11482
11669
|
}
|
|
11483
11670
|
/** 处理table里面根据字段获取对应的值 */
|
|
11484
11671
|
|
|
@@ -11514,6 +11701,11 @@ var HtTablevue_type_script_lang_ts_HtTable = /*#__PURE__*/function (_Vue) {
|
|
|
11514
11701
|
|
|
11515
11702
|
return tempObj ? tempObj[keyArr[i]] : null;
|
|
11516
11703
|
}
|
|
11704
|
+
}, {
|
|
11705
|
+
key: "showFilterModel",
|
|
11706
|
+
value: function showFilterModel() {
|
|
11707
|
+
this.state.visibleFilter = true;
|
|
11708
|
+
}
|
|
11517
11709
|
/** 遍历循环展示row数据 */
|
|
11518
11710
|
|
|
11519
11711
|
}, {
|
|
@@ -11541,10 +11733,12 @@ var HtTablevue_type_script_lang_ts_HtTable = /*#__PURE__*/function (_Vue) {
|
|
|
11541
11733
|
return "";
|
|
11542
11734
|
}
|
|
11543
11735
|
}
|
|
11544
|
-
/**
|
|
11736
|
+
/** 获取显示出来的table头信息 */
|
|
11545
11737
|
|
|
11546
11738
|
}, {
|
|
11547
11739
|
key: "setPageInfo",
|
|
11740
|
+
|
|
11741
|
+
/** 监听 */
|
|
11548
11742
|
value: function setPageInfo(val) {
|
|
11549
11743
|
if (val) {
|
|
11550
11744
|
var pageInfo = val;
|
|
@@ -11556,6 +11750,34 @@ var HtTablevue_type_script_lang_ts_HtTable = /*#__PURE__*/function (_Vue) {
|
|
|
11556
11750
|
};
|
|
11557
11751
|
}
|
|
11558
11752
|
}
|
|
11753
|
+
}, {
|
|
11754
|
+
key: "setColumns",
|
|
11755
|
+
value: function setColumns(columns) {
|
|
11756
|
+
this.state.showColumns = columns || [];
|
|
11757
|
+
}
|
|
11758
|
+
}, {
|
|
11759
|
+
key: "showColumns",
|
|
11760
|
+
get: function get() {
|
|
11761
|
+
var _this$state2 = this.state,
|
|
11762
|
+
showColumnKeys = _this$state2.showColumnKeys,
|
|
11763
|
+
showColumns = _this$state2.showColumns;
|
|
11764
|
+
var obj = {};
|
|
11765
|
+
|
|
11766
|
+
for (var key in showColumnKeys) {
|
|
11767
|
+
obj = _objectSpread2(_objectSpread2({}, obj), {}, defineProperty_defineProperty({}, showColumnKeys[key], true));
|
|
11768
|
+
}
|
|
11769
|
+
/** 缓存起来下次使用 --todo只做了显示没有做排序缓存 */
|
|
11770
|
+
|
|
11771
|
+
|
|
11772
|
+
if (this.uuId) {
|
|
11773
|
+
window.localStorage.setItem("table_" + this.uuId, JSON.stringify(showColumnKeys));
|
|
11774
|
+
}
|
|
11775
|
+
|
|
11776
|
+
var data = showColumns.filter(function (item) {
|
|
11777
|
+
return obj[item.key];
|
|
11778
|
+
});
|
|
11779
|
+
return data;
|
|
11780
|
+
}
|
|
11559
11781
|
}]);
|
|
11560
11782
|
|
|
11561
11783
|
return HtTable;
|
|
@@ -11567,6 +11789,10 @@ __decorate([Prop()], HtTablevue_type_script_lang_ts_HtTable.prototype, "data", v
|
|
|
11567
11789
|
|
|
11568
11790
|
__decorate([Prop()], HtTablevue_type_script_lang_ts_HtTable.prototype, "keyName", void 0);
|
|
11569
11791
|
|
|
11792
|
+
__decorate([Prop()], HtTablevue_type_script_lang_ts_HtTable.prototype, "showFilter", void 0);
|
|
11793
|
+
|
|
11794
|
+
__decorate([Prop()], HtTablevue_type_script_lang_ts_HtTable.prototype, "uuId", void 0);
|
|
11795
|
+
|
|
11570
11796
|
__decorate([Prop()], HtTablevue_type_script_lang_ts_HtTable.prototype, "hidePage", void 0);
|
|
11571
11797
|
|
|
11572
11798
|
__decorate([Prop()], HtTablevue_type_script_lang_ts_HtTable.prototype, "checked", void 0);
|
|
@@ -11605,10 +11831,18 @@ __decorate([Prop()], HtTablevue_type_script_lang_ts_HtTable.prototype, "pageInfo
|
|
|
11605
11831
|
|
|
11606
11832
|
__decorate([Prop()], HtTablevue_type_script_lang_ts_HtTable.prototype, "emptyText", void 0);
|
|
11607
11833
|
|
|
11834
|
+
__decorate([Prop()], HtTablevue_type_script_lang_ts_HtTable.prototype, "headerRowStyle", void 0);
|
|
11835
|
+
|
|
11836
|
+
__decorate([Prop()], HtTablevue_type_script_lang_ts_HtTable.prototype, "headerRowClassName", void 0);
|
|
11837
|
+
|
|
11838
|
+
__decorate([Prop()], HtTablevue_type_script_lang_ts_HtTable.prototype, "headerCellStyle", void 0);
|
|
11839
|
+
|
|
11608
11840
|
__decorate([Prop()], HtTablevue_type_script_lang_ts_HtTable.prototype, "pagination", void 0);
|
|
11609
11841
|
|
|
11610
11842
|
__decorate([Watch("pageInfo")], HtTablevue_type_script_lang_ts_HtTable.prototype, "setPageInfo", null);
|
|
11611
11843
|
|
|
11844
|
+
__decorate([Watch("columns")], HtTablevue_type_script_lang_ts_HtTable.prototype, "setColumns", null);
|
|
11845
|
+
|
|
11612
11846
|
HtTablevue_type_script_lang_ts_HtTable = __decorate([vue_class_component_esm({
|
|
11613
11847
|
name: "HtTable",
|
|
11614
11848
|
components: {
|
|
@@ -11628,11 +11862,11 @@ HtTablevue_type_script_lang_ts_HtTable = __decorate([vue_class_component_esm({
|
|
|
11628
11862
|
|
|
11629
11863
|
var HtTable_component = normalizeComponent(
|
|
11630
11864
|
packages_HtTablevue_type_script_lang_ts_,
|
|
11631
|
-
|
|
11632
|
-
|
|
11865
|
+
HtTablevue_type_template_id_292d8f4f_scoped_true_render,
|
|
11866
|
+
HtTablevue_type_template_id_292d8f4f_scoped_true_staticRenderFns,
|
|
11633
11867
|
false,
|
|
11634
11868
|
null,
|
|
11635
|
-
"
|
|
11869
|
+
"292d8f4f",
|
|
11636
11870
|
null
|
|
11637
11871
|
|
|
11638
11872
|
)
|
package/lib/htui.umd.js.gz
CHANGED
|
Binary file
|