chrome: 处理ts警报 (#5994)

This commit is contained in:
meerkat 2022-12-28 18:45:59 +08:00 committed by GitHub
parent 61dd67688f
commit f639203cbc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 8 deletions

View File

@ -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]);

View File

@ -41,7 +41,7 @@ export default {
},
{
title: '动画',
body: [animation(null, false)]
body: [animation(undefined, false)]
},
{
title: '文字样式',

View File

@ -1,3 +1,4 @@
// @ts-nocheck
import React from 'react';
import {FormItem, Renderer} from 'amis-core';

View File

@ -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 = {