@indfnd/common 0.1.47 → 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 +21 -0
- package/dist/ind-common.es.js +40 -11
- package/dist/ind-common.umd.cjs +45 -45
- package/dist/styles/index.css +1 -1
- package/package.json +1 -1
- package/src/styles/components/date-picker.less +6 -0
- 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/layout/page-view.less +4 -4
- 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 +10 -6
- package/src/styles/variables/theme/default/common.less +30 -0
- package/src/styles/variables/theme/default/layout.less +5 -0
- package/src/styles/variables/theme/default/table.less +3 -0
- package/src/styles/variables/theme/small/common.less +36 -0
- package/src/styles/variables/theme/small/index.less +1 -0
- package/src/styles/variables/theme/small/layout.less +9 -4
- package/src/styles/variables/theme/small/table.less +7 -4
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,27 @@
|
|
|
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
|
+
|
|
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)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Features
|
|
22
|
+
|
|
23
|
+
* 紧凑版样式修改 ([5b9f2ed](http://git.inspur.com/imp-ec/ind-front/ind-common-front/commit/5b9f2edc38fdd4a1e0eedf3ac623a6160353629a))
|
|
24
|
+
* **date-picker:** 半年日期框支持全年 ([205c5d5](http://git.inspur.com/imp-ec/ind-front/ind-common-front/commit/205c5d5aa1b4e99ef6ab72849c62a3767d07df0b))
|
|
25
|
+
|
|
5
26
|
### [0.1.47](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v0.1.46...v0.1.47) (2024-04-24)
|
|
6
27
|
|
|
7
28
|
|
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,
|
|
@@ -47599,6 +47602,7 @@ const __vue2_script$1g = {
|
|
|
47599
47602
|
confirm: Boolean,
|
|
47600
47603
|
readonly: Boolean,
|
|
47601
47604
|
disabled: Boolean,
|
|
47605
|
+
fullYear: Boolean,
|
|
47602
47606
|
options: { type: Object, default: () => ({}) }
|
|
47603
47607
|
},
|
|
47604
47608
|
data() {
|
|
@@ -47623,10 +47627,11 @@ const __vue2_script$1g = {
|
|
|
47623
47627
|
return this.showClose ? "ios-close-circle" : "ios-calendar-outline";
|
|
47624
47628
|
},
|
|
47625
47629
|
messageTxt() {
|
|
47626
|
-
|
|
47630
|
+
var _a;
|
|
47631
|
+
if (!this.message || this.message.length < 4)
|
|
47627
47632
|
return "";
|
|
47628
47633
|
const halfYear = this.message.substring(4, 6);
|
|
47629
|
-
const halfYearText =
|
|
47634
|
+
const halfYearText = ((_a = this.dataList.find((item2) => item2.value === halfYear)) == null ? void 0 : _a.label) || "";
|
|
47630
47635
|
return `${this.message.substring(0, 4)}${halfYearText}`;
|
|
47631
47636
|
},
|
|
47632
47637
|
selectYear() {
|
|
@@ -47647,6 +47652,9 @@ const __vue2_script$1g = {
|
|
|
47647
47652
|
}
|
|
47648
47653
|
},
|
|
47649
47654
|
created() {
|
|
47655
|
+
if (this.fullYear) {
|
|
47656
|
+
this.dataList.unshift({ label: "\u5168\u5E74", value: "", disable: false });
|
|
47657
|
+
}
|
|
47650
47658
|
this.initData();
|
|
47651
47659
|
},
|
|
47652
47660
|
methods: {
|
|
@@ -51864,11 +51872,11 @@ var render$W = function() {
|
|
|
51864
51872
|
var _vm = this;
|
|
51865
51873
|
var _h = _vm.$createElement;
|
|
51866
51874
|
var _c = _vm._self._c || _h;
|
|
51867
|
-
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) {
|
|
51868
51876
|
_vm.showZero = $$v;
|
|
51869
|
-
}, expression: "showZero" } }) : _vm._e(), _vm.showUnitSwitch && _vm.isShowUnitSwitch ? _c("IndUnitRadio", { staticStyle: { "margin-bottom": "
|
|
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) {
|
|
51870
51878
|
_vm.unitType = $$v;
|
|
51871
|
-
}, 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) {
|
|
51872
51880
|
return _vm.$emit("revertColumnRow");
|
|
51873
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) {
|
|
51874
51882
|
return _vm.tableSettingToggle("3");
|
|
@@ -52129,6 +52137,7 @@ const __vue2_script$X = {
|
|
|
52129
52137
|
rowSelection: "single",
|
|
52130
52138
|
suppressRowClickSelection: false,
|
|
52131
52139
|
localeText: AG_GRID_LOCALE_ZH,
|
|
52140
|
+
isRevertingOldValue: false,
|
|
52132
52141
|
btnSel: "",
|
|
52133
52142
|
tableDataSrc: [],
|
|
52134
52143
|
tableData: _.cloneDeep(this.value),
|
|
@@ -52754,9 +52763,9 @@ const __vue2_script$X = {
|
|
|
52754
52763
|
let agColumn = {
|
|
52755
52764
|
resizable: true,
|
|
52756
52765
|
headerName: column.title || column.headerName,
|
|
52757
|
-
width: column.width,
|
|
52758
|
-
minWidth: column.minWidth,
|
|
52759
|
-
maxWidth: column.maxWidth,
|
|
52766
|
+
width: column.width ? parseInt(column.width) * (this.getTheme == "ind-small-theme" ? 0.8 : 1) : column.width,
|
|
52767
|
+
minWidth: column.minWidth ? parseInt(column.minWidth) * (this.getTheme == "ind-small-theme" ? 0.8 : 1) : column.minWidth,
|
|
52768
|
+
maxWidth: column.maxWidth ? parseInt(column.maxWidth) * (this.getTheme == "ind-small-theme" ? 0.8 : 1) : column.maxWidth,
|
|
52760
52769
|
pinned: column.fixed || column.pinned,
|
|
52761
52770
|
cellDataType: column.cellDataType || "text",
|
|
52762
52771
|
headerTooltip: (_c = (_b = (_a = this.$store) == null ? void 0 : _a.getters) == null ? void 0 : _b.getIndexDesc) == null ? void 0 : _c[column.standardField || column.key || column.field]
|
|
@@ -52953,8 +52962,24 @@ const __vue2_script$X = {
|
|
|
52953
52962
|
if (column.cellRendererSelector) {
|
|
52954
52963
|
agColumn.cellRendererSelector = column.cellRendererSelector;
|
|
52955
52964
|
}
|
|
52956
|
-
if (column.valueSetter) {
|
|
52965
|
+
if (column.valueSetter && isString(column.valueSetter)) {
|
|
52957
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
|
+
};
|
|
52958
52983
|
}
|
|
52959
52984
|
if (this.columnCalcMap && this.columnCalcMap[column.field || column.key]) {
|
|
52960
52985
|
let calcRules = this.columnCalcMap[column.field || column.key];
|
|
@@ -64427,6 +64452,10 @@ if (typeof window !== "undefined" && window.Vue) {
|
|
|
64427
64452
|
window.addEventListener("resize", () => EventBus.$on("resize"), { passive: true });
|
|
64428
64453
|
window.addEventListener("orientationchange", () => EventBus.$on("resize"), { passive: true });
|
|
64429
64454
|
}
|
|
64455
|
+
document.documentElement.style.setProperty(
|
|
64456
|
+
"--common-label-width",
|
|
64457
|
+
window.innerWidth / 1920 * 200 + "px"
|
|
64458
|
+
);
|
|
64430
64459
|
const API = {
|
|
64431
64460
|
version: pkg.version,
|
|
64432
64461
|
install,
|