提交 eede51ab 编写于 作者: P pissang

fix(ts): fix type errors.

上级 569a4cff
......@@ -54,10 +54,10 @@ export interface TimelineControlStyle extends ItemStyleOption {
nextIcon?: string
// Can be a percent value relative to itemSize
playBtnSize: number | string
stopBtnSize: number | string
nextBtnSize: number | string
prevBtnSize: number | string
playBtnSize?: number | string
stopBtnSize?: number | string
nextBtnSize?: number | string
prevBtnSize?: number | string
}
export interface TimelineCheckpointStyle extends ItemStyleOption,
......
......@@ -63,6 +63,7 @@ function assembleFont(textStyleModel: Model<TooltipOption['textStyle']>): string
cssText.push('font:' + textStyleModel.getFont());
fontSize
// @ts-ignore, leave it to the tooltip refactor.
&& cssText.push('line-height:' + Math.round(fontSize * 3 / 2) + 'px');
each(['decoration', 'align'] as const, function (name) {
......
......@@ -81,7 +81,7 @@ interface SavedLabelAttr {
verticalAlign: ZRTextVerticalAlign
width: number
height: number
fontSize: number
fontSize: number | string
x: number
y: number
......
......@@ -188,7 +188,7 @@ function getFromStateStyle(
function createEmphasisDefaultState(
el: Displayable,
stateName: 'emphasis',
targetStates?: string[],
targetStates: string[],
state: Displayable['states'][number]
) {
const hasSelect = targetStates && indexOf(targetStates, 'select') >= 0;
......
......@@ -776,7 +776,7 @@ export interface TextCommonOption extends ShadowOptionMixin {
fontStyle?: ZRFontStyle
fontWeight?: ZRFontWeight
fontFamily?: string
fontSize?: number
fontSize?: number | string
align?: HorizontalAlign
verticalAlign?: VerticalAlign
// @deprecated
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册