W3Cschool
恭喜您成為首批注冊用戶
獲得88經(jīng)驗(yàn)值獎勵
提示框組件相關(guān)的行為,必須引入提示框組件后才能使用。
顯示提示框。
有下面兩種使用方式。
1 指定在相對容器的位置處顯示提示框,如果指定的位置無法顯示則無效。
dispatchAction({
type: 'showTip',
// 屏幕上的 x 坐標(biāo)
x: number,
// 屏幕上的 y 坐標(biāo)
y: number,
// 本次顯示 tooltip 的位置。只在本次 action 中生效。
// 缺省則使用 option 中定義的 tooltip 位置。
position: Array.<number>|string|Function
})
2 指定數(shù)據(jù)圖形,根據(jù) tooltip 的配置項(xiàng)顯示提示框。
dispatchAction({
type: 'showTip',
// 系列的 index,在 tooltip 的 trigger 為 axis 的時候可選。
seriesIndex?: number,
// 數(shù)據(jù)的 index,如果不指定也可以通過 name 屬性根據(jù)名稱指定數(shù)據(jù)
dataIndex?: number,
// 可選,數(shù)據(jù)名稱,在有 dataIndex 的時候忽略
name?: string,
// 本次顯示 tooltip 的位置。只在本次 action 中生效。
// 缺省則使用 option 中定義的 tooltip 位置。
position: Array.<number>|string|Function,
})
參數(shù)position同tooltip.position相同。
隱藏提示框。
dispatchAction({
type: 'hideTip'
})
Copyright©2021 w3cschool編程獅|閩ICP備15016281號-3|閩公網(wǎng)安備35020302033924號
違法和不良信息舉報(bào)電話:173-0602-2364|舉報(bào)郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號
聯(lián)系方式:
更多建議: