meixioacomponent 1.1.41 → 1.1.43

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.
@@ -73,6 +73,7 @@ const UseGuide_1 = __importDefault(require("../config/use/UseGuide"));
73
73
  const LinkViewClass_1 = __importDefault(require("../config/LinkViewClass"));
74
74
  //组件库type类型
75
75
  const useType_1 = require("../useType/useType");
76
+ const ProTableLocalConfigManage_1 = __importDefault(require("../config/ProTableLocalConfigManage/ProTableLocalConfigManage"));
76
77
  const meixicomponents = [
77
78
  baseAnchor_1.default,
78
79
  baseAppendix_1.default,
@@ -141,6 +142,7 @@ const install = (Vue) => {
141
142
  window[`meixiComponentConfig`] = componentConfig_1.default;
142
143
  componentConfig_1.default.createDialogCacheWrap();
143
144
  componentConfig_1.default.eventBus = new componentConfig_1.default.Vue();
145
+ ProTableLocalConfigManage_1.default.initByProTableLocalConfigManage();
144
146
  };
145
147
  //
146
148
  if (typeof window !== "undefined" && window[`Vue`]) {
@@ -0,0 +1,13 @@
1
+ declare class ProTableLocalConfigManage {
2
+ localConfig: Record<string, any>;
3
+ constructor();
4
+ initByProTableLocalConfigManage(): void;
5
+ setProTableLocalConfigByTableKey: (tableKey: string, value: any) => void;
6
+ checkRenderTableConfigAccordLocal: (tableKey: string, renderTable: Array<any>) => boolean;
7
+ deleteProTableLocalConfigByTableKey: (tableKey: string) => void;
8
+ hasConfigByTableKey: (tableKey: string) => any;
9
+ private setProTableLocalConfigByLocalStorage;
10
+ }
11
+ declare const proTableLocalConfigManage: ProTableLocalConfigManage;
12
+ export default proTableLocalConfigManage;
13
+ //# sourceMappingURL=ProTableLocalConfigManage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProTableLocalConfigManage.d.ts","sourceRoot":"","sources":["../../../packages/config/ProTableLocalConfigManage/ProTableLocalConfigManage.ts"],"names":[],"mappings":"AAAA,cAAM,yBAAyB;IAEpB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;;IAQjC,+BAA+B;IAU/B,gCAAgC,aAAc,MAAM,SAAS,GAAG,UAMtE;IAGM,iCAAiC,aAAc,MAAM,eAAe,MAAM,GAAG,CAAC,aA+BpF;IAGM,mCAAmC,aAAc,MAAM,UAU7D;IAGM,mBAAmB,aAAc,MAAM,SAS7C;IAGD,OAAO,CAAC,oCAAoC,CAG3C;CACJ;AAGD,QAAA,MAAM,yBAAyB,2BAAkC,CAAC;AAGlE,eAAe,yBAAyB,CAAC"}
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ class ProTableLocalConfigManage {
4
+ constructor() {
5
+ this.setProTableLocalConfigByTableKey = (tableKey, value) => {
6
+ this.localConfig[`${tableKey}`] = value;
7
+ console.log(this.localConfig);
8
+ this.setProTableLocalConfigByLocalStorage();
9
+ };
10
+ this.checkRenderTableConfigAccordLocal = (tableKey, renderTable) => {
11
+ const _value = this.hasConfigByTableKey(tableKey);
12
+ let checkFlag = true;
13
+ if (_value) {
14
+ console.log(renderTable);
15
+ console.log(_value);
16
+ if (_value.length !== renderTable.length) {
17
+ checkFlag = false;
18
+ this.deleteProTableLocalConfigByTableKey(tableKey);
19
+ return checkFlag;
20
+ }
21
+ for (let i = 0; i < renderTable.length; i++) {
22
+ const item = renderTable[i];
23
+ const index = _value.findIndex(cItem => {
24
+ return item.key === cItem.key;
25
+ });
26
+ if (index < 0) {
27
+ checkFlag = false;
28
+ this.deleteProTableLocalConfigByTableKey(tableKey);
29
+ break;
30
+ }
31
+ }
32
+ return checkFlag;
33
+ }
34
+ return false;
35
+ };
36
+ this.deleteProTableLocalConfigByTableKey = (tableKey) => {
37
+ console.log('deleteProTableLocalConfigByTableKey');
38
+ const _value = this.hasConfigByTableKey(tableKey);
39
+ if (_value) {
40
+ delete this.localConfig[`${tableKey}`];
41
+ this.setProTableLocalConfigByLocalStorage();
42
+ }
43
+ };
44
+ this.hasConfigByTableKey = (tableKey) => {
45
+ const value = this.localConfig[`${tableKey}`];
46
+ if (value) {
47
+ return value;
48
+ }
49
+ return false;
50
+ };
51
+ this.setProTableLocalConfigByLocalStorage = () => {
52
+ window.localStorage.setItem('proTableLocalConfig', JSON.stringify(this.localConfig));
53
+ console.log('setProTableLocalConfigByLocalStorage');
54
+ };
55
+ this.localConfig = {};
56
+ }
57
+ initByProTableLocalConfigManage() {
58
+ const _localConfig = window.localStorage.getItem('proTableLocalConfig');
59
+ if (_localConfig) {
60
+ this.localConfig = JSON.parse(_localConfig);
61
+ }
62
+ else {
63
+ this.setProTableLocalConfigByLocalStorage();
64
+ }
65
+ }
66
+ }
67
+ const proTableLocalConfigManage = new ProTableLocalConfigManage();
68
+ exports.default = proTableLocalConfigManage;