vxe-pc-ui 4.10.43 → 4.10.45

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 (45) hide show
  1. package/es/icon/style.css +1 -1
  2. package/es/style.css +1 -1
  3. package/es/style.min.css +1 -1
  4. package/es/tooltip/src/tooltip.js +96 -28
  5. package/es/tooltip/style.css +16 -6
  6. package/es/tooltip/style.min.css +1 -1
  7. package/es/ui/index.js +1 -1
  8. package/es/ui/src/log.js +1 -1
  9. package/es/vxe-tooltip/style.css +16 -6
  10. package/es/vxe-tooltip/style.min.css +1 -1
  11. package/lib/icon/style/style.css +1 -1
  12. package/lib/icon/style/style.min.css +1 -1
  13. package/lib/index.umd.js +92 -35
  14. package/lib/index.umd.min.js +1 -1
  15. package/lib/style.css +1 -1
  16. package/lib/style.min.css +1 -1
  17. package/lib/tooltip/src/tooltip.js +90 -33
  18. package/lib/tooltip/src/tooltip.min.js +1 -1
  19. package/lib/tooltip/style/style.css +16 -6
  20. package/lib/tooltip/style/style.min.css +1 -1
  21. package/lib/ui/index.js +1 -1
  22. package/lib/ui/index.min.js +1 -1
  23. package/lib/ui/src/log.js +1 -1
  24. package/lib/ui/src/log.min.js +1 -1
  25. package/lib/vxe-tooltip/style/style.css +16 -6
  26. package/lib/vxe-tooltip/style/style.min.css +1 -1
  27. package/package.json +1 -1
  28. package/packages/tooltip/src/tooltip.ts +95 -28
  29. package/styles/components/tooltip.scss +21 -8
  30. package/types/components/gantt.d.ts +88 -2
  31. package/types/components/grid.d.ts +1 -0
  32. package/types/components/table.d.ts +11 -11
  33. package/types/components/tooltip.d.ts +11 -3
  34. /package/es/icon/{iconfont.1764939138825.ttf → iconfont.1765029985390.ttf} +0 -0
  35. /package/es/icon/{iconfont.1764939138825.woff → iconfont.1765029985390.woff} +0 -0
  36. /package/es/icon/{iconfont.1764939138825.woff2 → iconfont.1765029985390.woff2} +0 -0
  37. /package/es/{iconfont.1764939138825.ttf → iconfont.1765029985390.ttf} +0 -0
  38. /package/es/{iconfont.1764939138825.woff → iconfont.1765029985390.woff} +0 -0
  39. /package/es/{iconfont.1764939138825.woff2 → iconfont.1765029985390.woff2} +0 -0
  40. /package/lib/icon/style/{iconfont.1764939138825.ttf → iconfont.1765029985390.ttf} +0 -0
  41. /package/lib/icon/style/{iconfont.1764939138825.woff → iconfont.1765029985390.woff} +0 -0
  42. /package/lib/icon/style/{iconfont.1764939138825.woff2 → iconfont.1765029985390.woff2} +0 -0
  43. /package/lib/{iconfont.1764939138825.ttf → iconfont.1765029985390.ttf} +0 -0
  44. /package/lib/{iconfont.1764939138825.woff → iconfont.1765029985390.woff} +0 -0
  45. /package/lib/{iconfont.1764939138825.woff2 → iconfont.1765029985390.woff2} +0 -0
@@ -3,7 +3,7 @@ import { defineVxeComponent } from '../../ui/src/comp'
3
3
  import XEUtils from 'xe-utils'
4
4
  import { getConfig, createEvent, useSize } from '../../ui'
5
5
  import { getLastZIndex, nextZIndex } from '../../ui/src/utils'
6
- import { getAbsolutePos, getDomNode, toCssUnit } from '../../ui/src/dom'
6
+ import { toCssUnit } from '../../ui/src/dom'
7
7
  import { getSlotVNs } from '../../ui/src/vn'
8
8
 
9
9
  import type { VxeTooltipPropTypes, VxeTooltipConstructor, VxeTooltipEmits, TooltipInternalData, TooltipReactData, TooltipMethods, TooltipPrivateRef, VxeComponentStyleType } from '../../../types'
@@ -87,6 +87,7 @@ export default defineVxeComponent({
87
87
  target: null,
88
88
  isUpdate: false,
89
89
  visible: false,
90
+ tipPos: null,
90
91
  tipContent: '',
91
92
  tipActive: false,
92
93
  tipTarget: null,
@@ -144,30 +145,74 @@ export default defineVxeComponent({
144
145
  let tooltipMethods = {} as TooltipMethods
145
146
 
146
147
  const updateTipStyle = () => {
147
- const { tipTarget, tipStore } = reactData
148
- if (tipTarget) {
149
- const { scrollTop, scrollLeft, visibleWidth } = getDomNode()
150
- const { top, left } = getAbsolutePos(tipTarget)
151
- const el = refElem.value
152
- if (!el) {
153
- return
154
- }
148
+ const { isArrow } = props
149
+ const { tipTarget: targetElem, tipStore, tipPos } = reactData
150
+ let top: number | '' = ''
151
+ let left: number | '' = ''
152
+ let panelPlacement: 'top' | 'bottom' = 'bottom'
153
+ let arrowLeft: number | '' = ''
154
+ const panelElem = refElem.value
155
+ if (panelElem && targetElem) {
156
+ const documentElement = document.documentElement
157
+ const bodyElem = document.body
158
+ const targetWidth = targetElem.offsetWidth
159
+ const targetHeight = targetElem.offsetHeight
160
+ const panelHeight = panelElem.offsetHeight
161
+ const panelWidth = panelElem.offsetWidth
162
+
163
+ const targetRect = targetElem.getBoundingClientRect()
164
+ const visibleHeight = documentElement.clientHeight || bodyElem.clientHeight
165
+ const visibleWidth = documentElement.clientWidth || bodyElem.clientWidth
166
+
155
167
  const marginSize = 6
156
- const offsetHeight = el.offsetHeight
157
- const offsetWidth = el.offsetWidth
158
- let tipLeft = left
159
- let tipTop = top - offsetHeight - marginSize
160
- tipLeft = Math.max(marginSize, left + Math.floor((tipTarget.offsetWidth - offsetWidth) / 2))
161
- if (tipLeft + offsetWidth + marginSize > scrollLeft + visibleWidth) {
162
- tipLeft = scrollLeft + visibleWidth - offsetWidth - marginSize
168
+ top = targetRect.top + targetHeight
169
+ left = targetRect.left
170
+ if (tipPos && (tipPos.x && tipPos.y)) {
171
+ if (isArrow) {
172
+ left = left + Math.max(8, Math.min(targetWidth - 8, tipPos.oLeft)) - panelWidth / 2
173
+ } else {
174
+ left = tipPos.x + 1
175
+ top = tipPos.y + 1
176
+ }
177
+ } else {
178
+ left = targetRect.left + (targetWidth - panelWidth) / 2
179
+ }
180
+ // 如果下面不够放,则向上
181
+ if (top + panelHeight + marginSize > visibleHeight) {
182
+ panelPlacement = 'top'
183
+ top = targetRect.top - panelHeight
163
184
  }
164
- if (top - offsetHeight < scrollTop + marginSize) {
165
- tipStore.placement = 'bottom'
166
- tipTop = top + tipTarget.offsetHeight + marginSize
185
+ // 如果上面不够放,则向下(优先)
186
+ if (top < marginSize) {
187
+ panelPlacement = 'bottom'
188
+ top = targetRect.top + targetHeight
167
189
  }
168
- tipStore.style.top = `${tipTop}px`
169
- tipStore.style.left = `${tipLeft}px`
170
- tipStore.arrowStyle.left = `${left - tipLeft + tipTarget.offsetWidth / 2}px`
190
+ // 如果溢出右边
191
+ if (left + panelWidth + marginSize > visibleWidth) {
192
+ left -= left + panelWidth + marginSize - visibleWidth
193
+ }
194
+ // 如果溢出左边
195
+ if (left < marginSize) {
196
+ left = marginSize
197
+ }
198
+
199
+ // 箭头
200
+ if (left === targetRect.left) {
201
+ if (targetWidth <= panelWidth) {
202
+ arrowLeft = targetWidth / 2
203
+ }
204
+ } else if (left < targetRect.left) {
205
+ if (left + panelWidth > targetRect.left + targetWidth) {
206
+ arrowLeft = (targetRect.left - left) + targetWidth / 2
207
+ } else {
208
+ arrowLeft = (targetRect.left - left) + (panelWidth - (targetRect.left - left)) / 2
209
+ }
210
+ }
211
+
212
+ tipStore.placement = panelPlacement
213
+ tipStore.style.top = `${top}px`
214
+ tipStore.style.left = `${left}px`
215
+ tipStore.arrowStyle.left = `${arrowLeft}px`
171
216
  }
172
217
  }
173
218
 
@@ -252,7 +297,7 @@ export default defineVxeComponent({
252
297
  }, props.enterDelay, { leading: false, trailing: true })
253
298
  }
254
299
 
255
- const handleVisible = (target: HTMLElement | null, content?: VxeTooltipPropTypes.Content) => {
300
+ const handleVisible = (target: HTMLElement | null, content?: VxeTooltipPropTypes.Content, evnt?: MouseEvent) => {
256
301
  const contentSlot = slots.content
257
302
  if (!contentSlot && (content === '' || XEUtils.eqNull(content))) {
258
303
  return nextTick()
@@ -260,9 +305,22 @@ export default defineVxeComponent({
260
305
  if (target) {
261
306
  const { showDelayTip } = internalData
262
307
  const { trigger, enterDelay } = props
308
+ if (evnt) {
309
+ reactData.tipPos = {
310
+ x: evnt.clientX,
311
+ y: evnt.clientY,
312
+ oLeft: evnt.offsetX,
313
+ oTop: evnt.offsetY
314
+ }
315
+ } else {
316
+ reactData.tipPos = null
317
+ }
263
318
  reactData.tipActive = true
264
319
  reactData.tipTarget = target
265
320
  reactData.tipContent = content
321
+ if (reactData.visible) {
322
+ return $xeTooltip.updatePlacement()
323
+ }
266
324
  if (enterDelay && trigger === 'hover') {
267
325
  if (showDelayTip) {
268
326
  showDelayTip()
@@ -291,10 +349,14 @@ export default defineVxeComponent({
291
349
  dispatchEvent (type, params, evnt) {
292
350
  emit(type, createEvent(evnt, { $tooltip: $xeTooltip }, params))
293
351
  },
352
+ openByEvent (evnt: Event, target?: HTMLElement | null, content?: VxeTooltipPropTypes.Content) {
353
+ return handleVisible(target || reactData.target as HTMLElement || getSelectorEl(), content, evnt as MouseEvent)
354
+ },
294
355
  open (target?: HTMLElement | null, content?: VxeTooltipPropTypes.Content) {
295
356
  return handleVisible(target || reactData.target as HTMLElement || getSelectorEl(), content)
296
357
  },
297
358
  close () {
359
+ reactData.tipPos = null
298
360
  reactData.tipTarget = null
299
361
  reactData.tipActive = false
300
362
  Object.assign(reactData.tipStore, {
@@ -391,11 +453,16 @@ export default defineVxeComponent({
391
453
  style: tipStore.style,
392
454
  ...ons
393
455
  }, [
394
- renderContent(),
395
456
  h('div', {
396
- class: 'vxe-tooltip--arrow',
397
- style: tipStore.arrowStyle
398
- }),
457
+ key: 'tby',
458
+ class: 'vxe-tooltip--body'
459
+ }, [
460
+ renderContent(),
461
+ h('div', {
462
+ class: 'vxe-tooltip--arrow',
463
+ style: tipStore.arrowStyle
464
+ })
465
+ ]),
399
466
  ...(defaultSlot ? getSlotVNs(defaultSlot({})) : [])
400
467
  ])
401
468
  }
@@ -433,7 +500,7 @@ export default defineVxeComponent({
433
500
  reactData.tipContent = content
434
501
  reactData.tipZindex = nextZIndex()
435
502
  XEUtils.arrayEach(wrapperElem.children, (elem, index) => {
436
- if (index > 1) {
503
+ if (index) {
437
504
  parentNode.insertBefore(elem, wrapperElem)
438
505
  if (!reactData.target) {
439
506
  reactData.target = elem as HTMLElement
@@ -4,10 +4,6 @@
4
4
  top: -100%;
5
5
  left: -100%;
6
6
  font-size: 12px;
7
- border-radius: var(--vxe-ui-base-border-radius);
8
- white-space: normal;
9
- word-break: break-word;
10
- box-shadow: 2px 2px 4px -2px rgba(0,0,0,.2);
11
7
  color: var(--vxe-ui-font-color);
12
8
  font-family: var(--vxe-ui-font-family);
13
9
  &:not(.is--enterable) {
@@ -57,6 +53,9 @@
57
53
  }
58
54
  }
59
55
  &.placement--top {
56
+ &.is--arrow {
57
+ padding-bottom: 6px;
58
+ }
60
59
  &.is--enterable {
61
60
  &:after {
62
61
  bottom: -6px;
@@ -70,6 +69,9 @@
70
69
  }
71
70
  }
72
71
  &.placement--bottom {
72
+ &.is--arrow {
73
+ padding-top: 6px;
74
+ }
73
75
  &.is--enterable {
74
76
  &:after {
75
77
  top: -6px;
@@ -83,10 +85,19 @@
83
85
  }
84
86
  }
85
87
  }
88
+ .vxe-tooltip--body {
89
+ position: relative;
90
+ border-radius: var(--vxe-ui-base-border-radius);
91
+ white-space: normal;
92
+ word-break: break-word;
93
+ box-shadow: 2px 2px 4px -2px rgba(0,0,0,.2);
94
+ }
86
95
  .vxe-tooltip--wrapper {
87
96
  &.theme--light {
88
- background-color: var(--vxe-ui-layout-background-color);
89
- border: 1px solid var(--vxe-ui-input-border-color);
97
+ .vxe-tooltip--body {
98
+ background-color: var(--vxe-ui-layout-background-color);
99
+ border: 1px solid var(--vxe-ui-input-border-color);
100
+ }
90
101
  &.placement--top {
91
102
  .vxe-tooltip--arrow {
92
103
  border-top-color: var(--vxe-ui-input-border-color);
@@ -105,8 +116,10 @@
105
116
  }
106
117
  }
107
118
  &.theme--dark {
108
- background: var(--vxe-ui-tooltip-dark-background-color);
109
- color: var(--vxe-ui-tooltip-dark-color);
119
+ .vxe-tooltip--body {
120
+ background: var(--vxe-ui-tooltip-dark-background-color);
121
+ color: var(--vxe-ui-tooltip-dark-color);
122
+ }
110
123
  &.placement--top {
111
124
  .vxe-tooltip--arrow {
112
125
  border-top-color: var(--vxe-ui-tooltip-dark-background-color);
@@ -2,6 +2,7 @@ import { RenderFunction, SetupContext, ComputedRef, Ref } from 'vue'
2
2
  import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentBaseOptions, VxeComponentEventParams, ValueOf, VxeComponentSlotType, VxeComponentAlignType } from '@vxe-ui/core'
3
3
  import { GridPrivateRef, VxeGridProps, VxeGridPropTypes, GridPrivateComputed, GridReactData, GridInternalData, GridMethods, GridPrivateMethods, VxeGridEmits, VxeGridSlots, VxeGridListeners, VxeGridEventProps, VxeGridMethods } from './grid'
4
4
  import { VxeTablePropTypes } from './table'
5
+ import { VxeTooltipPropTypes } from './tooltip'
5
6
 
6
7
  /* eslint-disable no-use-before-define,@typescript-eslint/ban-types */
7
8
 
@@ -137,6 +138,7 @@ export namespace VxeGanttPropTypes {
137
138
  rowClassName?: string | ((params: {
138
139
  source: string
139
140
  type: string
141
+ scaleType: VxeGanttDefines.ColumnScaleType
140
142
  row: D
141
143
  rowIndex: number
142
144
  $rowIndex: number
@@ -148,6 +150,7 @@ export namespace VxeGanttPropTypes {
148
150
  rowStyle?: ((params: {
149
151
  source: string
150
152
  type: string
153
+ scaleType: VxeGanttDefines.ColumnScaleType
151
154
  row: D
152
155
  rowIndex: number
153
156
  $rowIndex: number
@@ -159,6 +162,7 @@ export namespace VxeGanttPropTypes {
159
162
  cellClassName?: string | ((params: {
160
163
  source: string
161
164
  type: string
165
+ scaleType: VxeGanttDefines.ColumnScaleType
162
166
  dateObj: VxeGanttDefines.ScaleDateObj
163
167
  column?: VxeGanttDefines.ViewColumn<D>
164
168
  row: D
@@ -172,6 +176,7 @@ export namespace VxeGanttPropTypes {
172
176
  cellStyle?: ((params: {
173
177
  source: string
174
178
  type: string
179
+ scaleType: VxeGanttDefines.ColumnScaleType
175
180
  dateObj: VxeGanttDefines.ScaleDateObj
176
181
  column?: VxeGanttDefines.ViewColumn<D>
177
182
  row: D
@@ -229,10 +234,15 @@ export namespace VxeGanttPropTypes {
229
234
  * 是否在任务条显示内容
230
235
  */
231
236
  showContent?: boolean
237
+ /**
238
+ * 是否在任务条显示提示信息
239
+ */
240
+ showTooltip?: boolean
232
241
  /**
233
242
  * 自定义任务条内容方法
234
243
  */
235
244
  contentMethod?(params: {
245
+ scaleType: VxeGanttDefines.ColumnScaleType
236
246
  title: string
237
247
  progress?: string | number
238
248
  row: D
@@ -241,6 +251,7 @@ export namespace VxeGanttPropTypes {
241
251
  * 任务条样式
242
252
  */
243
253
  barStyle?: BarStyleConfig | ((params: {
254
+ scaleType: VxeGanttDefines.ColumnScaleType
244
255
  $gantt: VxeGanttConstructor<D>
245
256
  row: D
246
257
  }) => BarStyleConfig)
@@ -253,6 +264,29 @@ export namespace VxeGanttPropTypes {
253
264
  */
254
265
  resize?: boolean
255
266
  }
267
+
268
+ export interface TaskBarTooltipConfig<D = any> {
269
+ theme?: VxeTooltipPropTypes.Theme
270
+ enterable?: VxeTooltipPropTypes.Enterable
271
+ enterDelay?: VxeTooltipPropTypes.EnterDelay
272
+ leaveDelay?: VxeTooltipPropTypes.LeaveDelay
273
+ width?: VxeTooltipPropTypes.Width
274
+ height?: VxeTooltipPropTypes.Height
275
+ minWidth?: VxeTooltipPropTypes.MinWidth
276
+ minHeight?: VxeTooltipPropTypes.MinHeight
277
+ maxWidth?: VxeTooltipPropTypes.MaxWidth
278
+ maxHeight?: VxeTooltipPropTypes.MaxHeight
279
+ useHTML?: VxeTooltipPropTypes.UseHTML
280
+ contentMethod?(params: {
281
+ $gantt: VxeGanttConstructor<D>
282
+ scaleType: VxeGanttDefines.ColumnScaleType
283
+ row: D
284
+ rowIndex: number
285
+ $rowIndex: number
286
+ _rowIndex: number
287
+ }): string | null | void
288
+ }
289
+
256
290
  export interface TaskBarResizeConfig<D = any> {
257
291
  /**
258
292
  * 是否允许拖拽调整任务条起始日期
@@ -277,6 +311,7 @@ export namespace VxeGanttPropTypes {
277
311
  row: D
278
312
  }): Promise<boolean> | boolean
279
313
  }
314
+
280
315
  export interface TaskBarDragConfig<D = any> {
281
316
  /**
282
317
  * 拖拽开始时是否允许行拖拽移动任务条日期的方法,该方法的返回值用来决定是否允许被拖拽
@@ -302,6 +337,7 @@ export interface VxeGanttProps<D = any> extends Omit<VxeGridProps<D>, 'layouts'>
302
337
  taskViewConfig?: VxeGanttPropTypes.TaskViewConfig<D>
303
338
  taskSplitConfig?: VxeGanttPropTypes.TaskSplitConfig
304
339
  taskBarConfig?: VxeGanttPropTypes.TaskBarConfig<D>
340
+ taskBarTooltipConfig?: VxeGanttPropTypes.TaskBarTooltipConfig<D>
305
341
  taskBarResizeConfig?: VxeGanttPropTypes.TaskBarResizeConfig<D>
306
342
  taskBarDragConfig?: VxeGanttPropTypes.TaskBarDragConfig<D>
307
343
  }
@@ -314,7 +350,8 @@ export interface GanttPrivateComputed<D = any> extends GridPrivateComputed<D> {
314
350
  computeTaskBarDragOpts: ComputedRef<VxeGanttPropTypes.TaskBarDragConfig<D>>
315
351
  computeTaskBarResizeOpts: ComputedRef<VxeGanttPropTypes.TaskBarResizeConfig<D>>
316
352
  computeTaskSplitOpts: ComputedRef<VxeGanttPropTypes.TaskSplitConfig>
317
- computeTaskScaleConfs: ComputedRef<VxeGanttDefines.ColumnScaleType[] | VxeGanttDefines.ColumnScaleConfig[] | undefined>
353
+ computeTaskBarTooltipOpts: ComputedRef<VxeGanttPropTypes.TaskBarTooltipConfig>
354
+ computeTaskViewScales: ComputedRef<VxeGanttDefines.ColumnScaleType[] | VxeGanttDefines.ColumnScaleConfig[] | undefined>
318
355
  computeScaleUnit: ComputedRef<VxeGanttDefines.ColumnScaleType>
319
356
  computeMinScale: ComputedRef<VxeGanttDefines.ColumnScaleObj>
320
357
  computeWeekScale: ComputedRef<VxeGanttDefines.ColumnScaleObj | null | undefined>
@@ -332,10 +369,24 @@ export interface GanttReactData<D = any> extends GridReactData<D> {
332
369
  showLeftView: boolean
333
370
  showRightView: boolean
334
371
  taskScaleList: VxeGanttDefines.ColumnScaleObj[]
372
+
373
+ // 存放 bar tooltip 相关信息
374
+ barTipStore: {
375
+ row: D | null
376
+ content: string
377
+ visible: boolean
378
+ params?: null | {
379
+ row: D | null
380
+ rowIndex: number
381
+ $rowIndex: number
382
+ _rowIndex: number
383
+ }
384
+ }
335
385
  }
336
386
 
337
387
  export interface GanttInternalData extends GridInternalData {
338
388
  resizeTableWidth: number
389
+ barTipTimeout?: any
339
390
  }
340
391
 
341
392
  export interface GanttMethods<D = any> extends Omit<GridMethods<D>, 'dispatchEvent'> {
@@ -369,6 +420,10 @@ export interface GanttMethods<D = any> extends Omit<GridMethods<D>, 'dispatchEve
369
420
  * 隐藏任务视图
370
421
  */
371
422
  hideTaskView(): Promise<void>
423
+ /**
424
+ * 手动关闭任务条提示
425
+ */
426
+ closeTaskBarTooltip(): Promise<void>
372
427
  }
373
428
  export interface VxeGanttMethods<D = any> extends GanttMethods<D>, Omit<VxeGridMethods<D>, 'dispatchEvent'> { }
374
429
 
@@ -407,6 +462,14 @@ export interface GanttPrivateMethods extends GridPrivateMethods {
407
462
  * @private
408
463
  */
409
464
  handleTaskBarDblclickEvent(evnt: MouseEvent, params: VxeGanttDefines.TaskBarClickParams): void
465
+ /**
466
+ * @private
467
+ */
468
+ triggerTaskBarTooltipEvent(evnt: MouseEvent, params: VxeGanttDefines.TaskBarMouseoverParams): void
469
+ /**
470
+ * @private
471
+ */
472
+ handleTaskBarTooltipLeaveEvent(evnt: MouseEvent, params: VxeGanttDefines.TaskBarMouseoverParams): void
410
473
  }
411
474
  export interface VxeGanttPrivateMethods extends GanttPrivateMethods {}
412
475
 
@@ -415,10 +478,12 @@ export type VxeGanttEmits = [
415
478
 
416
479
  'task-cell-click',
417
480
  'task-cell-dblclick',
481
+ 'task-bar-mouseenter',
482
+ 'task-bar-mouseleave',
418
483
  'task-bar-click',
419
484
  'task-bar-dblclick',
420
485
  'task-view-cell-click',
421
- 'task-view-cell-dblclick'
486
+ 'task-view-cell-dblclick',
422
487
  ]
423
488
 
424
489
  export namespace VxeGanttDefines {
@@ -521,6 +586,14 @@ export namespace VxeGanttDefines {
521
586
  export interface TaskBarClickEventParams<D = any> extends TaskBarClickParams<D>, GanttEventParams {}
522
587
  export interface TaskBarDblClickEventParams<D = any> extends TaskBarClickEventParams<D> {}
523
588
 
589
+ export interface TaskBarMouseoverParams<D = any> extends GanttEventParams {
590
+ scaleType: VxeGanttDefines.ColumnScaleType
591
+ row: D
592
+ rowIndex: number
593
+ $rowIndex: number
594
+ _rowIndex: number
595
+ }
596
+
524
597
  export interface TaskHeaderContextmenuParams<D = any> {
525
598
  source: string
526
599
  type: string
@@ -601,6 +674,14 @@ export namespace VxeGanttSlotTypes {
601
674
  $rowIndex: number
602
675
  }
603
676
  export interface TaskViewHeaderCellStyleSlotParams extends TaskViewCellTitleSlotParams {}
677
+
678
+ export interface TaskBarTooltipSlotParams<D = any> {
679
+ row: D
680
+ rowIndex: number
681
+ $rowIndex: number
682
+ _rowIndex: number
683
+ tooltipContent: string
684
+ }
604
685
  }
605
686
 
606
687
  export interface VxeGanttSlots<D = any> extends VxeGridSlots<D> {
@@ -609,6 +690,11 @@ export interface VxeGanttSlots<D = any> extends VxeGridSlots<D> {
609
690
  */
610
691
  taskBar?(params: VxeGanttSlotTypes.TaskBarSlotParams<D>): any
611
692
  'task-bar'?(params: VxeGanttSlotTypes.TaskBarSlotParams<D>): any
693
+ /**
694
+ * 自定义任务条提示模板
695
+ */
696
+ taskBarTooltip?(params: VxeGanttSlotTypes.TaskBarTooltipSlotParams<D>): any
697
+ 'task-bar-tooltip'?(params: VxeGanttSlotTypes.TaskBarTooltipSlotParams<D>): any
612
698
  }
613
699
 
614
700
  export * from './gantt-module'
@@ -904,6 +904,7 @@ export namespace VxeGridSlotTypes {
904
904
  field: string
905
905
  item: any
906
906
  data: any
907
+ tooltipContent: string
907
908
 
908
909
  /**
909
910
  * @deprecated
@@ -172,7 +172,7 @@ export namespace VxeTablePropTypes {
172
172
  _columnIndex: number
173
173
  }) => void | null | string | { [key: string]: boolean | null | undefined })
174
174
 
175
- export type CellStyle<D = VxeTablePropTypes.Row> = VxeComponentStyleType | ((params: {
175
+ export type CellStyle<D = VxeTablePropTypes.Row> = Partial<CSSStyleDeclaration> | ((params: {
176
176
  row: D
177
177
  rowIndex: number
178
178
  $rowIndex: number
@@ -181,15 +181,15 @@ export namespace VxeTablePropTypes {
181
181
  columnIndex: number
182
182
  $columnIndex: number
183
183
  _columnIndex: number
184
- }) => void | null | VxeComponentStyleType)
184
+ }) => void | null | Partial<CSSStyleDeclaration> |VxeComponentStyleType)
185
185
 
186
- export type HeaderCellStyle<D = VxeTablePropTypes.Row> = VxeComponentStyleType | ((params: {
186
+ export type HeaderCellStyle<D = VxeTablePropTypes.Row> = Partial<CSSStyleDeclaration> | ((params: {
187
187
  $table: VxeTableConstructor<D>
188
188
  $rowIndex: number
189
189
  column: VxeTableDefines.ColumnInfo<D>
190
190
  columnIndex: number
191
191
  _columnIndex: number
192
- }) => void | null | VxeComponentStyleType)
192
+ }) => void | null | Partial<CSSStyleDeclaration> |VxeComponentStyleType)
193
193
 
194
194
  export type FooterCellStyle<D = any> = VxeComponentStyleType | ((params: {
195
195
  $table: VxeTableConstructor<D>
@@ -199,31 +199,31 @@ export namespace VxeTablePropTypes {
199
199
  columnIndex: number
200
200
  $columnIndex: number
201
201
  _columnIndex: number
202
- }) => void | null | VxeComponentStyleType)
202
+ }) => void | null | Partial<CSSStyleDeclaration> |VxeComponentStyleType)
203
203
 
204
- export type RowStyle<D = VxeTablePropTypes.Row> = VxeComponentStyleType | ((params: {
204
+ export type RowStyle<D = VxeTablePropTypes.Row> = Partial<CSSStyleDeclaration> | ((params: {
205
205
  $table: VxeTableConstructor<D>
206
206
  row: D
207
207
  rowIndex: number
208
208
  $rowIndex: number
209
209
  _rowIndex: number
210
- }) => void | null | VxeComponentStyleType)
210
+ }) => void | null | Partial<CSSStyleDeclaration> |VxeComponentStyleType)
211
211
 
212
- export type HeaderRowStyle<D = VxeTablePropTypes.Row> = VxeComponentStyleType | ((params: {
212
+ export type HeaderRowStyle<D = VxeTablePropTypes.Row> = Partial<CSSStyleDeclaration> | ((params: {
213
213
  $table: VxeTableConstructor<D>
214
214
  $rowIndex: number
215
215
  fixed: VxeColumnPropTypes.Fixed
216
216
  type: string
217
- }) => void | null | VxeComponentStyleType)
217
+ }) => void | null | Partial<CSSStyleDeclaration> |VxeComponentStyleType)
218
218
 
219
- export type FooterRowStyle<D = any> = VxeComponentStyleType | ((params: {
219
+ export type FooterRowStyle<D = any> = Partial<CSSStyleDeclaration> | ((params: {
220
220
  $table: VxeTableConstructor<D>
221
221
  row: D
222
222
  $rowIndex: number
223
223
  _rowIndex: number
224
224
  fixed: VxeColumnPropTypes.Fixed
225
225
  type: string
226
- }) => void | null | VxeComponentStyleType)
226
+ }) => void | null | Partial<CSSStyleDeclaration> | VxeComponentStyleType)
227
227
 
228
228
  export type ShowCustomHeader = boolean
229
229
 
@@ -77,7 +77,13 @@ export interface TooltipReactData {
77
77
  target: HTMLElement | null
78
78
  isUpdate: boolean
79
79
  visible: boolean
80
- tipContent: string | number | undefined,
80
+ tipPos: null | {
81
+ x: number
82
+ y: number
83
+ oLeft: number
84
+ oTop: number
85
+ }
86
+ tipContent: string | number | undefined
81
87
  tipActive: boolean
82
88
  tipTarget: HTMLElement | null
83
89
  tipZindex: number
@@ -96,8 +102,10 @@ export interface TooltipMethods {
96
102
  dispatchEvent(type: ValueOf<VxeTooltipEmits>, params: Record<string, any>, evnt: Event | null): void
97
103
  /**
98
104
  * 显示
99
- * @param target 自定义目标元素
100
- * @param content 自定义内容
105
+ */
106
+ openByEvent(evnt: Event, target?: any, content?: VxeTooltipPropTypes.Content): Promise<void>
107
+ /**
108
+ * 显示
101
109
  */
102
110
  open(target?: any, content?: VxeTooltipPropTypes.Content): Promise<void>
103
111
  /**