resolver-egretimp-plus 0.1.113 → 0.1.115

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.
Files changed (219) hide show
  1. package/dist/h5/index.js +1 -1
  2. package/dist/theme/element/index.css +1 -1
  3. package/dist/theme/element/src/components/common.scss +4 -0
  4. package/dist/theme/element/src/components/text.scss +17 -0
  5. package/dist/web/index.js +2 -2
  6. package/package.json +1 -1
  7. package/src/analysisComponent.jsx +2 -1
  8. package/src/components/helper/table.jsx +26 -23
  9. package/src/components/packages-H5/CustomComponentCollapseH5.vue +6 -2
  10. package/src/components/packages-web/ElText.jsx +0 -1
  11. package/src/theme/element/components/common.scss +4 -0
  12. package/src/theme/element/components/text.scss +17 -0
  13. package/src-bak/analysisComponent.jsx +343 -0
  14. package/src-bak/api/builtIn.js +10 -0
  15. package/src-bak/bpm/bpmInstance.js +388 -0
  16. package/src-bak/bpm/udc-sdk-esm/cjs/impl/application.js +8 -0
  17. package/src-bak/bpm/udc-sdk-esm/cjs/impl/component.js +97 -0
  18. package/src-bak/bpm/udc-sdk-esm/cjs/impl/datasource.js +88 -0
  19. package/src-bak/bpm/udc-sdk-esm/cjs/impl/iframe/index.js +3 -0
  20. package/src-bak/bpm/udc-sdk-esm/cjs/impl/iframe/udcSdkForIframe/UdcComponent.js +76 -0
  21. package/src-bak/bpm/udc-sdk-esm/cjs/impl/iframe/udcSdkForIframe/index.js +201 -0
  22. package/src-bak/bpm/udc-sdk-esm/cjs/impl/index.js +69 -0
  23. package/src-bak/bpm/udc-sdk-esm/cjs/impl/page.js +56 -0
  24. package/src-bak/bpm/udc-sdk-esm/cjs/impl/utils.js +76 -0
  25. package/src-bak/bpm/udc-sdk-esm/cjs/index.js +46 -0
  26. package/src-bak/bpm/udc-sdk-esm/cjs/utils.js +21 -0
  27. package/src-bak/components/childDialog/index.js +39 -0
  28. package/src-bak/components/childDialog/src/index.vue +185 -0
  29. package/src-bak/components/cmiFormItem/index.js +1 -0
  30. package/src-bak/components/cmiFormItem/src/index.vue +112 -0
  31. package/src-bak/components/confirmInstance-H5/index.js +53 -0
  32. package/src-bak/components/confirmInstance-H5/src/index.vue +54 -0
  33. package/src-bak/components/helper/FormPolyfill.jsx +25 -0
  34. package/src-bak/components/helper/calcTooltip.jsx +134 -0
  35. package/src-bak/components/helper/dock.js +141 -0
  36. package/src-bak/components/helper/eventOrchestration.js +763 -0
  37. package/src-bak/components/helper/resolver.js +163 -0
  38. package/src-bak/components/helper/table.jsx +103 -0
  39. package/src-bak/components/icons/date.vue +33 -0
  40. package/src-bak/components/icons/info.vue +62 -0
  41. package/src-bak/components/icons/loading.vue +19 -0
  42. package/src-bak/components/icons/question-filled.vue +8 -0
  43. package/src-bak/components/loading/index.js +6 -0
  44. package/src-bak/components/loading/loading.js +98 -0
  45. package/src-bak/components/loading/loading.scss +74 -0
  46. package/src-bak/components/loading/loading.vue +89 -0
  47. package/src-bak/components/loadingComponent/LoadingComponent.vue +33 -0
  48. package/src-bak/components/modal/index.js +9 -0
  49. package/src-bak/components/modal/modal.scss +195 -0
  50. package/src-bak/components/modal/modal.vue +201 -0
  51. package/src-bak/components/options/OptionsDefault.vue +47 -0
  52. package/src-bak/components/packages-H5/CmiButton.vue +120 -0
  53. package/src-bak/components/packages-H5/CmiCalendar.vue +152 -0
  54. package/src-bak/components/packages-H5/CmiCell.vue +87 -0
  55. package/src-bak/components/packages-H5/CmiCheckbox.vue +82 -0
  56. package/src-bak/components/packages-H5/CmiDatetimePicker.vue +98 -0
  57. package/src-bak/components/packages-H5/CmiDivider.vue +30 -0
  58. package/src-bak/components/packages-H5/CmiDropdownMenu.vue +58 -0
  59. package/src-bak/components/packages-H5/CmiInput.vue +69 -0
  60. package/src-bak/components/packages-H5/CmiLink.vue +28 -0
  61. package/src-bak/components/packages-H5/CmiPicker.vue +229 -0
  62. package/src-bak/components/packages-H5/CmiRadio.vue +29 -0
  63. package/src-bak/components/packages-H5/CmiSearch.vue +39 -0
  64. package/src-bak/components/packages-H5/CmiSelect.vue +84 -0
  65. package/src-bak/components/packages-H5/CustomComponentCardH5.vue +129 -0
  66. package/src-bak/components/packages-H5/CustomComponentColH5.vue +8 -0
  67. package/src-bak/components/packages-H5/CustomComponentCollapseH5.vue +137 -0
  68. package/src-bak/components/packages-H5/CustomComponentFormLayoutH5.vue +54 -0
  69. package/src-bak/components/packages-H5/CustomComponentTabPaneH5.vue +38 -0
  70. package/src-bak/components/packages-H5/CustomComponentTableH5.vue +352 -0
  71. package/src-bak/components/packages-H5/CustomComponentTabsH5.vue +170 -0
  72. package/src-bak/components/packages-web/CustomComponentCard.vue +40 -0
  73. package/src-bak/components/packages-web/CustomComponentCol.vue +66 -0
  74. package/src-bak/components/packages-web/CustomComponentCollapse.vue +164 -0
  75. package/src-bak/components/packages-web/CustomComponentCycle.vue +95 -0
  76. package/src-bak/components/packages-web/CustomComponentCycleTabPane.vue +155 -0
  77. package/src-bak/components/packages-web/CustomComponentDialog.vue +192 -0
  78. package/src-bak/components/packages-web/CustomComponentEditor.vue +50 -0
  79. package/src-bak/components/packages-web/CustomComponentFileExport.vue +60 -0
  80. package/src-bak/components/packages-web/CustomComponentFileImport.vue +60 -0
  81. package/src-bak/components/packages-web/CustomComponentFormLayout.vue +65 -0
  82. package/src-bak/components/packages-web/CustomComponentGrid.vue +29 -0
  83. package/src-bak/components/packages-web/CustomComponentGridCol.vue +29 -0
  84. package/src-bak/components/packages-web/CustomComponentInputDialog.vue +144 -0
  85. package/src-bak/components/packages-web/CustomComponentNativeTabPane.vue +84 -0
  86. package/src-bak/components/packages-web/CustomComponentPlain.vue +243 -0
  87. package/src-bak/components/packages-web/CustomComponentRow.vue +83 -0
  88. package/src-bak/components/packages-web/CustomComponentSelectEmployees.vue +203 -0
  89. package/src-bak/components/packages-web/CustomComponentSendMail.vue +62 -0
  90. package/src-bak/components/packages-web/CustomComponentSteps.vue +41 -0
  91. package/src-bak/components/packages-web/CustomComponentTabPane.vue +20 -0
  92. package/src-bak/components/packages-web/CustomComponentTable.jsx +813 -0
  93. package/src-bak/components/packages-web/CustomComponentTabs.vue +126 -0
  94. package/src-bak/components/packages-web/CustomComponentTree.vue +28 -0
  95. package/src-bak/components/packages-web/ElButton.vue +146 -0
  96. package/src-bak/components/packages-web/ElCheckbox.vue +97 -0
  97. package/src-bak/components/packages-web/ElDatePicker.vue +93 -0
  98. package/src-bak/components/packages-web/ElInput copy.jsx +393 -0
  99. package/src-bak/components/packages-web/ElInput.jsx +312 -0
  100. package/src-bak/components/packages-web/ElInputNumber.vue +81 -0
  101. package/src-bak/components/packages-web/ElPagination.vue +61 -0
  102. package/src-bak/components/packages-web/ElRadio.vue +47 -0
  103. package/src-bak/components/packages-web/ElSelect.jsx +249 -0
  104. package/src-bak/components/packages-web/ElSelect_bak.vue +155 -0
  105. package/src-bak/components/packages-web/ElText.jsx +187 -0
  106. package/src-bak/components/packages-web/ElTextaa.vue +169 -0
  107. package/src-bak/components/packages-web/ElTimePicker.vue +39 -0
  108. package/src-bak/components/patchComponents-H5.js +46 -0
  109. package/src-bak/components/patchComponents-web.js +46 -0
  110. package/src-bak/components/simpleFormItemPc/index.js +1 -0
  111. package/src-bak/components/simpleFormItemPc/src/index.vue +94 -0
  112. package/src-bak/components/table/index.ts +29 -0
  113. package/src-bak/components/table/src/composables/use-scrollbar.ts +30 -0
  114. package/src-bak/components/table/src/config.ts +256 -0
  115. package/src-bak/components/table/src/filter-panel.vue +260 -0
  116. package/src-bak/components/table/src/h-helper.ts +34 -0
  117. package/src-bak/components/table/src/layout-observer.ts +78 -0
  118. package/src-bak/components/table/src/store/current.ts +85 -0
  119. package/src-bak/components/table/src/store/expand.ts +76 -0
  120. package/src-bak/components/table/src/store/helper.ts +74 -0
  121. package/src-bak/components/table/src/store/index.ts +246 -0
  122. package/src-bak/components/table/src/store/tree.ts +230 -0
  123. package/src-bak/components/table/src/store/watcher.ts +543 -0
  124. package/src-bak/components/table/src/table/defaults.ts +402 -0
  125. package/src-bak/components/table/src/table/key-render-helper.ts +27 -0
  126. package/src-bak/components/table/src/table/style-helper.ts +378 -0
  127. package/src-bak/components/table/src/table/utils-helper.ts +47 -0
  128. package/src-bak/components/table/src/table-body/defaults.ts +52 -0
  129. package/src-bak/components/table/src/table-body/events-helper.ts +203 -0
  130. package/src-bak/components/table/src/table-body/index.ts +119 -0
  131. package/src-bak/components/table/src/table-body/render-helper.ts +283 -0
  132. package/src-bak/components/table/src/table-body/styles-helper.ts +164 -0
  133. package/src-bak/components/table/src/table-column/defaults.ts +237 -0
  134. package/src-bak/components/table/src/table-column/index.ts +202 -0
  135. package/src-bak/components/table/src/table-column/render-helper.ts +214 -0
  136. package/src-bak/components/table/src/table-column/watcher-helper.ts +88 -0
  137. package/src-bak/components/table/src/table-footer/index.ts +128 -0
  138. package/src-bak/components/table/src/table-footer/mapState-helper.ts +33 -0
  139. package/src-bak/components/table/src/table-footer/style-helper.ts +51 -0
  140. package/src-bak/components/table/src/table-header/event-helper.ts +213 -0
  141. package/src-bak/components/table/src/table-header/index.ts +244 -0
  142. package/src-bak/components/table/src/table-header/style.helper.ts +119 -0
  143. package/src-bak/components/table/src/table-header/utils-helper.ts +94 -0
  144. package/src-bak/components/table/src/table-layout.ts +259 -0
  145. package/src-bak/components/table/src/table.vue +389 -0
  146. package/src-bak/components/table/src/tableColumn.ts +3 -0
  147. package/src-bak/components/table/src/tokens.ts +5 -0
  148. package/src-bak/components/table/src/util.ts +521 -0
  149. package/src-bak/components/table/style/css.ts +5 -0
  150. package/src-bak/components/table/style/index.ts +5 -0
  151. package/src-bak/components/tabs/index.js +8 -0
  152. package/src-bak/components/tabs/src/constants.js +23 -0
  153. package/src-bak/components/tabs/src/tab-bar.js +8 -0
  154. package/src-bak/components/tabs/src/tab-bar.vue +92 -0
  155. package/src-bak/components/tabs/src/tab-nav.jsx +424 -0
  156. package/src-bak/components/tabs/src/tab-pane.js +16 -0
  157. package/src-bak/components/tabs/src/tab-pane.vue +80 -0
  158. package/src-bak/components/tabs/src/tabs.jsx +223 -0
  159. package/src-bak/components/tabs/style/css.js +2 -0
  160. package/src-bak/components/tabs/style/index.js +2 -0
  161. package/src-bak/components/thirdPartyFrame/index.js +32 -0
  162. package/src-bak/components/thirdPartyFrame/src/ThirdPartyFrame.vue +125 -0
  163. package/src-bak/enums/index.js +16 -0
  164. package/src-bak/hooks/configLoad.js +45 -0
  165. package/src-bak/hooks/index.js +189 -0
  166. package/src-bak/hooks/mock.js +6960 -0
  167. package/src-bak/hooks/pageConfig.js +127 -0
  168. package/src-bak/index.jsx +440 -0
  169. package/src-bak/renderer.jsx +77 -0
  170. package/src-bak/resolver-H5.vue +88 -0
  171. package/src-bak/resolver-common.vue +129 -0
  172. package/src-bak/resolver-web.vue +91 -0
  173. package/src-bak/rules/eventsSupplement.js +573 -0
  174. package/src-bak/rules/parseCondition.js +378 -0
  175. package/src-bak/rules/ruleUtils.js +273 -0
  176. package/src-bak/rules/rulesDriver.js +118 -0
  177. package/src-bak/rulesImp/events.js +588 -0
  178. package/src-bak/rulesImp/index.js +33 -0
  179. package/src-bak/rulesImp/ruleInstance.js +231 -0
  180. package/src-bak/rulesImp/ruleUtils.js +124 -0
  181. package/src-bak/theme/element/components/button.scss +122 -0
  182. package/src-bak/theme/element/components/card.scss +8 -0
  183. package/src-bak/theme/element/components/checkbox.scss +19 -0
  184. package/src-bak/theme/element/components/collapse.scss +174 -0
  185. package/src-bak/theme/element/components/common.scss +30 -0
  186. package/src-bak/theme/element/components/cycle.scss +0 -0
  187. package/src-bak/theme/element/components/date.scss +13 -0
  188. package/src-bak/theme/element/components/dialog.scss +44 -0
  189. package/src-bak/theme/element/components/form.scss +104 -0
  190. package/src-bak/theme/element/components/index.scss +55 -0
  191. package/src-bak/theme/element/components/input.scss +36 -0
  192. package/src-bak/theme/element/components/message.scss +48 -0
  193. package/src-bak/theme/element/components/pagination.scss +47 -0
  194. package/src-bak/theme/element/components/popper.scss +3 -0
  195. package/src-bak/theme/element/components/radio.scss +40 -0
  196. package/src-bak/theme/element/components/scrollbar.scss +14 -0
  197. package/src-bak/theme/element/components/select.scss +82 -0
  198. package/src-bak/theme/element/components/steps.scss +6 -0
  199. package/{src/components/styles/CustomComponenTable.scss → src-bak/theme/element/components/table.scss} +90 -13
  200. package/src-bak/theme/element/components/tabs.scss +128 -0
  201. package/src-bak/theme/element/components/tag.scss +6 -0
  202. package/{src/components/styles → src-bak/theme/element/components}/text.scss +3 -3
  203. package/src-bak/theme/element/components/textarea.scss +3 -0
  204. package/src-bak/theme/element/components/tree.scss +0 -0
  205. package/src-bak/theme/element/index.scss +55 -0
  206. package/src-bak/utils/cipher.js +141 -0
  207. package/src-bak/utils/common.js +664 -0
  208. package/src-bak/utils/const.js +259 -0
  209. package/src-bak/utils/defaultVal.js +92 -0
  210. package/src-bak/utils/dom.js +36 -0
  211. package/src-bak/utils/format.js +19 -0
  212. package/src-bak/utils/index.js +4 -0
  213. package/src-bak/utils/is.js +74 -0
  214. package/src-bak/utils/loadModule.js +75 -0
  215. package/src-bak/utils/preserveFunc.js +33 -0
  216. package/src-bak/utils/render.jsx +1138 -0
  217. package/src-bak/utils/request.js +136 -0
  218. package/src-bak/utils/respone.js +70 -0
  219. package/src-bak/utils/valid.js +89 -0
@@ -0,0 +1,402 @@
1
+ // @ts-nocheck
2
+ import { useSizeProp } from 'element-plus/es/hooks/index.mjs'
3
+ import type {
4
+ CSSProperties,
5
+ ComponentInternalInstance,
6
+ PropType,
7
+ Ref,
8
+ VNode,
9
+ } from 'vue'
10
+ import type { ComponentSize } from 'element-plus/es/constants'
11
+ import type { Nullable } from 'element-plus/es/utils'
12
+ import type { Store } from '../store'
13
+ import type { TableColumnCtx } from '../table-column/defaults'
14
+ import type TableLayout from '../table-layout'
15
+ import type { TableOverflowTooltipOptions } from '../util'
16
+
17
+ export type DefaultRow = any
18
+
19
+ interface TableRefs {
20
+ tableWrapper: HTMLElement
21
+ headerWrapper: HTMLElement
22
+ footerWrapper: HTMLElement
23
+ fixedBodyWrapper: HTMLElement
24
+ rightFixedBodyWrapper: HTMLElement
25
+ bodyWrapper: HTMLElement
26
+ appendWrapper: HTMLElement
27
+ [key: string]: any
28
+ }
29
+
30
+ interface TableState {
31
+ isGroup: Ref<boolean>
32
+ resizeState: Ref<{
33
+ width: any
34
+ height: any
35
+ }>
36
+ doLayout: () => void
37
+ debouncedUpdateLayout: () => void
38
+ }
39
+
40
+ type HoverState<T> = Nullable<{
41
+ cell: HTMLElement
42
+ column: TableColumnCtx<T>
43
+ row: T
44
+ }>
45
+
46
+ type RIS<T> = { row: T; $index: number; store: Store<T>; expanded: boolean }
47
+
48
+ type RenderExpanded<T> = ({
49
+ row,
50
+ $index,
51
+ store,
52
+ expanded: boolean,
53
+ }: RIS<T>) => VNode
54
+
55
+ type SummaryMethod<T> = (data: {
56
+ columns: TableColumnCtx<T>[]
57
+ data: T[]
58
+ }) => (string | VNode)[]
59
+
60
+ interface Table<T> extends ComponentInternalInstance {
61
+ $ready: boolean
62
+ hoverState?: HoverState<T>
63
+ renderExpanded: RenderExpanded<T>
64
+ store: Store<T>
65
+ layout: TableLayout<T>
66
+ refs: TableRefs
67
+ tableId: string
68
+ state: TableState
69
+ }
70
+
71
+ type ColumnCls<T> = string | ((data: { row: T; rowIndex: number }) => string)
72
+ type ColumnStyle<T> =
73
+ | CSSProperties
74
+ | ((data: { row: T; rowIndex: number }) => CSSProperties)
75
+ type CellCls<T> =
76
+ | string
77
+ | ((data: {
78
+ row: T
79
+ rowIndex: number
80
+ column: TableColumnCtx<T>
81
+ columnIndex: number
82
+ }) => string)
83
+ type CellStyle<T> =
84
+ | CSSProperties
85
+ | ((data: {
86
+ row: T
87
+ rowIndex: number
88
+ column: TableColumnCtx<T>
89
+ columnIndex: number
90
+ }) => CSSProperties)
91
+ type Layout = 'fixed' | 'auto'
92
+ interface TableProps<T> {
93
+ data: T[]
94
+ size?: ComponentSize
95
+ width?: string | number
96
+ height?: string | number
97
+ maxHeight?: string | number
98
+ fit?: boolean
99
+ stripe?: boolean
100
+ border?: boolean
101
+ rowKey?: string | ((row: T) => string)
102
+ context?: Table<T>
103
+ showHeader?: boolean
104
+ showSummary?: boolean
105
+ sumText?: string
106
+ summaryMethod?: SummaryMethod<T>
107
+ rowClassName?: ColumnCls<T>
108
+ rowStyle?: ColumnStyle<T>
109
+ cellClassName?: CellCls<T>
110
+ cellStyle?: CellStyle<T>
111
+ headerRowClassName?: ColumnCls<T>
112
+ headerRowStyle?: ColumnStyle<T>
113
+ headerCellClassName?: CellCls<T>
114
+ headerCellStyle?: CellStyle<T>
115
+ highlightCurrentRow?: boolean
116
+ currentRowKey?: string | number
117
+ emptyText?: string
118
+ expandRowKeys?: any[]
119
+ defaultExpandAll?: boolean
120
+ defaultSort?: Sort
121
+ tooltipEffect?: string
122
+ tooltipOptions?: TableOverflowTooltipOptions
123
+ spanMethod?: (data: {
124
+ row: T
125
+ rowIndex: number
126
+ column: TableColumnCtx<T>
127
+ columnIndex: number
128
+ }) =>
129
+ | number[]
130
+ | {
131
+ rowspan: number
132
+ colspan: number
133
+ }
134
+ | undefined
135
+ selectOnIndeterminate?: boolean
136
+ indent?: number
137
+ treeProps?: {
138
+ hasChildren?: string
139
+ children?: string
140
+ }
141
+ lazy?: boolean
142
+ load?: (row: T, treeNode: TreeNode, resolve: (data: T[]) => void) => void
143
+ className?: string
144
+ style?: CSSProperties
145
+ tableLayout?: Layout
146
+ scrollbarAlwaysOn?: boolean
147
+ flexible?: boolean
148
+ showOverflowTooltip?: boolean | Function | TableOverflowTooltipOptions
149
+ }
150
+
151
+ interface Sort {
152
+ prop: string
153
+ order: 'ascending' | 'descending'
154
+ init?: any
155
+ silent?: any
156
+ }
157
+
158
+ interface Filter<T> {
159
+ column: TableColumnCtx<T>
160
+ values: string[]
161
+ silent: any
162
+ }
163
+
164
+ interface TreeNode {
165
+ expanded?: boolean
166
+ loading?: boolean
167
+ noLazyChildren?: boolean
168
+ indent?: number
169
+ level?: number
170
+ display?: boolean
171
+ }
172
+
173
+ interface RenderRowData<T> {
174
+ store: Store<T>
175
+ _self: Table<T>
176
+ column: TableColumnCtx<T>
177
+ row: T
178
+ $index: number
179
+ treeNode?: TreeNode
180
+ expanded: boolean
181
+ }
182
+
183
+ export default {
184
+ /**
185
+ * @description table data
186
+ */
187
+ data: {
188
+ type: Array as PropType<DefaultRow[]>,
189
+ default: () => [],
190
+ },
191
+ /**
192
+ * @description size of Table
193
+ */
194
+ size: useSizeProp,
195
+ width: [String, Number],
196
+ /**
197
+ * @description table's height. By default it has an `auto` height. If its value is a number, the height is measured in pixels; if its value is a string, the value will be assigned to element's style.height, the height is affected by external styles
198
+ */
199
+ height: [String, Number],
200
+ /**
201
+ * @description table's max-height. The legal value is a number or the height in px
202
+ */
203
+ maxHeight: [String, Number],
204
+ /**
205
+ * @description whether width of column automatically fits its container
206
+ */
207
+ fit: {
208
+ type: Boolean,
209
+ default: true,
210
+ },
211
+ /**
212
+ * @description whether Table is striped
213
+ */
214
+ stripe: Boolean,
215
+ /**
216
+ * @description whether Table has vertical border
217
+ */
218
+ border: Boolean,
219
+ /**
220
+ * @description key of row data, used for optimizing rendering. Required if `reserve-selection` is on or display tree data. When its type is String, multi-level access is supported, e.g. `user.info.id`, but `user.info[0].id` is not supported, in which case `Function` should be used
221
+ */
222
+ rowKey: [String, Function] as PropType<TableProps<DefaultRow>['rowKey']>,
223
+ /**
224
+ * @description whether Table header is visible
225
+ */
226
+ showHeader: {
227
+ type: Boolean,
228
+ default: true,
229
+ },
230
+ /**
231
+ * @description whether to display a summary row
232
+ */
233
+ showSummary: Boolean,
234
+ /**
235
+ * @description displayed text for the first column of summary row
236
+ */
237
+ sumText: String,
238
+ /**
239
+ * @description custom summary method
240
+ */
241
+ summaryMethod: Function as PropType<TableProps<DefaultRow>['summaryMethod']>,
242
+ /**
243
+ * @description function that returns custom class names for a row, or a string assigning class names for every row
244
+ */
245
+ rowClassName: [String, Function] as PropType<
246
+ TableProps<DefaultRow>['rowClassName']
247
+ >,
248
+ /**
249
+ * @description function that returns custom style for a row, or an object assigning custom style for every row
250
+ */
251
+ rowStyle: [Object, Function] as PropType<TableProps<DefaultRow>['rowStyle']>,
252
+ /**
253
+ * @description function that returns custom class names for a cell, or a string assigning class names for every cell
254
+ */
255
+ cellClassName: [String, Function] as PropType<
256
+ TableProps<DefaultRow>['cellClassName']
257
+ >,
258
+ /**
259
+ * @description function that returns custom style for a cell, or an object assigning custom style for every cell
260
+ */
261
+ cellStyle: [Object, Function] as PropType<
262
+ TableProps<DefaultRow>['cellStyle']
263
+ >,
264
+ /**
265
+ * @description function that returns custom class names for a row in table header, or a string assigning class names for every row in table header
266
+ */
267
+ headerRowClassName: [String, Function] as PropType<
268
+ TableProps<DefaultRow>['headerRowClassName']
269
+ >,
270
+ /**
271
+ * @description function that returns custom style for a row in table header, or an object assigning custom style for every row in table header
272
+ */
273
+ headerRowStyle: [Object, Function] as PropType<
274
+ TableProps<DefaultRow>['headerRowStyle']
275
+ >,
276
+ /**
277
+ * @description function that returns custom class names for a cell in table header, or a string assigning class names for every cell in table header
278
+ */
279
+ headerCellClassName: [String, Function] as PropType<
280
+ TableProps<DefaultRow>['headerCellClassName']
281
+ >,
282
+ /**
283
+ * @description function that returns custom style for a cell in table header, or an object assigning custom style for every cell in table header
284
+ */
285
+ headerCellStyle: [Object, Function] as PropType<
286
+ TableProps<DefaultRow>['headerCellStyle']
287
+ >,
288
+ /**
289
+ * @description whether current row is highlighted
290
+ */
291
+ highlightCurrentRow: Boolean,
292
+ /**
293
+ * @description key of current row, a set only prop
294
+ */
295
+ currentRowKey: [String, Number],
296
+ /**
297
+ * @description displayed text when data is empty. You can customize this area with `#empty`
298
+ */
299
+ emptyText: String,
300
+ /**
301
+ * @description set expanded rows by this prop, prop's value is the keys of expand rows, you should set row-key before using this prop
302
+ */
303
+ expandRowKeys: Array as PropType<TableProps<DefaultRow>['expandRowKeys']>,
304
+ /**
305
+ * @description whether expand all rows by default, works when the table has a column type="expand" or contains tree structure data
306
+ */
307
+ defaultExpandAll: Boolean,
308
+ /**
309
+ * @description set the default sort column and order. property `prop` is used to set default sort column, property `order` is used to set default sort order
310
+ */
311
+ defaultSort: Object as PropType<TableProps<DefaultRow>['defaultSort']>,
312
+ /**
313
+ * @description the `effect` of the overflow tooltip
314
+ */
315
+ tooltipEffect: String,
316
+ /**
317
+ * @description the options for the overflow tooltip, [see the following tooltip component](tooltip.html#attributes)
318
+ */
319
+ tooltipOptions: Object as PropType<TableProps<DefaultRow>['tooltipOptions']>,
320
+ /**
321
+ * @description method that returns rowspan and colspan
322
+ */
323
+ spanMethod: Function as PropType<TableProps<DefaultRow>['spanMethod']>,
324
+ /**
325
+ * @description controls the behavior of master checkbox in multi-select tables when only some rows are selected (but not all). If true, all rows will be selected, else deselected
326
+ */
327
+ selectOnIndeterminate: {
328
+ type: Boolean,
329
+ default: true,
330
+ },
331
+ /**
332
+ * @description horizontal indentation of tree data
333
+ */
334
+ indent: {
335
+ type: Number,
336
+ default: 16,
337
+ },
338
+ /**
339
+ * @description configuration for rendering nested data
340
+ */
341
+ treeProps: {
342
+ type: Object as PropType<TableProps<DefaultRow>['treeProps']>,
343
+ default: () => {
344
+ return {
345
+ hasChildren: 'hasChildren',
346
+ children: 'children',
347
+ }
348
+ },
349
+ },
350
+ /**
351
+ * @description whether to lazy loading data
352
+ */
353
+ lazy: Boolean,
354
+ /**
355
+ * @description method for loading child row data, only works when `lazy` is true
356
+ */
357
+ load: Function as PropType<TableProps<DefaultRow>['load']>,
358
+ style: {
359
+ type: Object as PropType<CSSProperties>,
360
+ default: () => ({}),
361
+ },
362
+ className: {
363
+ type: String,
364
+ default: '',
365
+ },
366
+ /**
367
+ * @description sets the algorithm used to lay out table cells, rows, and columns
368
+ */
369
+ tableLayout: {
370
+ type: String as PropType<Layout>,
371
+ default: 'fixed',
372
+ },
373
+ /**
374
+ * @description always show scrollbar
375
+ */
376
+ scrollbarAlwaysOn: Boolean,
377
+ /**
378
+ * @description ensure main axis minimum-size doesn't follow the content
379
+ */
380
+ flexible: Boolean,
381
+ /**
382
+ * @description whether to hide extra content and show them in a tooltip when hovering on the cell.It will affect all the table columns
383
+ */
384
+ showOverflowTooltip: [Boolean, Function, Object] as PropType<
385
+ TableProps<DefaultRow>['showOverflowTooltip']
386
+ >,
387
+ }
388
+ export type {
389
+ SummaryMethod,
390
+ Table,
391
+ TableProps,
392
+ TableRefs,
393
+ ColumnCls,
394
+ ColumnStyle,
395
+ CellCls,
396
+ CellStyle,
397
+ TreeNode,
398
+ RenderRowData,
399
+ Sort,
400
+ Filter,
401
+ TableColumnCtx,
402
+ }
@@ -0,0 +1,27 @@
1
+ import { onMounted, onUnmounted, ref } from 'vue'
2
+ import type { Table } from './defaults'
3
+
4
+ export default function useKeyRender(table: Table<[]>) {
5
+ const observer = ref<MutationObserver>()
6
+
7
+ const initWatchDom = () => {
8
+ const el = table.vnode.el
9
+ const columnsWrapper = (el as HTMLElement).querySelector('.hidden-columns')
10
+ const config = { childList: true, subtree: true }
11
+ const updateOrderFns = table.store.states.updateOrderFns
12
+ observer.value = new MutationObserver(() => {
13
+ updateOrderFns.forEach((fn: () => void) => fn())
14
+ })
15
+
16
+ observer.value.observe(columnsWrapper!, config)
17
+ }
18
+
19
+ onMounted(() => {
20
+ // fix https://github.com/element-plus/element-plus/issues/8528
21
+ initWatchDom()
22
+ })
23
+
24
+ onUnmounted(() => {
25
+ observer.value?.disconnect()
26
+ })
27
+ }