diff --git a/package.json b/package.json index 82ab363fa..af493c29b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@antv/component", - "version": "1.0.0-beta.2", + "version": "1.0.0", "description": "Visualization components for AntV, based on G.", "license": "MIT", "main": "lib/index.js", diff --git a/src/core/types.ts b/src/core/types.ts index a36d3b6e6..41bf63e70 100644 --- a/src/core/types.ts +++ b/src/core/types.ts @@ -19,8 +19,8 @@ export type PrefixStyleProps, P extends string> = [K in keyof T as K extends `show${infer S}` ? `show${Capitalize

}${S}` : K extends string - ? `${P}${Capitalize}` - : never]: T[K]; + ? `${P}${Capitalize}` + : never]: T[K]; }; export type CallableStyleProps, P extends any[]> = { diff --git a/src/ui/legend/continuous.ts b/src/ui/legend/continuous.ts index 1a02416b4..d391cf31d 100644 --- a/src/ui/legend/continuous.ts +++ b/src/ui/legend/continuous.ts @@ -2,7 +2,7 @@ import { CustomEvent } from '@antv/g'; import { Linear } from '@antv/scale'; import { clamp, isUndefined } from '@antv/util'; import { Component } from '../../core'; -import type { DisplayObject, TextStyleProps } from '../../shapes'; +import type { BaseStyleProps, DisplayObject, TextStyleProps } from '../../shapes'; import { Group } from '../../shapes'; import { Point } from '../../types'; import { @@ -569,6 +569,7 @@ export class Continuous extends Component { private prevValue!: number; public bindEvents() { + this.style.cursor = 'pointer'; // 绑定 drag 开始事件 this.ribbon.on('pointerdown', this.onDragStart('ribbon')); this.ribbon.on('pointermove', this.onHovering); @@ -649,7 +650,7 @@ export class Continuous extends Component { }; private onDragEnd = () => { - this.style.cursor = 'default'; + this.style.cursor = 'pointer'; document.removeEventListener('mousemove', this.onDragging); document.removeEventListener('touchmove', this.onDragging); document.removeEventListener('mouseup', this.onDragEnd); diff --git a/src/ui/slider/index.ts b/src/ui/slider/index.ts index 8ba7b72a4..8607a2a78 100644 --- a/src/ui/slider/index.ts +++ b/src/ui/slider/index.ts @@ -288,7 +288,10 @@ export class Slider extends Component { this.attr('cursor', 'grabbing'); }); this.addEventListener('pointerup', () => { - this.attr('cursor', 'grab'); + this.attr('cursor', 'pointer'); + }); + this.addEventListener('pointerover', () => { + this.attr('cursor', 'pointer'); }); } else { this.on('pointerdown', that.onDragStart('track'));