@wlydfe/pro-ui 0.2.23 → 0.2.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.
@@ -3015,6 +3015,7 @@ export declare const PlusPage: {
3015
3015
  readonly radioProps?: Partial< PlusRadioProps> | undefined;
3016
3016
  readonly defaultSelectedRadioRow?: RecordType | ComputedRef<RecordType> | undefined;
3017
3017
  readonly filterTableHeaderOverflowLabelLength?: number | undefined;
3018
+ readonly filterTableLocalKey?: string | undefined;
3018
3019
  onRefresh?: (() => any) | undefined;
3019
3020
  onPaginationChange?: ((pageInfo: PageInfo) => any) | undefined;
3020
3021
  onClickAction?: ((data: ButtonsCallBackParams) => any) | undefined;
@@ -3160,6 +3161,9 @@ export declare const PlusPage: {
3160
3161
  filterTableHeaderOverflowLabelLength: {
3161
3162
  type: PropType<number>;
3162
3163
  };
3164
+ filterTableLocalKey: {
3165
+ type: PropType<string>;
3166
+ };
3163
3167
  }>> & {
3164
3168
  onRefresh?: (() => any) | undefined;
3165
3169
  onPaginationChange?: ((pageInfo: PageInfo) => any) | undefined;
@@ -3320,6 +3324,9 @@ export declare const PlusPage: {
3320
3324
  filterTableHeaderOverflowLabelLength: {
3321
3325
  type: PropType<number>;
3322
3326
  };
3327
+ filterTableLocalKey: {
3328
+ type: PropType<string>;
3329
+ };
3323
3330
  }>> & {
3324
3331
  onRefresh?: (() => any) | undefined;
3325
3332
  onPaginationChange?: ((pageInfo: PageInfo) => any) | undefined;
@@ -4093,6 +4100,9 @@ export declare const PlusPage: {
4093
4100
  filterTableHeaderOverflowLabelLength: {
4094
4101
  type: PropType<number>;
4095
4102
  };
4103
+ filterTableLocalKey: {
4104
+ type: PropType<string>;
4105
+ };
4096
4106
  }>> & {
4097
4107
  onRefresh?: (() => any) | undefined;
4098
4108
  onPaginationChange?: ((pageInfo: PageInfo) => any) | undefined;
@@ -7812,6 +7822,7 @@ export declare const PlusPage: {
7812
7822
  readonly radioProps?: Partial< PlusRadioProps> | undefined;
7813
7823
  readonly defaultSelectedRadioRow?: RecordType | ComputedRef<RecordType> | undefined;
7814
7824
  readonly filterTableHeaderOverflowLabelLength?: number | undefined;
7825
+ readonly filterTableLocalKey?: string | undefined;
7815
7826
  onRefresh?: (() => any) | undefined;
7816
7827
  onPaginationChange?: ((pageInfo: PageInfo) => any) | undefined;
7817
7828
  onClickAction?: ((data: ButtonsCallBackParams) => any) | undefined;
@@ -7957,6 +7968,9 @@ export declare const PlusPage: {
7957
7968
  filterTableHeaderOverflowLabelLength: {
7958
7969
  type: PropType<number>;
7959
7970
  };
7971
+ filterTableLocalKey: {
7972
+ type: PropType<string>;
7973
+ };
7960
7974
  }>> & {
7961
7975
  onRefresh?: (() => any) | undefined;
7962
7976
  onPaginationChange?: ((pageInfo: PageInfo) => any) | undefined;
@@ -8117,6 +8131,9 @@ export declare const PlusPage: {
8117
8131
  filterTableHeaderOverflowLabelLength: {
8118
8132
  type: PropType<number>;
8119
8133
  };
8134
+ filterTableLocalKey: {
8135
+ type: PropType<string>;
8136
+ };
8120
8137
  }>> & {
8121
8138
  onRefresh?: (() => any) | undefined;
8122
8139
  onPaginationChange?: ((pageInfo: PageInfo) => any) | undefined;
@@ -8890,6 +8907,9 @@ export declare const PlusPage: {
8890
8907
  filterTableHeaderOverflowLabelLength: {
8891
8908
  type: PropType<number>;
8892
8909
  };
8910
+ filterTableLocalKey: {
8911
+ type: PropType<string>;
8912
+ };
8893
8913
  }>> & {
8894
8914
  onRefresh?: (() => any) | undefined;
8895
8915
  onPaginationChange?: ((pageInfo: PageInfo) => any) | undefined;
@@ -12512,6 +12532,7 @@ export declare const PlusPage: {
12512
12532
  readonly radioProps?: Partial< PlusRadioProps> | undefined;
12513
12533
  readonly defaultSelectedRadioRow?: RecordType | ComputedRef<RecordType> | undefined;
12514
12534
  readonly filterTableHeaderOverflowLabelLength?: number | undefined;
12535
+ readonly filterTableLocalKey?: string | undefined;
12515
12536
  onRefresh?: (() => any) | undefined;
12516
12537
  onPaginationChange?: ((pageInfo: PageInfo) => any) | undefined;
12517
12538
  onClickAction?: ((data: ButtonsCallBackParams) => any) | undefined;
@@ -12657,6 +12678,9 @@ export declare const PlusPage: {
12657
12678
  filterTableHeaderOverflowLabelLength: {
12658
12679
  type: PropType<number>;
12659
12680
  };
12681
+ filterTableLocalKey: {
12682
+ type: PropType<string>;
12683
+ };
12660
12684
  }>> & {
12661
12685
  onRefresh?: (() => any) | undefined;
12662
12686
  onPaginationChange?: ((pageInfo: PageInfo) => any) | undefined;
@@ -12817,6 +12841,9 @@ export declare const PlusPage: {
12817
12841
  filterTableHeaderOverflowLabelLength: {
12818
12842
  type: PropType<number>;
12819
12843
  };
12844
+ filterTableLocalKey: {
12845
+ type: PropType<string>;
12846
+ };
12820
12847
  }>> & {
12821
12848
  onRefresh?: (() => any) | undefined;
12822
12849
  onPaginationChange?: ((pageInfo: PageInfo) => any) | undefined;
@@ -13590,6 +13617,9 @@ export declare const PlusPage: {
13590
13617
  filterTableHeaderOverflowLabelLength: {
13591
13618
  type: PropType<number>;
13592
13619
  };
13620
+ filterTableLocalKey: {
13621
+ type: PropType<string>;
13622
+ };
13593
13623
  }>> & {
13594
13624
  onRefresh?: (() => any) | undefined;
13595
13625
  onPaginationChange?: ((pageInfo: PageInfo) => any) | undefined;
@@ -3060,6 +3060,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
3060
3060
  readonly radioProps?: Partial< PlusRadioProps> | undefined;
3061
3061
  readonly defaultSelectedRadioRow?: RecordType | ComputedRef<RecordType> | undefined;
3062
3062
  readonly filterTableHeaderOverflowLabelLength?: number | undefined;
3063
+ readonly filterTableLocalKey?: string | undefined;
3063
3064
  onRefresh?: (() => any) | undefined;
3064
3065
  onPaginationChange?: ((pageInfo: PageInfo) => any) | undefined;
3065
3066
  onClickAction?: ((data: ButtonsCallBackParams) => any) | undefined;
@@ -3205,6 +3206,9 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
3205
3206
  filterTableHeaderOverflowLabelLength: {
3206
3207
  type: PropType<number>;
3207
3208
  };
3209
+ filterTableLocalKey: {
3210
+ type: PropType<string>;
3211
+ };
3208
3212
  }>> & {
3209
3213
  onRefresh?: (() => any) | undefined;
3210
3214
  onPaginationChange?: ((pageInfo: PageInfo) => any) | undefined;
@@ -3365,6 +3369,9 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
3365
3369
  filterTableHeaderOverflowLabelLength: {
3366
3370
  type: PropType<number>;
3367
3371
  };
3372
+ filterTableLocalKey: {
3373
+ type: PropType<string>;
3374
+ };
3368
3375
  }>> & {
3369
3376
  onRefresh?: (() => any) | undefined;
3370
3377
  onPaginationChange?: ((pageInfo: PageInfo) => any) | undefined;
@@ -4138,6 +4145,9 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
4138
4145
  filterTableHeaderOverflowLabelLength: {
4139
4146
  type: PropType<number>;
4140
4147
  };
4148
+ filterTableLocalKey: {
4149
+ type: PropType<string>;
4150
+ };
4141
4151
  }>> & {
4142
4152
  onRefresh?: (() => any) | undefined;
4143
4153
  onPaginationChange?: ((pageInfo: PageInfo) => any) | undefined;
@@ -226,7 +226,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
226
226
  class: "plus-page__table_wrapper"
227
227
  }, {
228
228
  default: withCtx(() => {
229
- var _a2, _b;
229
+ var _a2, _b, _c;
230
230
  return [
231
231
  createVNode(unref(PlusTable), mergeProps({
232
232
  ref_key: "plusTableInstance",
@@ -234,6 +234,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
234
234
  "title-bar": { refresh: true }
235
235
  }, _ctx.table, {
236
236
  adaptive: (_b = (_a2 = _ctx.table) == null ? void 0 : _a2.adaptive) != null ? _b : true,
237
+ "filter-table-local-key": (_c = _ctx.table) == null ? void 0 : _c.filterTableLocalKey,
237
238
  "table-data": unref(tableData),
238
239
  "loading-status": unref(loadingStatus),
239
240
  columns: processedColumns.value,
@@ -292,7 +293,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
292
293
  ])
293
294
  };
294
295
  })
295
- ]), 1040, ["adaptive", "table-data", "loading-status", "columns", "pagination"])
296
+ ]), 1040, ["adaptive", "filter-table-local-key", "table-data", "loading-status", "columns", "pagination"])
296
297
  ];
297
298
  }),
298
299
  _: 3
@@ -146,6 +146,9 @@ export declare const PlusTable: {
146
146
  filterTableHeaderOverflowLabelLength: {
147
147
  type: PropType<number>;
148
148
  };
149
+ filterTableLocalKey: {
150
+ type: PropType<string>;
151
+ };
149
152
  }>> & {
150
153
  onRefresh?: (() => any) | undefined;
151
154
  onPaginationChange?: ((pageInfo: PageInfo) => any) | undefined;
@@ -855,6 +858,9 @@ export declare const PlusTable: {
855
858
  filterTableHeaderOverflowLabelLength: {
856
859
  type: PropType<number>;
857
860
  };
861
+ filterTableLocalKey: {
862
+ type: PropType<string>;
863
+ };
858
864
  }>> & {
859
865
  onRefresh?: (() => any) | undefined;
860
866
  onPaginationChange?: ((pageInfo: PageInfo) => any) | undefined;
@@ -1052,6 +1058,9 @@ export declare const PlusTable: {
1052
1058
  filterTableHeaderOverflowLabelLength: {
1053
1059
  type: PropType<number>;
1054
1060
  };
1061
+ filterTableLocalKey: {
1062
+ type: PropType<string>;
1063
+ };
1055
1064
  }>> & {
1056
1065
  onRefresh?: (() => any) | undefined;
1057
1066
  onPaginationChange?: ((pageInfo: PageInfo) => any) | undefined;
@@ -1797,6 +1806,9 @@ export declare const PlusTable: {
1797
1806
  filterTableHeaderOverflowLabelLength: {
1798
1807
  type: PropType<number>;
1799
1808
  };
1809
+ filterTableLocalKey: {
1810
+ type: PropType<string>;
1811
+ };
1800
1812
  }>> & {
1801
1813
  onRefresh?: (() => any) | undefined;
1802
1814
  onPaginationChange?: ((pageInfo: PageInfo) => any) | undefined;
@@ -55,7 +55,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
55
55
  indexContentStyle: { type: [Object, Function], default: () => ({}) },
56
56
  editable: { type: [Boolean, String], default: false },
57
57
  adaptive: { type: [Boolean, Object], default: false },
58
- filterTableHeaderOverflowLabelLength: {}
58
+ filterTableHeaderOverflowLabelLength: {},
59
+ filterTableLocalKey: {}
59
60
  },
60
61
  emits: ["paginationChange", "clickAction", "clickActionConfirmCancel", "dragSortEnd", "formChange", "refresh", "edited", "cell-click", "cell-dblclick", "filterTableHeader", "radioChange"],
61
62
  setup(__props, { expose: __expose, emit: __emit }) {
@@ -90,7 +91,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
90
91
  watch(
91
92
  () => props.columns,
92
93
  (val) => {
93
- const filterOriginColumns = val.filter((item) => unref(item.hideInTable) !== true);
94
+ let filterOriginColumns = val.filter((item) => unref(item.hideInTable) !== true);
94
95
  filterColumns.value = filterOriginColumns.map((item) => {
95
96
  var _a2;
96
97
  return {
@@ -98,6 +99,25 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
98
99
  headerIsChecked: (_a2 = item.headerIsChecked) != null ? _a2 : true
99
100
  };
100
101
  });
102
+ if (props.filterTableLocalKey) {
103
+ const localColumns = localStorage.getItem(props.filterTableLocalKey);
104
+ if (localColumns) {
105
+ filterColumns.value = JSON.parse(localColumns);
106
+ const columsMap = filterColumns.value.reduce((acc, item, order) => {
107
+ acc[item.prop] = {
108
+ visable: item.headerIsChecked,
109
+ order
110
+ };
111
+ return acc;
112
+ }, {});
113
+ filterOriginColumns.forEach((item) => {
114
+ if (columsMap[item.prop]) {
115
+ item.headerIsChecked = columsMap[item.prop].visable;
116
+ }
117
+ });
118
+ filterOriginColumns.sort((a, b) => columsMap[a.prop].order - columsMap[b.prop].order);
119
+ }
120
+ }
101
121
  subColumns.value = filterOriginColumns.filter((item) => unref(item.headerIsChecked) !== false);
102
122
  columnsIsChange.value = !columnsIsChange.value;
103
123
  },
@@ -125,6 +145,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
125
145
  };
126
146
  const handleFilterTableConfirm = (_columns, eventType) => {
127
147
  filterColumns.value = _columns;
148
+ if (props.filterTableLocalKey) {
149
+ localStorage.setItem(props.filterTableLocalKey, JSON.stringify(filterColumns.value));
150
+ }
128
151
  emit("filterTableHeader", _columns, eventType);
129
152
  subColumns.value = _columns.filter(
130
153
  (item) => unref(item.hideInTable) !== true && item.headerIsChecked !== false
@@ -454,6 +454,11 @@ export type PlusTableSelfProps = {
454
454
  * @version 0.1.23
455
455
  */
456
456
  filterTableHeaderOverflowLabelLength?: number;
457
+ /**
458
+ * @version 0.2.23
459
+ * 过滤表格本地存储的key
460
+ */
461
+ filterTableLocalKey?: string;
457
462
  };
458
463
  export type PlusTableProps = PlusTableSelfProps & Partial<TableProps<any[]>> & RecordType;
459
464
  /**
package/es/index.css CHANGED
@@ -1,22 +1,22 @@
1
- .plus-description .plus-description__name{word-wrap:break-word;max-width:200px}.plus-description .plus-description__label{min-width:80px}.plus-description .plus-description__label.is-required:before{color:var(--el-color-danger);content:"*";margin-right:4px}.plus-description.no-border .el-descriptions__body .el-descriptions__table.is-bordered .el-descriptions__cell{border:0}.plus-description.no-border .el-descriptions__body .el-descriptions__label.el-descriptions__cell.is-bordered-label{background-color:var(--el-fill-color-blank)}
2
- .plus-breadcrumb{margin-bottom:8px}.plus-breadcrumb.no-data{margin-bottom:0}
3
- .plus-form.no-has-label+.el-form-item__label{padding:0;width:0}.plus-form .plus-form__footer{display:flex;justify-content:flex-end}.plus-form .plus-form__group__item{margin-bottom:20px}.plus-form .plus-form__group__item .plus-form__group__item__icon{align-items:center;display:flex}.plus-form .plus-form__group__item .plus-form__group__item__icon .el-icon{margin-right:5px}.plus-form .plus-form-item-extra{color:var(--el-text-color-placeholder);font-size:var(--el-font-size-base);margin-bottom:18px}
4
1
  .plus-check-card-group{display:flex;flex-wrap:wrap}.plus-check-card-group .plus-check-card{margin-bottom:16px;margin-right:16px}
5
- .plus-date-picker{align-items:center;border:1px solid var(--el-border-color);border-radius:var(--el-border-radius-base);display:flex;flex-wrap:nowrap;max-width:100%;width:-moz-fit-content;width:fit-content}.plus-date-picker:hover{border-color:var(--el-border-color-hover)}.plus-date-picker.is-focus{border-color:var(--el-color-primary)}.plus-date-picker.is-disabled{background-color:var(--el-disabled-bg-color)}.plus-date-picker.is-disabled:hover{border-color:var(--el-border-color)}.plus-date-picker .plus-date-picker__middle{color:var(--el-text-color-placeholder)}.plus-date-picker .plus-date-picker__start{flex:1;font-size:14px}.plus-date-picker .plus-date-picker__start.is-disabled .el-input__wrapper{box-shadow:none}.plus-date-picker .plus-date-picker__start .el-input__wrapper{border:none;box-shadow:none}.plus-date-picker .el-input__wrapper{width:100%}.plus-date-picker .el-input__wrapper:hover{box-shadow:none}.plus-date-picker .el-input__wrapper.is-focus{box-shadow:none}.plus-date-picker .plus-date-picker__end{flex:1;font-size:14px}.plus-date-picker .plus-date-picker__end.is-disabled .el-input__wrapper{box-shadow:none}.plus-date-picker .plus-date-picker__end .el-input__wrapper{border:none;box-shadow:none}.el-form-item.is-error .plus-date-picker{border-color:var(--el-color-danger)}.el-form-item.is-error .plus-date-picker .el-input__wrapper{box-shadow:none}.el-form-item.is-error .plus-date-picker .el-input__wrapper.is-focus{box-shadow:none!important}.el-form-item.is-error .plus-date-picker .el-input__wrapper:hover{box-shadow:none}
6
- .plus-check-card{border:1px solid var(--el-border-color);border-radius:var(--el-border-radius-base);box-sizing:border-box;color:var(--el-text-color-regular);cursor:pointer;display:flex;overflow:hidden;padding-block:16px;padding-inline:12px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.plus-check-card--large{width:440px}.plus-check-card--default{width:320px}.plus-check-card--small{width:200px}.plus-check-card--checked{background-color:rgba(var(--el-color-primary-rgb),.1);border-color:var(--el-color-primary);position:relative}.plus-check-card--checked:after{-webkit-border-after:10px solid transparent;-webkit-border-start:10px solid transparent;border:10px solid var(--el-color-primary);border-block-end:10px solid transparent;border-inline-start:10px solid transparent;border-start-end-radius:6px;content:"";height:0;inset-block-start:2px;inset-inline-end:2px;position:absolute;width:0}.plus-check-card--disabled{background-color:var(--el-color-info-light-9);border-color:var(--el-color-info-light-8);cursor:not-allowed}.plus-check-card--disabled:after{border-right-color:var(--el-color-info-light-5);border-top-color:var(--el-color-info-light-5)}.plus-check-card .plus-check-card__avatar-wrapper{-webkit-padding-end:8px;padding-inline-end:8px}.plus-check-card .plus-check-card__right-content{overflow:hidden;width:100%}.plus-check-card .plus-check-card__title{-webkit-margin-after:4px;align-items:center;color:var(--el-text-color-primary);display:flex;justify-content:space-between;margin-block-end:4px;width:100%}.plus-check-card .plus-check-card__title-left{align-items:center;display:flex}.plus-check-card .plus-check-card__title-right{align-items:center;display:flex;vertical-align:middle}.plus-check-card .plus-check-card__description{color:var(--el-text-color-regular);width:100%;word-break:break-all}
7
- .plus-dialog .plus-dialog-footer{align-items:center;display:flex}
8
2
  .plus-display-item__edit-icon{margin-left:8px}.plus-display-item__image{cursor:pointer;-o-object-fit:cover;object-fit:cover;overflow:hidden;width:30px}.plus-display-item__icon__copy{-webkit-margin-start:4px;color:var(--el-color-primary);cursor:pointer;margin-inline-start:4px;outline:none;text-decoration:none;transition:color .3s;vertical-align:sub}.plus-display-item__pre{background-color:var(--el-color-primary-light-9);border-radius:3px;font-size:85%;line-height:1.45;overflow:auto;padding:0;width:unset}.plus-display-item__badge.is-list .plus-display-item__badge__item+.plus-display-item__badge__item{padding-left:8px}.plus-display-item__badge .plus-display-item__badge__dot{border-radius:50%;display:inline-block;height:6px;position:relative;top:-1px;vertical-align:middle;width:6px}.plus-display-item__badge .plus-display-item__badge__dot--primary{background-color:var(--el-color-primary)}.plus-display-item__badge .plus-display-item__badge__dot--success{background-color:var(--el-color-success)}.plus-display-item__badge .plus-display-item__badge__dot--info{background-color:var(--el-color-info)}.plus-display-item__badge .plus-display-item__badge__dot--warning{background-color:var(--el-color-warning)}.plus-display-item__badge .plus-display-item__badge__dot--danger{background-color:var(--el-color-danger)}.plus-display-item__form .plus-form-item{margin-bottom:0}.plus-display-item__link{max-width:100%}.plus-display-item__link .el-link__inner{display:inline-block;width:100%}
9
- .plus-drawer-form .el-drawer__header{border-bottom:1px solid var(--el-border-color);margin-bottom:0;padding-bottom:calc(var(--el-drawer-padding-primary)/2);padding-top:calc(var(--el-drawer-padding-primary)/2)}.plus-drawer-form .el-drawer__footer{border-top:1px solid var(--el-border-color);padding-bottom:calc(var(--el-drawer-padding-primary)/2)}
3
+ .plus-check-card{border:1px solid var(--el-border-color);border-radius:var(--el-border-radius-base);box-sizing:border-box;color:var(--el-text-color-regular);cursor:pointer;display:flex;overflow:hidden;padding-block:16px;padding-inline:12px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.plus-check-card--large{width:440px}.plus-check-card--default{width:320px}.plus-check-card--small{width:200px}.plus-check-card--checked{background-color:rgba(var(--el-color-primary-rgb),.1);border-color:var(--el-color-primary);position:relative}.plus-check-card--checked:after{-webkit-border-after:10px solid transparent;-webkit-border-start:10px solid transparent;border:10px solid var(--el-color-primary);border-block-end:10px solid transparent;border-inline-start:10px solid transparent;border-start-end-radius:6px;content:"";height:0;inset-block-start:2px;inset-inline-end:2px;position:absolute;width:0}.plus-check-card--disabled{background-color:var(--el-color-info-light-9);border-color:var(--el-color-info-light-8);cursor:not-allowed}.plus-check-card--disabled:after{border-right-color:var(--el-color-info-light-5);border-top-color:var(--el-color-info-light-5)}.plus-check-card .plus-check-card__avatar-wrapper{-webkit-padding-end:8px;padding-inline-end:8px}.plus-check-card .plus-check-card__right-content{overflow:hidden;width:100%}.plus-check-card .plus-check-card__title{-webkit-margin-after:4px;align-items:center;color:var(--el-text-color-primary);display:flex;justify-content:space-between;margin-block-end:4px;width:100%}.plus-check-card .plus-check-card__title-left{align-items:center;display:flex}.plus-check-card .plus-check-card__title-right{align-items:center;display:flex;vertical-align:middle}.plus-check-card .plus-check-card__description{color:var(--el-text-color-regular);width:100%;word-break:break-all}
4
+ .plus-date-picker{align-items:center;border:1px solid var(--el-border-color);border-radius:var(--el-border-radius-base);display:flex;flex-wrap:nowrap;max-width:100%;width:-moz-fit-content;width:fit-content}.plus-date-picker:hover{border-color:var(--el-border-color-hover)}.plus-date-picker.is-focus{border-color:var(--el-color-primary)}.plus-date-picker.is-disabled{background-color:var(--el-disabled-bg-color)}.plus-date-picker.is-disabled:hover{border-color:var(--el-border-color)}.plus-date-picker .plus-date-picker__middle{color:var(--el-text-color-placeholder)}.plus-date-picker .plus-date-picker__start{flex:1;font-size:14px}.plus-date-picker .plus-date-picker__start.is-disabled .el-input__wrapper{box-shadow:none}.plus-date-picker .plus-date-picker__start .el-input__wrapper{border:none;box-shadow:none}.plus-date-picker .el-input__wrapper{width:100%}.plus-date-picker .el-input__wrapper:hover{box-shadow:none}.plus-date-picker .el-input__wrapper.is-focus{box-shadow:none}.plus-date-picker .plus-date-picker__end{flex:1;font-size:14px}.plus-date-picker .plus-date-picker__end.is-disabled .el-input__wrapper{box-shadow:none}.plus-date-picker .plus-date-picker__end .el-input__wrapper{border:none;box-shadow:none}.el-form-item.is-error .plus-date-picker{border-color:var(--el-color-danger)}.el-form-item.is-error .plus-date-picker .el-input__wrapper{box-shadow:none}.el-form-item.is-error .plus-date-picker .el-input__wrapper.is-focus{box-shadow:none!important}.el-form-item.is-error .plus-date-picker .el-input__wrapper:hover{box-shadow:none}
10
5
 
11
- :root{--plus-header-height:60px;--plus-sidebar-collapse-height:60px;--plus-sidebar-width:200px;--plus-sidebar-min-width:64px}.plus-layout{height:100vh;overflow:hidden}.plus-layout.el-container{flex-direction:column}.plus-layout .plus-sidebar{height:calc(100vh - var(--plus-header-height));min-width:var(--plus-sidebar-min-width)}.plus-layout .plus-layout-main{flex:1;height:calc(100vh - var(--plus-header-height));width:calc(100% - var(--plus-sidebar-width))}.plus-layout.collapse .plus-layout-main{width:calc(100% - var(--plus-sidebar-min-width))}.plus-layout .plus-layout-content{padding:0}
6
+ .plus-breadcrumb{margin-bottom:8px}.plus-breadcrumb.no-data{margin-bottom:0}
12
7
  :root{--plus-header-height:60px;--plus-sidebar-collapse-height:60px;--plus-sidebar-width:200px;--plus-sidebar-min-width:64px}.plus-header{align-items:center;border-bottom:1px solid var(--el-border-color);display:flex;justify-content:space-around}.plus-header.is-fixed{left:0;position:fixed;top:0;width:100%}.plus-header .plus-header__left{align-items:center;display:flex}.plus-header .plus-header__left .plus-header__logo{height:28px}.plus-header .plus-header__left .plus-header__title{color:var(--el-text-color-regular);font-size:18px;font-weight:600;margin:0 0 0 12px;padding:0}.plus-header .plus-header__placeholder{flex:1 1 0%}.plus-header .plus-header__right{align-items:center;display:flex}.plus-header .plus-header__right .plus-header__dropdown-area{align-items:center;cursor:pointer;display:flex;-webkit-user-select:none;-moz-user-select:none;user-select:none}.plus-header .plus-header__right .plus-header__avatar{border-radius:50%;height:24px;margin-right:4px;width:24px}.plus-header-placeholder{height:var(--plus-header-height);width:100%}
13
- .plus-search .plus-form__row{row-gap:18px;width:100%}.plus-search.el-form--inline .el-form-item{margin-bottom:0;margin-right:0}.plus-search.el-form--label-top .plus-search__button__wrapper .el-form-item__label{opacity:0;visibility:hidden}.plus-search.el-form--label-top .plus-search__button__wrapper .el-form-item__content{justify-content:flex-end}.plus-search .plus-search__unfold{margin-left:12px}.plus-search .plus-search__button__wrapper{align-items:flex-start;display:flex;flex:auto;justify-content:flex-end;margin-bottom:0;max-width:100%}.plus-search .plus-search__button__wrapper.el-form-item{margin-right:10px}.plus-search .plus-search__button__wrapper .el-form-item__content{flex:none;flex-wrap:nowrap}
14
-
8
+ .plus-form.no-has-label+.el-form-item__label{padding:0;width:0}.plus-form .plus-form__footer{display:flex;justify-content:flex-end}.plus-form .plus-form__group__item{margin-bottom:20px}.plus-form .plus-form__group__item .plus-form__group__item__icon{align-items:center;display:flex}.plus-form .plus-form__group__item .plus-form__group__item__icon .el-icon{margin-right:5px}.plus-form .plus-form-item-extra{color:var(--el-text-color-placeholder);font-size:var(--el-font-size-base);margin-bottom:18px}
9
+ .plus-description .plus-description__name{word-wrap:break-word;max-width:200px}.plus-description .plus-description__label{min-width:80px}.plus-description .plus-description__label.is-required:before{color:var(--el-color-danger);content:"*";margin-right:4px}.plus-description.no-border .el-descriptions__body .el-descriptions__table.is-bordered .el-descriptions__cell{border:0}.plus-description.no-border .el-descriptions__body .el-descriptions__label.el-descriptions__cell.is-bordered-label{background-color:var(--el-fill-color-blank)}
15
10
  .plus-input-tag{align-items:center;background-color:var(--el-fill-color-blank);border:1px solid var(--el-border-color);border-radius:var(--el-border-radius-base);box-sizing:border-box;display:flex;flex-wrap:wrap;max-width:100%;padding:1px 2px;width:-moz-fit-content;width:fit-content}.plus-input-tag:hover{border-color:var(--el-border-color-hover)}.plus-input-tag.is-focus{border-color:var(--el-color-primary)}.plus-input-tag.is-disabled{background-color:var(--el-disabled-bg-color);cursor:not-allowed}.plus-input-tag.is-disabled:hover{border-color:var(--el-border-color)}.plus-input-tag.is-disabled .el-tag__close{cursor:not-allowed}.plus-input-tag.is-disabled .el-tag__close:hover{background-color:transparent;color:var(--el-tag-hover-color)}.plus-input-tag .plus-input-tag__tag{margin-bottom:1px;margin-right:4px;margin-top:1px}.plus-input-tag .plus-input-tag__input{box-sizing:border-box;flex:1;min-width:85px;padding:0}.plus-input-tag .plus-input-tag__input .el-input__wrapper{box-shadow:none;box-sizing:border-box;padding:0 4px}.plus-input-tag .plus-input-tag__input .el-input__inner{height:24px;line-height:24px}.plus-input-tag .el-input.is-disabled .el-input__wrapper{box-shadow:none}.el-form-item.is-error .plus-input-tag{border-color:var(--el-color-danger)}.el-form-item.is-error .plus-input-tag .el-input__wrapper{box-shadow:none}.el-form-item.is-error .plus-input-tag .el-input__wrapper.is-focus{box-shadow:none!important}.el-form-item.is-error .plus-input-tag .el-input__wrapper:hover{box-shadow:none}
11
+ .plus-drawer-form .el-drawer__header{border-bottom:1px solid var(--el-border-color);margin-bottom:0;padding-bottom:calc(var(--el-drawer-padding-primary)/2);padding-top:calc(var(--el-drawer-padding-primary)/2)}.plus-drawer-form .el-drawer__footer{border-top:1px solid var(--el-border-color);padding-bottom:calc(var(--el-drawer-padding-primary)/2)}
12
+ .plus-form-item{width:100%}.plus-form-item .plus-form-item__label{align-items:center;display:inline-flex}.plus-form-item .plus-form-item__label .plus-table-column__label__icon{margin-left:2px}.plus-form-item .plus-form-item-field,.plus-form-item .plus-form-item-field.el-date-editor{width:100%}
13
+ .plus-dialog .plus-dialog-footer{align-items:center;display:flex}
14
+
16
15
  :root{--plus-header-height:60px;--plus-sidebar-collapse-height:60px;--plus-sidebar-width:200px;--plus-sidebar-min-width:64px}.plus-sidebar{height:100%}.plus-sidebar.is-vertical{min-height:400px}.plus-sidebar.is-vertical:not(.el-menu--collapse){flex-shrink:0;width:var(--plus-sidebar-width)}.plus-sidebar.is-vertical.el-menu--collapse .el-menu-item{width:calc(var(--plus-sidebar-min-width) - 2px)}.plus-sidebar.is-vertical .el-scrollbar__wrap{overflow-x:hidden}.plus-sidebar.is-vertical.el-menu--collapse .plus-sidebar__item-title{display:inline-block;height:0;overflow:hidden;visibility:hidden;width:0}.plus-sidebar.is-vertical.el-menu--collapse .el-sub-menu__icon-arrow{display:none}.plus-sidebar.is-vertical .el-scrollbar{height:calc(100% - var(--plus-sidebar-collapse-height))}.plus-sidebar.is-vertical .plus-sidebar__collapse{align-items:flex-start;background-color:var(--el-menu-bg-color);bottom:0;box-sizing:border-box;height:var(--plus-sidebar-collapse-height);left:0;position:absolute;width:calc(var(--plus-sidebar-width) - 2px)}.plus-sidebar.is-vertical .plus-sidebar__collapse.is-collapse{width:calc(var(--plus-sidebar-min-width) - 2px)}.plus-sidebar.is-vertical .plus-sidebar__collapse.is-active{background-color:var(--el-menu-bg-color)}.plus-sidebar.is-vertical .plus-sidebar__collapse [class*=-icon]{cursor:pointer;font-size:20px;margin-top:10px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.plus-sidebar.is-horizontal,.plus-sidebar.is-horizontal .el-scrollbar,.plus-sidebar.is-horizontal .el-scrollbar__wrap{width:100%}.plus-sidebar.is-horizontal .el-scrollbar__view{display:flex;flex-wrap:nowrap;height:100%;width:100%}.plus-sidebar .plus-sidebar__item-title{-webkit-user-select:none;-moz-user-select:none;user-select:none}
17
- .plus-page .plus-page__table_wrapper{margin-top:20px}
18
16
 
19
17
  .plus-pagination{align-items:center;display:flex;justify-content:space-between;padding:16px 0}
20
- .plus-form-item{width:100%}.plus-form-item .plus-form-item__label{align-items:center;display:inline-flex}.plus-form-item .plus-form-item__label .plus-table-column__label__icon{margin-left:2px}.plus-form-item .plus-form-item-field,.plus-form-item .plus-form-item-field.el-date-editor{width:100%}
18
+ .plus-search .plus-form__row{row-gap:18px;width:100%}.plus-search.el-form--inline .el-form-item{margin-bottom:0;margin-right:0}.plus-search.el-form--label-top .plus-search__button__wrapper .el-form-item__label{opacity:0;visibility:hidden}.plus-search.el-form--label-top .plus-search__button__wrapper .el-form-item__content{justify-content:flex-end}.plus-search .plus-search__unfold{margin-left:12px}.plus-search .plus-search__button__wrapper{align-items:flex-start;display:flex;flex:auto;justify-content:flex-end;margin-bottom:0;max-width:100%}.plus-search .plus-search__button__wrapper.el-form-item{margin-right:10px}.plus-search .plus-search__button__wrapper .el-form-item__content{flex:none;flex-wrap:nowrap}
19
+ .plus-page .plus-page__table_wrapper{margin-top:20px}
20
+ :root{--plus-header-height:60px;--plus-sidebar-collapse-height:60px;--plus-sidebar-width:200px;--plus-sidebar-min-width:64px}.plus-layout{height:100vh;overflow:hidden}.plus-layout.el-container{flex-direction:column}.plus-layout .plus-sidebar{height:calc(100vh - var(--plus-header-height));min-width:var(--plus-sidebar-min-width)}.plus-layout .plus-layout-main{flex:1;height:calc(100vh - var(--plus-header-height));width:calc(100% - var(--plus-sidebar-width))}.plus-layout.collapse .plus-layout-main{width:calc(100% - var(--plus-sidebar-min-width))}.plus-layout .plus-layout-content{padding:0}
21
21
  .plus-table .plus-table-column .plus-table-column__header .plus-table-column__header__icon{margin-left:2px;margin-top:-2px;vertical-align:middle}.plus-table .plus-table-action-bar.is-center .cell{justify-content:center}.plus-table .plus-table-action-bar.is-right .cell{justify-content:flex-end}.plus-table .plus-table-action-bar.el-table-fixed-column--right{background-color:var(--el-bg-color)}.plus-table .plus-table-action-bar .cell{align-items:center;display:flex}.plus-table .plus-table-action-bar .plus-table-action-bar__dropdown__link{cursor:pointer;display:inline-flex;-webkit-user-select:none;-moz-user-select:none;user-select:none}.plus-table .plus-table-action-bar .plus-table-action-bar__more-text{margin-right:2px}.plus-table .plus-table-action-bar .plus-table-action-bar__column__link{margin-right:10px}.plus-table .plus-table-action-bar .plus-table-action-bar__dropdown{cursor:pointer;margin-left:12px;vertical-align:baseline}.plus-table .plus-table-action-bar .el-link+.el-link{margin-left:12px}.plus-table .plus-table-action-bar .el-icon{cursor:pointer}.plus-table .plus-table-action-bar .el-icon+.el-icon{margin-left:12px}.plus-table .plus-table-column-drag-sort .plus-table-column-drag-icon{box-sizing:border-box;cursor:move;font-size:18px;padding:4px}.plus-table .plus-table-column-index .plus-table-index-column{align-items:center;display:inline-flex;height:20px;justify-content:center;white-space:nowrap;width:20px;word-break:keep-all}.plus-table .plus-table-column-index .cell .plus-table-column-index__content{align-items:center;display:flex;justify-content:center;overflow:hidden}.plus-table .plus-table-title-bar{align-items:center;display:flex;justify-content:space-between;margin-bottom:10px}.plus-table .plus-table-title-bar__toolbar{align-items:center;display:flex}.plus-table .el-popper{max-width:200px}.plus-table-title-bar__toolbar__density{align-items:center;display:flex;flex-direction:column}.plus-table-title-bar__toolbar__density .el-button{margin-top:10px;width:80px}.plus-table-title-bar__toolbar__density .el-button+.el-button{margin-left:0}.plus-table-title-bar__toolbar__icon{color:var(--el-text-color-regular);cursor:pointer;margin-left:10px;vertical-align:middle}.plus-table-title-bar__toolbar__checkbox__item{margin-left:6px}.plus-table-checkbox-item{align-items:center;display:flex;margin-left:20px}.plus-table-checkbox-handle{cursor:move;font-size:18px}.plus-table-ghost-class{background-color:#fff;border:1px dashed var(--el-color-primary);padding:0 5px}.plus-table-column__edit{cursor:pointer}.plus-table-checkbox-checkAll{display:flex;justify-content:space-between}
22
22
  .plus-steps-form .el-steps{margin-bottom:20px}.plus-steps-form-vertical{display:flex}.plus-steps-form-vertical .el-steps--vertical{margin-right:20px}.plus-steps-form-vertical .plus-form{flex:1}
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! @wlydfe/pro-ui v0.2.23 */
1
+ /*! @wlydfe/pro-ui v0.2.24 */
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue'), require('element-plus')) :
4
4
  typeof define === 'function' && define.amd ? define(['exports', 'vue', 'element-plus'], factory) :
@@ -11636,7 +11636,8 @@
11636
11636
  indexContentStyle: { type: [Object, Function], default: () => ({}) },
11637
11637
  editable: { type: [Boolean, String], default: false },
11638
11638
  adaptive: { type: [Boolean, Object], default: false },
11639
- filterTableHeaderOverflowLabelLength: {}
11639
+ filterTableHeaderOverflowLabelLength: {},
11640
+ filterTableLocalKey: {}
11640
11641
  },
11641
11642
  emits: ["paginationChange", "clickAction", "clickActionConfirmCancel", "dragSortEnd", "formChange", "refresh", "edited", "cell-click", "cell-dblclick", "filterTableHeader", "radioChange"],
11642
11643
  setup(__props, { expose: __expose, emit: __emit }) {
@@ -11671,7 +11672,7 @@
11671
11672
  vue.watch(
11672
11673
  () => props.columns,
11673
11674
  (val) => {
11674
- const filterOriginColumns = val.filter((item) => vue.unref(item.hideInTable) !== true);
11675
+ let filterOriginColumns = val.filter((item) => vue.unref(item.hideInTable) !== true);
11675
11676
  filterColumns.value = filterOriginColumns.map((item) => {
11676
11677
  var _a2;
11677
11678
  return {
@@ -11679,6 +11680,25 @@
11679
11680
  headerIsChecked: (_a2 = item.headerIsChecked) != null ? _a2 : true
11680
11681
  };
11681
11682
  });
11683
+ if (props.filterTableLocalKey) {
11684
+ const localColumns = localStorage.getItem(props.filterTableLocalKey);
11685
+ if (localColumns) {
11686
+ filterColumns.value = JSON.parse(localColumns);
11687
+ const columsMap = filterColumns.value.reduce((acc, item, order) => {
11688
+ acc[item.prop] = {
11689
+ visable: item.headerIsChecked,
11690
+ order
11691
+ };
11692
+ return acc;
11693
+ }, {});
11694
+ filterOriginColumns.forEach((item) => {
11695
+ if (columsMap[item.prop]) {
11696
+ item.headerIsChecked = columsMap[item.prop].visable;
11697
+ }
11698
+ });
11699
+ filterOriginColumns.sort((a, b) => columsMap[a.prop].order - columsMap[b.prop].order);
11700
+ }
11701
+ }
11682
11702
  subColumns.value = filterOriginColumns.filter((item) => vue.unref(item.headerIsChecked) !== false);
11683
11703
  columnsIsChange.value = !columnsIsChange.value;
11684
11704
  },
@@ -11706,6 +11726,9 @@
11706
11726
  };
11707
11727
  const handleFilterTableConfirm = (_columns, eventType) => {
11708
11728
  filterColumns.value = _columns;
11729
+ if (props.filterTableLocalKey) {
11730
+ localStorage.setItem(props.filterTableLocalKey, JSON.stringify(filterColumns.value));
11731
+ }
11709
11732
  emit("filterTableHeader", _columns, eventType);
11710
11733
  subColumns.value = _columns.filter(
11711
11734
  (item) => vue.unref(item.hideInTable) !== true && item.headerIsChecked !== false
@@ -13061,7 +13084,7 @@
13061
13084
  class: "plus-page__table_wrapper"
13062
13085
  }, {
13063
13086
  default: vue.withCtx(() => {
13064
- var _a2, _b;
13087
+ var _a2, _b, _c;
13065
13088
  return [
13066
13089
  vue.createVNode(vue.unref(PlusTable), vue.mergeProps({
13067
13090
  ref_key: "plusTableInstance",
@@ -13069,6 +13092,7 @@
13069
13092
  "title-bar": { refresh: true }
13070
13093
  }, _ctx.table, {
13071
13094
  adaptive: (_b = (_a2 = _ctx.table) == null ? void 0 : _a2.adaptive) != null ? _b : true,
13095
+ "filter-table-local-key": (_c = _ctx.table) == null ? void 0 : _c.filterTableLocalKey,
13072
13096
  "table-data": vue.unref(tableData),
13073
13097
  "loading-status": vue.unref(loadingStatus),
13074
13098
  columns: processedColumns.value,
@@ -13127,7 +13151,7 @@
13127
13151
  ])
13128
13152
  };
13129
13153
  })
13130
- ]), 1040, ["adaptive", "table-data", "loading-status", "columns", "pagination"])
13154
+ ]), 1040, ["adaptive", "filter-table-local-key", "table-data", "loading-status", "columns", "pagination"])
13131
13155
  ];
13132
13156
  }),
13133
13157
  _: 3