From f639203cbcc4abf9b2e447ff42633d608cc39171 Mon Sep 17 00:00:00 2001 From: meerkat Date: Wed, 28 Dec 2022 18:45:59 +0800 Subject: [PATCH] =?UTF-8?q?chrome:=20=E5=A4=84=E7=90=86ts=E8=AD=A6?= =?UTF-8?q?=E6=8A=A5=20(#5994)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/components/EChartsEditor/Common.tsx | 10 +++++----- examples/components/EChartsEditor/Global.tsx | 2 +- examples/components/Form/Custom.tsx | 1 + packages/amis-ui/src/components/Spinner.tsx | 4 ++-- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/examples/components/EChartsEditor/Common.tsx b/examples/components/EChartsEditor/Common.tsx index 92e655a55..4969f9519 100644 --- a/examples/components/EChartsEditor/Common.tsx +++ b/examples/components/EChartsEditor/Common.tsx @@ -285,7 +285,7 @@ export const viewportControl = ( value: 3 } ], - pipeIn: value => { + pipeIn: (value: any) => { if (typeof value === 'undefined') { return keywordList[0]; } @@ -301,7 +301,7 @@ export const viewportControl = ( return keywordList[0]; } }, - pipeOut: value => { + pipeOut: (value: number) => { if (value === 1) { return keywordList[0]; } else if (value === 2) { @@ -697,7 +697,7 @@ export const keywordOrNumber = ( type: 'switch', label: labelForSwitch, name: name, - pipeIn: (value: any, data) => { + pipeIn: (value: any, data: any) => { if (typeof data[name] === 'undefined') { return false; } @@ -1135,7 +1135,7 @@ const buildOneOption = (scope: string, name: string, option: any) => { } if (name in FIX_LABEL) { - label = FIX_LABEL[name]; + label = FIX_LABEL[name as keyof typeof FIX_LABEL]; } remark = `「${name}」${remark}`; @@ -1193,7 +1193,7 @@ export const buildGroupOptions = ( parentName: string, options: any ) => { - let controls = []; + let controls: any[] = []; for (const name in options) { if (name.startsWith(parentName + '.')) { const control = buildOneOption(scope, name, options[name]); diff --git a/examples/components/EChartsEditor/Global.tsx b/examples/components/EChartsEditor/Global.tsx index e9a1785dc..95aa0504b 100644 --- a/examples/components/EChartsEditor/Global.tsx +++ b/examples/components/EChartsEditor/Global.tsx @@ -41,7 +41,7 @@ export default { }, { title: '动画', - body: [animation(null, false)] + body: [animation(undefined, false)] }, { title: '文字样式', diff --git a/examples/components/Form/Custom.tsx b/examples/components/Form/Custom.tsx index b3b584659..b99c07c21 100644 --- a/examples/components/Form/Custom.tsx +++ b/examples/components/Form/Custom.tsx @@ -1,3 +1,4 @@ +// @ts-nocheck import React from 'react'; import {FormItem, Renderer} from 'amis-core'; diff --git a/packages/amis-ui/src/components/Spinner.tsx b/packages/amis-ui/src/components/Spinner.tsx index f23bacefa..6272050ce 100644 --- a/packages/amis-ui/src/components/Spinner.tsx +++ b/packages/amis-ui/src/components/Spinner.tsx @@ -23,7 +23,7 @@ const fadeStyles: { // Spinner Props export interface SpinnerProps extends ThemeProps, SpinnerExtraProps { - show: boolean; // 控制Spinner显示与隐藏 + show?: boolean; // 控制Spinner显示与隐藏 className?: string; // 自定义最外层元素class spinnerClassName?: string; // spin图标位置包裹元素的自定义class /** @@ -115,7 +115,7 @@ export class Spinner extends React.Component< tipPlacement: 'bottom' as 'bottom', delay: 0, overlay: false, - loadingConfig: {} as SpinnerExtraProps + loadingConfig: {} }; state = {