@indfnd/common 0.1.48 → 0.1.49
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 +13 -0
- package/dist/ind-common.es.js +29 -5
- package/dist/ind-common.umd.cjs +27 -27
- package/dist/styles/index.css +1 -1
- package/package.json +1 -1
- package/src/styles/components/drawer.less +2 -2
- package/src/styles/components/form.less +13 -4
- package/src/styles/components/layout/basic-layout.less +1 -1
- package/src/styles/components/modal.less +4 -4
- package/src/styles/components/table.less +1 -1
- package/src/styles/components/tree.less +6 -2
- package/src/styles/third/view-design.less +7 -3
- package/src/styles/variables/theme/default/common.less +26 -0
- package/src/styles/variables/theme/default/table.less +1 -0
- package/src/styles/variables/theme/small/common.less +31 -0
- package/src/styles/variables/theme/small/layout.less +2 -2
- package/src/styles/variables/theme/small/table.less +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,19 @@
|
|
|
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.49](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v0.1.48...v0.1.49) (2024-04-25)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* 紧凑版样式优化 ([4ca842e](http://git.inspur.com/imp-ec/ind-front/ind-common-front/commit/4ca842e485e47d51e7b5f9e5f94e3e84ccb85add))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* **drop:** 解决popper的报错 ([1666a69](http://git.inspur.com/imp-ec/ind-front/ind-common-front/commit/1666a69eda20dd5cf07219b58ba5ddb1ba518e03))
|
|
16
|
+
* **table:** 封装valueSetter,对于返回false的情况将值置回原来的值 ([1c56c45](http://git.inspur.com/imp-ec/ind-front/ind-common-front/commit/1c56c45e995a9216a5f0b0b76049c20c47aa8001))
|
|
17
|
+
|
|
5
18
|
### [0.1.48](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v0.1.47...v0.1.48) (2024-04-24)
|
|
6
19
|
|
|
7
20
|
|
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, uuid, 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, 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.48";
|
|
6
6
|
const author = "huxuetong";
|
|
7
7
|
const publishConfig = {
|
|
8
8
|
registry: "https://registry.npmjs.org/"
|
|
@@ -43837,7 +43837,7 @@ var classnames$1 = { exports: {} };
|
|
|
43837
43837
|
var classnames = classnames$1.exports;
|
|
43838
43838
|
const THEME_KEY = "ind-theme";
|
|
43839
43839
|
const THEME_LIST = ["ind-default-theme", "ind-small-theme"];
|
|
43840
|
-
const defaultTheme = "ind-
|
|
43840
|
+
const defaultTheme = "ind-small-theme";
|
|
43841
43841
|
function getDefaultTheme() {
|
|
43842
43842
|
return getLocalStorage(THEME_KEY) || defaultTheme;
|
|
43843
43843
|
}
|
|
@@ -43914,10 +43914,13 @@ const __vue2_script$1s = {
|
|
|
43914
43914
|
if (isServer$2)
|
|
43915
43915
|
return;
|
|
43916
43916
|
this.$nextTick(() => {
|
|
43917
|
+
var _a, _b;
|
|
43917
43918
|
if (this.popper) {
|
|
43918
43919
|
this.popper.update();
|
|
43919
43920
|
this.popperStatus = true;
|
|
43920
43921
|
} else {
|
|
43922
|
+
if (!((_b = (_a = this.$parent) == null ? void 0 : _a.$refs) == null ? void 0 : _b.reference) || !this.$el)
|
|
43923
|
+
return;
|
|
43921
43924
|
this.popper = new Popper$1(this.$parent.$refs.reference, this.$el, {
|
|
43922
43925
|
eventsEnabled: this.eventsEnabled,
|
|
43923
43926
|
placement: this.placement,
|
|
@@ -51869,11 +51872,11 @@ var render$W = function() {
|
|
|
51869
51872
|
var _vm = this;
|
|
51870
51873
|
var _h = _vm.$createElement;
|
|
51871
51874
|
var _c = _vm._self._c || _h;
|
|
51872
|
-
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
|
|
51875
|
+
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-table-button-padding)", "margin-right": "10px" } }, [_vm._t("options")], 2), _vm.showZeroSwitch ? _c("IndZeroRadio", { staticStyle: { "margin-bottom": "var(--ind-unit-switch-bottom)", "line-height": "1" }, attrs: { "zeroTitle": _vm.switchZeroTitle }, model: { value: _vm.showZero, callback: function($$v) {
|
|
51873
51876
|
_vm.showZero = $$v;
|
|
51874
51877
|
}, expression: "showZero" } }) : _vm._e(), _vm.showUnitSwitch && _vm.isShowUnitSwitch ? _c("IndUnitRadio", { staticStyle: { "margin-bottom": "var(--ind-unit-switch-bottom)", "line-height": "1" }, attrs: { "isShowWX": _vm.isShowWX, "isShowJ": _vm.isShowJ }, model: { value: _vm.unitType, callback: function($$v) {
|
|
51875
51878
|
_vm.unitType = $$v;
|
|
51876
|
-
}, expression: "unitType" } }) : _vm._e(), _vm.showTableOption ? _c("Dropdown", { staticClass: "table-option-dropdown", staticStyle: { "float": "right", "margin-bottom": "var(--ind-padding
|
|
51879
|
+
}, expression: "unitType" } }) : _vm._e(), _vm.showTableOption ? _c("Dropdown", { staticClass: "table-option-dropdown", staticStyle: { "float": "right", "margin-bottom": "var(--ind-table-button-padding)" }, 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) {
|
|
51877
51880
|
return _vm.$emit("revertColumnRow");
|
|
51878
51881
|
} } }, [_vm._v(" \u8F6C\u7F6E ")]) : _vm._e(), !_vm.isIndexManageTable ? _c("IndexManage", { attrs: { "tableRef": _vm.tableRef, "funId": (_vm.funId || "") + "-" + _vm.$route.meta.permissionId }, on: { "resetColumns": _vm.resetColumns } }) : _vm._e(), _c("IndButton", { attrs: { "bizType": "reset" }, on: { "click": function($event) {
|
|
51879
51882
|
return _vm.tableSettingToggle("3");
|
|
@@ -52134,6 +52137,7 @@ const __vue2_script$X = {
|
|
|
52134
52137
|
rowSelection: "single",
|
|
52135
52138
|
suppressRowClickSelection: false,
|
|
52136
52139
|
localeText: AG_GRID_LOCALE_ZH,
|
|
52140
|
+
isRevertingOldValue: false,
|
|
52137
52141
|
btnSel: "",
|
|
52138
52142
|
tableDataSrc: [],
|
|
52139
52143
|
tableData: _.cloneDeep(this.value),
|
|
@@ -52958,8 +52962,24 @@ const __vue2_script$X = {
|
|
|
52958
52962
|
if (column.cellRendererSelector) {
|
|
52959
52963
|
agColumn.cellRendererSelector = column.cellRendererSelector;
|
|
52960
52964
|
}
|
|
52961
|
-
if (column.valueSetter) {
|
|
52965
|
+
if (column.valueSetter && isString(column.valueSetter)) {
|
|
52962
52966
|
agColumn.valueSetter = column.valueSetter;
|
|
52967
|
+
} else if (column.valueSetter) {
|
|
52968
|
+
agColumn.valueSetter = (params) => {
|
|
52969
|
+
const isValid = column.valueSetter(params);
|
|
52970
|
+
if (!isValid) {
|
|
52971
|
+
const { newValue, oldValue, data, colDef, column: column2 } = params;
|
|
52972
|
+
this.isRevertingOldValue = true;
|
|
52973
|
+
data[colDef.key] = newValue;
|
|
52974
|
+
setTimeout(() => {
|
|
52975
|
+
params.node.setDataValue(column2, oldValue);
|
|
52976
|
+
this.isRevertingOldValue = false;
|
|
52977
|
+
}, 0);
|
|
52978
|
+
}
|
|
52979
|
+
if (!this.isRevertingOldValue) {
|
|
52980
|
+
return isValid;
|
|
52981
|
+
}
|
|
52982
|
+
};
|
|
52963
52983
|
}
|
|
52964
52984
|
if (this.columnCalcMap && this.columnCalcMap[column.field || column.key]) {
|
|
52965
52985
|
let calcRules = this.columnCalcMap[column.field || column.key];
|
|
@@ -64432,6 +64452,10 @@ if (typeof window !== "undefined" && window.Vue) {
|
|
|
64432
64452
|
window.addEventListener("resize", () => EventBus.$on("resize"), { passive: true });
|
|
64433
64453
|
window.addEventListener("orientationchange", () => EventBus.$on("resize"), { passive: true });
|
|
64434
64454
|
}
|
|
64455
|
+
document.documentElement.style.setProperty(
|
|
64456
|
+
"--common-label-width",
|
|
64457
|
+
window.innerWidth / 1920 * 200 + "px"
|
|
64458
|
+
);
|
|
64435
64459
|
const API = {
|
|
64436
64460
|
version: pkg.version,
|
|
64437
64461
|
install,
|