@lx-frontend/wrap-element-ui 1.0.1 → 1.0.2-beta.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lx-frontend/wrap-element-ui",
3
- "version": "1.0.1",
3
+ "version": "1.0.2-beta.2",
4
4
  "description": "wrap-element-ui",
5
5
  "author": "",
6
6
  "main": "src/components/index.ts",
@@ -75,16 +75,15 @@ export function useColumnHeaderOperation({ props, tableDomRef, sortFilterPopover
75
75
 
76
76
  const isColumnHeadActive = (column: IColumnConfig) => {
77
77
  return (
78
- column.filters && (Array.isArray(column.filters)
79
- ? (filteredValue.value[column.prop] as any[]).length
78
+ !!(column.filters && (Array.isArray(column.filters)
79
+ ? ((filteredValue.value[column.prop] as any[]).length)
80
80
  : column.filters.type === 'radio'
81
81
  ? filteredValue.value[column.prop]
82
- : (filteredValue.value[column.prop] as any[]).length)
83
- ) ||
84
- (
85
- column.search
86
- ? Array.isArray(column.search) && column.search?.some(v => searchValue.value[v.prop])
87
- : searchValue.value[column.prop]
82
+ : (filteredValue.value[column.prop] as any[]).length))
83
+ ) || (
84
+ !!(column.search
85
+ ? Array.isArray(column.search) && column.search?.some(v => searchValue.value[v.prop])
86
+ : searchValue.value[column.prop])
88
87
  ) ||
89
88
  sortingColumn.value?.prop === column.prop ||
90
89
  summaryList.value.includes(column.prop);
@@ -387,9 +387,9 @@
387
387
  }
388
388
 
389
389
  .color-popover {
390
- min-width: 102px;
391
- width: 102px;
392
- padding: 0;
390
+ min-width: 102px !important;
391
+ width: 102px !important;
392
+ padding: 0 !important;
393
393
 
394
394
  & .popper__arrow::after {
395
395
  left: 0 !important;
@@ -0,0 +1,60 @@
1
+ type BaseOption = {
2
+ label: string
3
+ prop: string
4
+ clearable?: boolean
5
+ placeholder?: string
6
+ key?: string
7
+ changeCb?: (value: any) => any
8
+ }
9
+
10
+ type SlotOption = BaseOption & {
11
+ type: 'slot'
12
+ slotName: string
13
+ }
14
+
15
+ type InputOption = BaseOption & {
16
+ type: 'input'
17
+ inputLimitCallback?: (value: string) => boolean
18
+ }
19
+
20
+ type SelectOption = BaseOption & {
21
+ type: 'select'
22
+ multiple?: boolean
23
+ filterable?: boolean
24
+ multipleLimit?: number
25
+ collapseTags?: boolean
26
+ withoutAll?: boolean
27
+ candidate: {
28
+ name: string
29
+ value?: string | number
30
+ id?: string | number
31
+ code?: string | number
32
+ }[]
33
+ }
34
+
35
+ type DatePickerOption = BaseOption & {
36
+ type: 'datePicker'
37
+ dateType?: string
38
+ }
39
+
40
+ type BaseDoubleOption = Omit<BaseOption, 'prop'> & {
41
+ doubleIsInline?: boolean
42
+ prop: [string, string]
43
+ }
44
+
45
+ type DoubleInputOption = BaseDoubleOption & {
46
+ type: 'doubleInput'
47
+ inputLimitCallback?: (value: string) => boolean
48
+ }
49
+
50
+ type DoubleDatePickerOption = BaseDoubleOption & {
51
+ type: 'doubleDatePicker'
52
+ }
53
+
54
+ export type SearchFormConfigOption =
55
+ | InputOption
56
+ | SelectOption
57
+ | DatePickerOption
58
+ | DoubleInputOption
59
+ | DoubleDatePickerOption
60
+ | SlotOption