iov-pro-components 0.0.22 → 0.0.24
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/iov-pro-components.min.js +33 -23
- package/package.json +1 -1
|
@@ -11722,8 +11722,18 @@ var script$9 = {
|
|
|
11722
11722
|
* @time 2024-11-27 18:42:59
|
|
11723
11723
|
*/
|
|
11724
11724
|
doLayout: function doLayout(columns) {
|
|
11725
|
+
var _this5 = this;
|
|
11725
11726
|
// 记录当前隐藏的列
|
|
11726
|
-
this.displayColumns = columns.filter(this.vif)
|
|
11727
|
+
this.displayColumns = columns.filter(this.vif).map(function (column) {
|
|
11728
|
+
// 处理后的数据
|
|
11729
|
+
var columnCopy = {};
|
|
11730
|
+
// 遍历字段的key
|
|
11731
|
+
Object.keys(column).forEach(function (fieldKey) {
|
|
11732
|
+
columnCopy[fieldKey] = isEvalFunction(column[fieldKey]) ? _this5.functionEval(column[fieldKey]) : column[fieldKey];
|
|
11733
|
+
});
|
|
11734
|
+
// 返回处理后的数据
|
|
11735
|
+
return columnCopy;
|
|
11736
|
+
});
|
|
11727
11737
|
// 重新渲染
|
|
11728
11738
|
this.tableKey = randomString(32);
|
|
11729
11739
|
},
|
|
@@ -11751,7 +11761,7 @@ var script$9 = {
|
|
|
11751
11761
|
}
|
|
11752
11762
|
},
|
|
11753
11763
|
render: function render() {
|
|
11754
|
-
var
|
|
11764
|
+
var _this6 = this;
|
|
11755
11765
|
var h = arguments[0];
|
|
11756
11766
|
var _getComponentNames = getComponentNames(['table', 'table-column', 'tag', 'link', 'pagination']),
|
|
11757
11767
|
_getComponentNames2 = _slicedToArray(_getComponentNames, 5),
|
|
@@ -11784,24 +11794,24 @@ var script$9 = {
|
|
|
11784
11794
|
"class": 'iov-pro-table'
|
|
11785
11795
|
}, [h(Table, _mergeJSXProps([{
|
|
11786
11796
|
"ref": 'table',
|
|
11787
|
-
"key":
|
|
11797
|
+
"key": _this6.tableKey
|
|
11788
11798
|
}, {
|
|
11789
11799
|
"props": _objectSpread2({
|
|
11790
|
-
data: data ? lodashGet(data,
|
|
11791
|
-
},
|
|
11800
|
+
data: data ? lodashGet(data, _this6.aliasMap.list) : []
|
|
11801
|
+
}, _this6.tableConfig)
|
|
11792
11802
|
}, {
|
|
11793
11803
|
"class": 'iov-pro-table__table'
|
|
11794
11804
|
}, {
|
|
11795
|
-
"on":
|
|
11805
|
+
"on": _this6.bindEvent(TABLE_EVENTS)
|
|
11796
11806
|
}]), [
|
|
11797
11807
|
// 遍历配置项
|
|
11798
|
-
|
|
11808
|
+
_this6.displayColumns.map(function (column) {
|
|
11799
11809
|
// 当前属性
|
|
11800
|
-
var props =
|
|
11810
|
+
var props = _this6.getTableProps(column);
|
|
11801
11811
|
// slots
|
|
11802
11812
|
var scopedSlots = {};
|
|
11803
11813
|
// 插槽的执行方法
|
|
11804
|
-
var scopedSlotsFunc = column.slotName ?
|
|
11814
|
+
var scopedSlotsFunc = column.slotName ? _this6.$scopedSlots[column.slotName] : _this6.$scopedSlots[column.prop];
|
|
11805
11815
|
// 根据类型去设置props和scopedSlots
|
|
11806
11816
|
switch (column.type) {
|
|
11807
11817
|
case 'enum':
|
|
@@ -11841,7 +11851,7 @@ var script$9 = {
|
|
|
11841
11851
|
return e.value === v;
|
|
11842
11852
|
}) || {};
|
|
11843
11853
|
// 当前展示的tag
|
|
11844
|
-
return h(Tag, _mergeJSXProps([{
|
|
11854
|
+
return columnEnum.label ? h(Tag, _mergeJSXProps([{
|
|
11845
11855
|
"attrs": {
|
|
11846
11856
|
"type": columnEnum.type
|
|
11847
11857
|
}
|
|
@@ -11850,7 +11860,7 @@ var script$9 = {
|
|
|
11850
11860
|
size: 'mini',
|
|
11851
11861
|
hit: true
|
|
11852
11862
|
}, column.config || {})
|
|
11853
|
-
}]), [columnEnum.label]);
|
|
11863
|
+
}]), [columnEnum.label]) : null;
|
|
11854
11864
|
})]);
|
|
11855
11865
|
};
|
|
11856
11866
|
break;
|
|
@@ -11929,17 +11939,17 @@ var script$9 = {
|
|
|
11929
11939
|
"column": column
|
|
11930
11940
|
},
|
|
11931
11941
|
"on": {
|
|
11932
|
-
"sort":
|
|
11942
|
+
"sort": _this6.onSortAdvance.bind(_this6, column),
|
|
11933
11943
|
"confirm": function confirm(val) {
|
|
11934
|
-
return
|
|
11944
|
+
return _this6.onConfirmAdvance(column, val);
|
|
11935
11945
|
},
|
|
11936
|
-
"reset":
|
|
11946
|
+
"reset": _this6.onResetAdvance.bind(_this6, column)
|
|
11937
11947
|
}
|
|
11938
11948
|
}));
|
|
11939
11949
|
}
|
|
11940
11950
|
});
|
|
11941
11951
|
// 表头插槽
|
|
11942
|
-
var scopedSlotsHeader =
|
|
11952
|
+
var scopedSlotsHeader = _this6.$scopedSlots["".concat(column.prop, ":header")];
|
|
11943
11953
|
// 如果当前有搜索,排序等功能
|
|
11944
11954
|
if (tableColumnHeader.length > 0) {
|
|
11945
11955
|
scopedSlots.header = function () {
|
|
@@ -11967,23 +11977,23 @@ var script$9 = {
|
|
|
11967
11977
|
}]));
|
|
11968
11978
|
})]),
|
|
11969
11979
|
// 如果有分页数量才展示
|
|
11970
|
-
data && lodashGet(data,
|
|
11971
|
-
"props": _objectSpread2(_objectSpread2({},
|
|
11972
|
-
currentPage:
|
|
11973
|
-
pageSize:
|
|
11974
|
-
total: lodashGet(data,
|
|
11980
|
+
data && lodashGet(data, _this6.aliasMap.totalCount) > 0 && _this6.config.pagination !== false ? h(Pagination, _mergeJSXProps([{}, {
|
|
11981
|
+
"props": _objectSpread2(_objectSpread2({}, _this6.paginationConfig), {}, {
|
|
11982
|
+
currentPage: _this6.currPage,
|
|
11983
|
+
pageSize: _this6.pageSize,
|
|
11984
|
+
total: lodashGet(data, _this6.aliasMap.totalCount)
|
|
11975
11985
|
})
|
|
11976
11986
|
}, {
|
|
11977
11987
|
"class": 'iov-pro-table__pagination'
|
|
11978
11988
|
}, {
|
|
11979
|
-
"on":
|
|
11989
|
+
"on": _this6.bindEvent(PAGINATION_EVENTS)
|
|
11980
11990
|
}])) : null]);
|
|
11981
11991
|
}
|
|
11982
11992
|
}
|
|
11983
11993
|
}, {
|
|
11984
11994
|
"on": {
|
|
11985
11995
|
loaded: function loaded(respData) {
|
|
11986
|
-
return
|
|
11996
|
+
return _this6.$emit('loaded', respData);
|
|
11987
11997
|
}
|
|
11988
11998
|
}
|
|
11989
11999
|
}]));
|
|
@@ -19936,7 +19946,7 @@ var install = function install(Vue, componentConfig) {
|
|
|
19936
19946
|
};
|
|
19937
19947
|
var index = {
|
|
19938
19948
|
install: install,
|
|
19939
|
-
version: '0.0.
|
|
19949
|
+
version: '0.0.24',
|
|
19940
19950
|
ColumnTooltip: __vue_component__$t,
|
|
19941
19951
|
Description: __vue_component__$q,
|
|
19942
19952
|
DialogSelect: __vue_component__$p,
|