@indfnd/common 0.1.3 → 0.1.5
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/CHANGELOG.md +20 -0
- package/dist/ind-common.es.js +25 -18
- package/dist/ind-common.umd.cjs +24 -24
- package/dist/styles/index.css +1 -1
- package/package.json +1 -1
- package/src/styles/third/ag.less +1 -0
- package/src/styles/variables/theme/default/table.less +1 -0
- package/src/styles/variables/theme/small/table.less +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.1.5](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v0.1.4...v0.1.5) (2024-03-22)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* 去掉非必须得日志 ([6c95159](http://git.inspur.com/imp-ec/ind-front/ind-common-front/commit/6c95159231f2fb1480c922d21c2e844d6b793912))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* toggleUnitIfNeeded禁止并发调用 ([ed56782](http://git.inspur.com/imp-ec/ind-front/ind-common-front/commit/ed56782af6cb639413ef1600ef7df2ef090dc099))
|
|
16
|
+
|
|
17
|
+
### [0.1.4](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v0.1.3...v0.1.4) (2024-03-22)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* 单位样式 ([66a9b90](http://git.inspur.com/imp-ec/ind-front/ind-common-front/commit/66a9b9007d926c5358931f59b7f96131d015c89e))
|
|
23
|
+
* auto-refresh逻辑修复;支持表格默认单位 ([c1013bf](http://git.inspur.com/imp-ec/ind-front/ind-common-front/commit/c1013bf4cec8c126b9cbccad36d90c9c003d71d7))
|
|
24
|
+
|
|
5
25
|
### [0.1.3](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v0.1.2...v0.1.3) (2024-03-21)
|
|
6
26
|
|
|
7
27
|
|
package/dist/ind-common.es.js
CHANGED
|
@@ -2,7 +2,7 @@ import { Button as Button$1, ButtonGroup as ButtonGroup$1, Input, Drawer as Draw
|
|
|
2
2
|
import { isNil, formatDate as formatDate$1, useConfig, getLocalStorage, getQuarterNum, formatQuarter, str2Date, isDate, isArray, checkIdCard, checkVehicleNo, checkPhone, getDictMapApi, axios, isFunction, isString, exportJsonToExcel as exportJsonToExcel$1, importJsonFromExcel, on, off, deleteMenuHistoryApi, deleteMenuCollectApi, getMenuHistoryApi, getMenuCollectApi, listItemTreeApi, getPriceInfo, MIME_TYPE, base64ToBlob, putOssFileApi, isEqual, getCaptchaURL, guid, setLocalStorage, removeLocalStorage, clearSessionStorage, cryptor, getToken, putOssFileUrl, getOssFileUrl, responseInterceptors, config as config$1, setToken, loginApi, clearUserInfoCache, clearPermissionCache, logoutApi, getUserInfoCache, getUserInfoApi, setUserInfoCache, getSessionStorage, setSessionStorage, getAppListApi, getPermissionCache, getPermissionApi, setPermissionCache, menuHistoryApi, addMenuCollectApi, removeMenuCollectApi, getIndexDescCache, listIndexDescApi, setIndexDescCache } from "@indfnd/utils";
|
|
3
3
|
import Vue$1 from "vue";
|
|
4
4
|
const name$1 = "@indfnd/common";
|
|
5
|
-
const version = "0.1.
|
|
5
|
+
const version = "0.1.4";
|
|
6
6
|
const author = "huxuetong";
|
|
7
7
|
const publishConfig = {
|
|
8
8
|
registry: "https://registry.npmjs.org/"
|
|
@@ -51839,7 +51839,7 @@ var render$T = function() {
|
|
|
51839
51839
|
var _vm = this;
|
|
51840
51840
|
var _h = _vm.$createElement;
|
|
51841
51841
|
var _c = _vm._self._c || _h;
|
|
51842
|
-
return _c("div", { staticClass: "lambo-grid-table", class: [_vm.fullSreen ? "fullscreen-fixed" : ""] }, [_c("div", { directives: [{ name: "show", rawName: "v-show", value: _vm.$slots.search, expression: "$slots.search" }], ref: "search", staticClass: "search" }, [_vm._t("search")], 2), _c("div", { directives: [{ name: "show", rawName: "v-show", value: _vm.$slots.tip, expression: "$slots.tip" }], ref: "tip", staticClass: "tip" }, [_vm._t("tip")], 2), _c("div", { directives: [{ name: "show", rawName: "v-show", value: _vm.$slots.important - _vm.tip, expression: "$slots.important - tip" }], ref: "important-tip", staticClass: "important-tip" }, [_c("Icon", { attrs: { "type": "md-information-circle" } }), _vm._t("important-tip")], 2), _c("div", { ref: "buttons", staticClass: "other-button" }, [_c("Row", [[_c("i-col", { staticStyle: { "text-align": "left" }, attrs: { "flex": "1 1 0%" } }, [_c("IndButtonGroup", { attrs: { "split": "", "mb": "" } }, [_vm._t("buttons")], 2)], 1)], _vm.showUnitSwitch && _vm.isShowUnitSwitch || _vm.showTableOption || _vm.$slots.options ? _c("i-col", { staticStyle: { "text-align": "right" }, attrs: { "flex": "0 0 auto" } }, [_c("div", { staticClass: "ind-flex end" }, [_vm._t("options"), _vm.showUnitSwitch && _vm.isShowUnitSwitch ? _c("IndUnitRadio", { staticStyle: { "margin-bottom": "10px", "line-height": "1" }, attrs: { "isShowWX": _vm.isShowWX, "isShowJ": _vm.isShowJ }, model: { value: _vm.unitType, callback: function($$v) {
|
|
51842
|
+
return _c("div", { staticClass: "lambo-grid-table", class: [_vm.fullSreen ? "fullscreen-fixed" : ""] }, [_c("div", { directives: [{ name: "show", rawName: "v-show", value: _vm.$slots.search, expression: "$slots.search" }], ref: "search", staticClass: "search" }, [_vm._t("search")], 2), _c("div", { directives: [{ name: "show", rawName: "v-show", value: _vm.$slots.tip, expression: "$slots.tip" }], ref: "tip", staticClass: "tip" }, [_vm._t("tip")], 2), _c("div", { directives: [{ name: "show", rawName: "v-show", value: _vm.$slots.important - _vm.tip, expression: "$slots.important - tip" }], ref: "important-tip", staticClass: "important-tip" }, [_c("Icon", { attrs: { "type": "md-information-circle" } }), _vm._t("important-tip")], 2), _c("div", { ref: "buttons", staticClass: "other-button" }, [_c("Row", [[_c("i-col", { staticStyle: { "text-align": "left" }, attrs: { "flex": "1 1 0%" } }, [_c("IndButtonGroup", { attrs: { "split": "", "mb": "" } }, [_vm._t("buttons")], 2)], 1)], _vm.showUnitSwitch && _vm.isShowUnitSwitch || _vm.showTableOption || _vm.$slots.options ? _c("i-col", { staticStyle: { "text-align": "right" }, attrs: { "flex": "0 0 auto" } }, [_c("div", { staticClass: "ind-flex end" }, [_c("div", { staticStyle: { "line-height": "32px", "padding-bottom": "var(--ind-padding-base)", "margin-right": "10px" } }, [_vm._t("options")], 2), _vm.showUnitSwitch && _vm.isShowUnitSwitch ? _c("IndUnitRadio", { staticStyle: { "margin-bottom": "10px", "line-height": "1" }, attrs: { "isShowWX": _vm.isShowWX, "isShowJ": _vm.isShowJ }, model: { value: _vm.unitType, callback: function($$v) {
|
|
51843
51843
|
_vm.unitType = $$v;
|
|
51844
51844
|
}, expression: "unitType" } }) : _vm._e(), _vm.showTableOption ? _c("Dropdown", { staticClass: "table-option-dropdown", staticStyle: { "float": "right", "margin-bottom": "var(--ind-padding-base)" }, attrs: { "trigger": "custom", "visible": _vm.optionDropdownVisible, "placement": "bottom-end" }, on: { "on-click": _vm.resetTableSize } }, [_c("IndButtonGroup", { staticStyle: { "display": "flex" }, attrs: { "split": false, "mb": "" } }, [_c("IndButton", { attrs: { "bizType": "reset" }, on: { "click": _vm.toggleFullScreen } }, [_vm._v(" " + _vm._s(_vm.fullSreen ? "\u53D6\u6D88\u5168\u5C4F" : "\u5168\u5C4F") + " ")]), _vm.revertBtn ? _c("IndButton", { attrs: { "bizType": "reset" }, on: { "click": function($event) {
|
|
51845
51845
|
return _vm.$emit("revertColumnRow");
|
|
@@ -51849,7 +51849,7 @@ var render$T = function() {
|
|
|
51849
51849
|
_vm.checkAllGroup = $$v;
|
|
51850
51850
|
}, expression: "checkAllGroup" } }, [_vm._l(_vm.columns, function(item2) {
|
|
51851
51851
|
return [item2.title ? _c("Checkbox", { key: item2.field, attrs: { "label": item2.title } }, [_vm._v(_vm._s(item2.title))]) : _vm._e()];
|
|
51852
|
-
}), _c("br"), _c("br"), _vm._v(" \xA0 "), _c("Button", { staticClass: "table-column-select-btn", attrs: { "type": "default" }, on: { "click": _vm.columnSave } }, [_vm._v("\u4FDD \u5B58")]), _vm._v(" \xA0 "), _c("Button", { staticClass: "table-column-select-btn", attrs: { "type": "default" }, on: { "click": _vm.columnClear } }, [_vm._v("\u6E05 \u9664")])], 2)] : _vm._e(), _vm.btnSel != "1" ? _c("Button", { staticStyle: { "position": "absolute", "top": "10px", "right": "10px" }, attrs: { "type": "primary", "icon": "md-close", "size": "small", "title": "\u5173\u95ED" }, on: { "click": _vm.closeTableSettingDropdown } }) : _vm._e()], 2)], 1) : _vm._e()],
|
|
51852
|
+
}), _c("br"), _c("br"), _vm._v(" \xA0 "), _c("Button", { staticClass: "table-column-select-btn", attrs: { "type": "default" }, on: { "click": _vm.columnSave } }, [_vm._v("\u4FDD \u5B58")]), _vm._v(" \xA0 "), _c("Button", { staticClass: "table-column-select-btn", attrs: { "type": "default" }, on: { "click": _vm.columnClear } }, [_vm._v("\u6E05 \u9664")])], 2)] : _vm._e(), _vm.btnSel != "1" ? _c("Button", { staticStyle: { "position": "absolute", "top": "10px", "right": "10px" }, attrs: { "type": "primary", "icon": "md-close", "size": "small", "title": "\u5173\u95ED" }, on: { "click": _vm.closeTableSettingDropdown } }) : _vm._e()], 2)], 1) : _vm._e()], 1)]) : _vm._e()], 2)], 1), _c("IndLoadingPanel", { attrs: { "loading": _vm.tableLoading } }, [!_vm.refreshTable ? _c("ag-grid-vue", _vm._g(_vm._b({ ref: "tableRef", staticClass: "ag-theme-balham", style: { height: _vm.height && !_vm.fullSreen ? _vm.height + "px" : "100%" }, attrs: { "id": "agTable", "suppressCellFocus": true, "suppressMenu": true, "suppressContextMenu": true, "defaultColDef": _vm.defaultColDef, "headerHeight": _vm.headerHeight || (_vm.getTheme == "ind-small-theme" ? null : 38), "getRowHeight": _vm.getRowHeight, "rowData": _vm.tableData, "suppressRowClickSelection": _vm.isEditTable || _vm.suppressRowClickSelection, "rowSelection": _vm.rowSelection, "rowMultiSelectWithClick": !_vm.isEditTable && (_vm.rowSelection == "multiple" || _vm.rowMultiSelectWithClick), "columnDefs": _vm.tableColumns, "localeText": _vm.localeText, "singleClickEdit": true, "pinnedTopRowData": _vm.topRows, "pinnedBottomRowData": _vm.pinnedBottomRowData, "suppressRowTransform": true, "stopEditingWhenCellsLoseFocus": true, "getRowClass": _vm.getRowClass, "getRowId": _vm.getRowId, "tooltipShowDelay": 500, "overlayNoRowsTemplate": _vm.noRowsTemplate || _vm.overlayNoRowsTemplate, "treeData": _vm.treeData, "getDataPath": _vm.getDataPath, "autoGroupColumnDef": _vm.autoGroupColumnDef, "groupDisplayType": _vm.groupDisplayType, "groupSelectsChildren": _vm.groupSelectsChildren, "groupDefaultExpanded": _vm.groupDefaultExpanded }, on: { "sortChanged": _vm.sortChanged, "selection-changed": _vm.selectionChanged, "grid-ready": _vm.onGridReady, "cellClicked": _vm.cellClicked, "cellDoubleClicked": _vm.cellDoubleClicked } }, "ag-grid-vue", _vm.$attrs, false), _vm.$listeners)) : _vm._e()], 1), _vm.showBottom ? _c("div", { ref: "bottom" }, [_c("Row", { staticStyle: { "margin-top": "10px" } }, [_c("i-col", { staticStyle: { "text-align": "left" }, attrs: { "span": "18" } }, [_c("Page", { directives: [{ name: "show", rawName: "v-show", value: !_vm.disablePage, expression: "!disablePage" }], attrs: { "size": "small", "total": _vm.totalNumber, "current": _vm.currentPage, "page-size": _vm.limitNumber, "show-sizer": "", "show-total": "", "show-elevator": "" }, on: { "on-change": _vm.onPageChange, "on-page-size-change": _vm.onPageSizeChange } }), _c("span", { directives: [{ name: "show", rawName: "v-show", value: _vm.disablePage, expression: "disablePage" }] }, [_vm._v("\u5171 " + _vm._s(_vm.tableData.length) + " \u6761\u6570\u636E")])], 1)], 1)], 1) : _vm._e()], 1);
|
|
51853
51853
|
};
|
|
51854
51854
|
var staticRenderFns$T = [];
|
|
51855
51855
|
function suppressNavigation(params) {
|
|
@@ -52066,6 +52066,10 @@ const __vue2_script$U = {
|
|
|
52066
52066
|
type: String,
|
|
52067
52067
|
default: "X"
|
|
52068
52068
|
},
|
|
52069
|
+
defaultTableUnitType: {
|
|
52070
|
+
type: String,
|
|
52071
|
+
default: "X"
|
|
52072
|
+
},
|
|
52069
52073
|
xScale: {
|
|
52070
52074
|
type: Number,
|
|
52071
52075
|
default: 4
|
|
@@ -52136,7 +52140,7 @@ const __vue2_script$U = {
|
|
|
52136
52140
|
overlayNoRowsTemplate: '<span style="padding: 10px;">\u8BF7\u9009\u62E9\u67E5\u8BE2\u6761\u4EF6</span>',
|
|
52137
52141
|
showUnitSwitch: false,
|
|
52138
52142
|
switchCols: [],
|
|
52139
|
-
unitType: this.defaultUnitType || "X",
|
|
52143
|
+
unitType: this.defaultTableUnitType || this.defaultUnitType || "X",
|
|
52140
52144
|
topRows: this.pinnedTopRowData || null,
|
|
52141
52145
|
treeData: false,
|
|
52142
52146
|
getDataPath: (data) => {
|
|
@@ -52147,6 +52151,11 @@ const __vue2_script$U = {
|
|
|
52147
52151
|
};
|
|
52148
52152
|
},
|
|
52149
52153
|
computed: {
|
|
52154
|
+
isEditTable() {
|
|
52155
|
+
return _.some(this.flatColumns, (d) => {
|
|
52156
|
+
return ["input", "select", "treeselect"].includes(d.type);
|
|
52157
|
+
});
|
|
52158
|
+
},
|
|
52150
52159
|
getRowId() {
|
|
52151
52160
|
return this.rowKey ? (params) => params.data[this.rowKey] : null;
|
|
52152
52161
|
},
|
|
@@ -52342,6 +52351,7 @@ const __vue2_script$U = {
|
|
|
52342
52351
|
},
|
|
52343
52352
|
async created() {
|
|
52344
52353
|
this.tableRef = this;
|
|
52354
|
+
this.unitType = this.defaultTableUnitType;
|
|
52345
52355
|
this.cloneColumns = this.tableColumnsInner(_.cloneDeep(this.columns) || []);
|
|
52346
52356
|
this.cloneColumns2 = this.tableColumnsInner(_.cloneDeep(this.columns) || []);
|
|
52347
52357
|
this.tableColumns = _.cloneDeep(this.cloneColumns);
|
|
@@ -52419,17 +52429,13 @@ const __vue2_script$U = {
|
|
|
52419
52429
|
}
|
|
52420
52430
|
},
|
|
52421
52431
|
resetColumns(columns) {
|
|
52422
|
-
const columnDataMap =
|
|
52423
|
-
|
|
52424
|
-
|
|
52425
|
-
|
|
52426
|
-
|
|
52427
|
-
|
|
52428
|
-
|
|
52429
|
-
{}
|
|
52430
|
-
);
|
|
52431
|
-
columns.forEach((d) => {
|
|
52432
|
-
let srcColumn = columnDataMap[d.field || d.key];
|
|
52432
|
+
const columnDataMap = {};
|
|
52433
|
+
deepEach$2(null, this.columns || [], (item2) => {
|
|
52434
|
+
let field = item2.field || item2.key || item2.type;
|
|
52435
|
+
Object.assign(columnDataMap, { [field]: item2 });
|
|
52436
|
+
});
|
|
52437
|
+
deepEach$2(null, columns, (d) => {
|
|
52438
|
+
let srcColumn = columnDataMap[d.field || d.key || d.type];
|
|
52433
52439
|
srcColumn.hide = !d.checked;
|
|
52434
52440
|
if (d.pinned) {
|
|
52435
52441
|
srcColumn.pinned = d.pinned;
|
|
@@ -53083,7 +53089,8 @@ const __vue2_script$U = {
|
|
|
53083
53089
|
});
|
|
53084
53090
|
},
|
|
53085
53091
|
tableRefresh: _.debounce(function(noQuery) {
|
|
53086
|
-
|
|
53092
|
+
var _a;
|
|
53093
|
+
if (this.dataApi && (!noQuery || !((_a = this.tableData) == null ? void 0 : _a.length))) {
|
|
53087
53094
|
if (this.gridApi) {
|
|
53088
53095
|
this.gridApi.hideOverlay();
|
|
53089
53096
|
}
|
|
@@ -53144,7 +53151,7 @@ const __vue2_script$U = {
|
|
|
53144
53151
|
setUnitType(unitType) {
|
|
53145
53152
|
this.unitType = unitType;
|
|
53146
53153
|
},
|
|
53147
|
-
async toggleUnitIfNeeded() {
|
|
53154
|
+
toggleUnitIfNeeded: _.debounce(async function toggleUnitIfNeeded() {
|
|
53148
53155
|
setTimeout(() => {
|
|
53149
53156
|
let datasTmp = _.cloneDeep(this.tableData);
|
|
53150
53157
|
if (this.unitType != this.defaultUnitType) {
|
|
@@ -53166,7 +53173,7 @@ const __vue2_script$U = {
|
|
|
53166
53173
|
}
|
|
53167
53174
|
this.$emit("input", datasTmp);
|
|
53168
53175
|
}, 10);
|
|
53169
|
-
},
|
|
53176
|
+
}, 1),
|
|
53170
53177
|
getSelection() {
|
|
53171
53178
|
return this.gridApi.getSelectedRows();
|
|
53172
53179
|
},
|