vxe-pc-ui 4.10.43 → 4.10.44
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/es/icon/style.css +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/tooltip/src/tooltip.js +96 -28
- package/es/tooltip/style.css +16 -6
- package/es/tooltip/style.min.css +1 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-tooltip/style.css +16 -6
- package/es/vxe-tooltip/style.min.css +1 -1
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1 -1
- package/lib/index.umd.js +92 -35
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/tooltip/src/tooltip.js +90 -33
- package/lib/tooltip/src/tooltip.min.js +1 -1
- package/lib/tooltip/style/style.css +16 -6
- package/lib/tooltip/style/style.min.css +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/lib/vxe-tooltip/style/style.css +16 -6
- package/lib/vxe-tooltip/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/tooltip/src/tooltip.ts +95 -28
- package/styles/components/tooltip.scss +21 -8
- package/types/components/gantt.d.ts +80 -2
- package/types/components/grid.d.ts +1 -0
- package/types/components/tooltip.d.ts +11 -3
- /package/es/icon/{iconfont.1764939138825.ttf → iconfont.1765012543889.ttf} +0 -0
- /package/es/icon/{iconfont.1764939138825.woff → iconfont.1765012543889.woff} +0 -0
- /package/es/icon/{iconfont.1764939138825.woff2 → iconfont.1765012543889.woff2} +0 -0
- /package/es/{iconfont.1764939138825.ttf → iconfont.1765012543889.ttf} +0 -0
- /package/es/{iconfont.1764939138825.woff → iconfont.1765012543889.woff} +0 -0
- /package/es/{iconfont.1764939138825.woff2 → iconfont.1765012543889.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1764939138825.ttf → iconfont.1765012543889.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1764939138825.woff → iconfont.1765012543889.woff} +0 -0
- /package/lib/icon/style/{iconfont.1764939138825.woff2 → iconfont.1765012543889.woff2} +0 -0
- /package/lib/{iconfont.1764939138825.ttf → iconfont.1765012543889.ttf} +0 -0
- /package/lib/{iconfont.1764939138825.woff → iconfont.1765012543889.woff} +0 -0
- /package/lib/{iconfont.1764939138825.woff2 → iconfont.1765012543889.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 {
|
|
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 {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
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
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
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
|
-
|
|
165
|
-
|
|
166
|
-
|
|
185
|
+
// 如果上面不够放,则向下(优先)
|
|
186
|
+
if (top < marginSize) {
|
|
187
|
+
panelPlacement = 'bottom'
|
|
188
|
+
top = targetRect.top + targetHeight
|
|
167
189
|
}
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
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
|
-
|
|
397
|
-
|
|
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
|
|
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
|
-
|
|
89
|
-
|
|
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
|
-
|
|
109
|
-
|
|
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
|
|
|
@@ -229,6 +230,10 @@ export namespace VxeGanttPropTypes {
|
|
|
229
230
|
* 是否在任务条显示内容
|
|
230
231
|
*/
|
|
231
232
|
showContent?: boolean
|
|
233
|
+
/**
|
|
234
|
+
* 是否在任务条显示提示信息
|
|
235
|
+
*/
|
|
236
|
+
showTooltip?: boolean
|
|
232
237
|
/**
|
|
233
238
|
* 自定义任务条内容方法
|
|
234
239
|
*/
|
|
@@ -253,6 +258,28 @@ export namespace VxeGanttPropTypes {
|
|
|
253
258
|
*/
|
|
254
259
|
resize?: boolean
|
|
255
260
|
}
|
|
261
|
+
|
|
262
|
+
export interface TaskBarTooltipConfig<D = any> {
|
|
263
|
+
theme?: VxeTooltipPropTypes.Theme
|
|
264
|
+
enterable?: VxeTooltipPropTypes.Enterable
|
|
265
|
+
enterDelay?: VxeTooltipPropTypes.EnterDelay
|
|
266
|
+
leaveDelay?: VxeTooltipPropTypes.LeaveDelay
|
|
267
|
+
width?: VxeTooltipPropTypes.Width
|
|
268
|
+
height?: VxeTooltipPropTypes.Height
|
|
269
|
+
minWidth?: VxeTooltipPropTypes.MinWidth
|
|
270
|
+
minHeight?: VxeTooltipPropTypes.MinHeight
|
|
271
|
+
maxWidth?: VxeTooltipPropTypes.MaxWidth
|
|
272
|
+
maxHeight?: VxeTooltipPropTypes.MaxHeight
|
|
273
|
+
useHTML?: VxeTooltipPropTypes.UseHTML
|
|
274
|
+
contentMethod?(params: {
|
|
275
|
+
$gantt: VxeGanttConstructor<D>
|
|
276
|
+
row: D
|
|
277
|
+
rowIndex: number
|
|
278
|
+
$rowIndex: number
|
|
279
|
+
_rowIndex: number
|
|
280
|
+
}): string | null | void
|
|
281
|
+
}
|
|
282
|
+
|
|
256
283
|
export interface TaskBarResizeConfig<D = any> {
|
|
257
284
|
/**
|
|
258
285
|
* 是否允许拖拽调整任务条起始日期
|
|
@@ -277,6 +304,7 @@ export namespace VxeGanttPropTypes {
|
|
|
277
304
|
row: D
|
|
278
305
|
}): Promise<boolean> | boolean
|
|
279
306
|
}
|
|
307
|
+
|
|
280
308
|
export interface TaskBarDragConfig<D = any> {
|
|
281
309
|
/**
|
|
282
310
|
* 拖拽开始时是否允许行拖拽移动任务条日期的方法,该方法的返回值用来决定是否允许被拖拽
|
|
@@ -302,6 +330,7 @@ export interface VxeGanttProps<D = any> extends Omit<VxeGridProps<D>, 'layouts'>
|
|
|
302
330
|
taskViewConfig?: VxeGanttPropTypes.TaskViewConfig<D>
|
|
303
331
|
taskSplitConfig?: VxeGanttPropTypes.TaskSplitConfig
|
|
304
332
|
taskBarConfig?: VxeGanttPropTypes.TaskBarConfig<D>
|
|
333
|
+
taskBarTooltipConfig?: VxeGanttPropTypes.TaskBarTooltipConfig<D>
|
|
305
334
|
taskBarResizeConfig?: VxeGanttPropTypes.TaskBarResizeConfig<D>
|
|
306
335
|
taskBarDragConfig?: VxeGanttPropTypes.TaskBarDragConfig<D>
|
|
307
336
|
}
|
|
@@ -314,7 +343,8 @@ export interface GanttPrivateComputed<D = any> extends GridPrivateComputed<D> {
|
|
|
314
343
|
computeTaskBarDragOpts: ComputedRef<VxeGanttPropTypes.TaskBarDragConfig<D>>
|
|
315
344
|
computeTaskBarResizeOpts: ComputedRef<VxeGanttPropTypes.TaskBarResizeConfig<D>>
|
|
316
345
|
computeTaskSplitOpts: ComputedRef<VxeGanttPropTypes.TaskSplitConfig>
|
|
317
|
-
|
|
346
|
+
computeTaskBarTooltipOpts: ComputedRef<VxeGanttPropTypes.TaskBarTooltipConfig>
|
|
347
|
+
computeTaskViewScales: ComputedRef<VxeGanttDefines.ColumnScaleType[] | VxeGanttDefines.ColumnScaleConfig[] | undefined>
|
|
318
348
|
computeScaleUnit: ComputedRef<VxeGanttDefines.ColumnScaleType>
|
|
319
349
|
computeMinScale: ComputedRef<VxeGanttDefines.ColumnScaleObj>
|
|
320
350
|
computeWeekScale: ComputedRef<VxeGanttDefines.ColumnScaleObj | null | undefined>
|
|
@@ -332,10 +362,24 @@ export interface GanttReactData<D = any> extends GridReactData<D> {
|
|
|
332
362
|
showLeftView: boolean
|
|
333
363
|
showRightView: boolean
|
|
334
364
|
taskScaleList: VxeGanttDefines.ColumnScaleObj[]
|
|
365
|
+
|
|
366
|
+
// 存放 bar tooltip 相关信息
|
|
367
|
+
barTipStore: {
|
|
368
|
+
row: D | null
|
|
369
|
+
content: string
|
|
370
|
+
visible: boolean
|
|
371
|
+
params?: null | {
|
|
372
|
+
row: D | null
|
|
373
|
+
rowIndex: number
|
|
374
|
+
$rowIndex: number
|
|
375
|
+
_rowIndex: number
|
|
376
|
+
}
|
|
377
|
+
}
|
|
335
378
|
}
|
|
336
379
|
|
|
337
380
|
export interface GanttInternalData extends GridInternalData {
|
|
338
381
|
resizeTableWidth: number
|
|
382
|
+
barTipTimeout?: any
|
|
339
383
|
}
|
|
340
384
|
|
|
341
385
|
export interface GanttMethods<D = any> extends Omit<GridMethods<D>, 'dispatchEvent'> {
|
|
@@ -369,6 +413,10 @@ export interface GanttMethods<D = any> extends Omit<GridMethods<D>, 'dispatchEve
|
|
|
369
413
|
* 隐藏任务视图
|
|
370
414
|
*/
|
|
371
415
|
hideTaskView(): Promise<void>
|
|
416
|
+
/**
|
|
417
|
+
* 手动关闭任务条提示
|
|
418
|
+
*/
|
|
419
|
+
closeTaskBarTooltip(): Promise<void>
|
|
372
420
|
}
|
|
373
421
|
export interface VxeGanttMethods<D = any> extends GanttMethods<D>, Omit<VxeGridMethods<D>, 'dispatchEvent'> { }
|
|
374
422
|
|
|
@@ -407,6 +455,14 @@ export interface GanttPrivateMethods extends GridPrivateMethods {
|
|
|
407
455
|
* @private
|
|
408
456
|
*/
|
|
409
457
|
handleTaskBarDblclickEvent(evnt: MouseEvent, params: VxeGanttDefines.TaskBarClickParams): void
|
|
458
|
+
/**
|
|
459
|
+
* @private
|
|
460
|
+
*/
|
|
461
|
+
triggerTaskBarTooltipEvent(evnt: MouseEvent, params: VxeGanttDefines.TaskBarMouseoverParams): void
|
|
462
|
+
/**
|
|
463
|
+
* @private
|
|
464
|
+
*/
|
|
465
|
+
handleTaskBarTooltipLeaveEvent(evnt: MouseEvent, params: VxeGanttDefines.TaskBarMouseoverParams): void
|
|
410
466
|
}
|
|
411
467
|
export interface VxeGanttPrivateMethods extends GanttPrivateMethods {}
|
|
412
468
|
|
|
@@ -415,10 +471,12 @@ export type VxeGanttEmits = [
|
|
|
415
471
|
|
|
416
472
|
'task-cell-click',
|
|
417
473
|
'task-cell-dblclick',
|
|
474
|
+
'task-bar-mouseenter',
|
|
475
|
+
'task-bar-mouseleave',
|
|
418
476
|
'task-bar-click',
|
|
419
477
|
'task-bar-dblclick',
|
|
420
478
|
'task-view-cell-click',
|
|
421
|
-
'task-view-cell-dblclick'
|
|
479
|
+
'task-view-cell-dblclick',
|
|
422
480
|
]
|
|
423
481
|
|
|
424
482
|
export namespace VxeGanttDefines {
|
|
@@ -521,6 +579,13 @@ export namespace VxeGanttDefines {
|
|
|
521
579
|
export interface TaskBarClickEventParams<D = any> extends TaskBarClickParams<D>, GanttEventParams {}
|
|
522
580
|
export interface TaskBarDblClickEventParams<D = any> extends TaskBarClickEventParams<D> {}
|
|
523
581
|
|
|
582
|
+
export interface TaskBarMouseoverParams<D = any> extends GanttEventParams {
|
|
583
|
+
row: D
|
|
584
|
+
rowIndex: number
|
|
585
|
+
$rowIndex: number
|
|
586
|
+
_rowIndex: number
|
|
587
|
+
}
|
|
588
|
+
|
|
524
589
|
export interface TaskHeaderContextmenuParams<D = any> {
|
|
525
590
|
source: string
|
|
526
591
|
type: string
|
|
@@ -601,6 +666,14 @@ export namespace VxeGanttSlotTypes {
|
|
|
601
666
|
$rowIndex: number
|
|
602
667
|
}
|
|
603
668
|
export interface TaskViewHeaderCellStyleSlotParams extends TaskViewCellTitleSlotParams {}
|
|
669
|
+
|
|
670
|
+
export interface TaskBarTooltipSlotParams<D = any> {
|
|
671
|
+
row: D
|
|
672
|
+
rowIndex: number
|
|
673
|
+
$rowIndex: number
|
|
674
|
+
_rowIndex: number
|
|
675
|
+
tooltipContent: string
|
|
676
|
+
}
|
|
604
677
|
}
|
|
605
678
|
|
|
606
679
|
export interface VxeGanttSlots<D = any> extends VxeGridSlots<D> {
|
|
@@ -609,6 +682,11 @@ export interface VxeGanttSlots<D = any> extends VxeGridSlots<D> {
|
|
|
609
682
|
*/
|
|
610
683
|
taskBar?(params: VxeGanttSlotTypes.TaskBarSlotParams<D>): any
|
|
611
684
|
'task-bar'?(params: VxeGanttSlotTypes.TaskBarSlotParams<D>): any
|
|
685
|
+
/**
|
|
686
|
+
* 自定义任务条提示模板
|
|
687
|
+
*/
|
|
688
|
+
taskBarTooltip?(params: VxeGanttSlotTypes.TaskBarTooltipSlotParams<D>): any
|
|
689
|
+
'task-bar-tooltip'?(params: VxeGanttSlotTypes.TaskBarTooltipSlotParams<D>): any
|
|
612
690
|
}
|
|
613
691
|
|
|
614
692
|
export * from './gantt-module'
|
|
@@ -77,7 +77,13 @@ export interface TooltipReactData {
|
|
|
77
77
|
target: HTMLElement | null
|
|
78
78
|
isUpdate: boolean
|
|
79
79
|
visible: boolean
|
|
80
|
-
|
|
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
|
-
|
|
100
|
-
|
|
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
|
/**
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|