chore: 修改inputRange schema 类型定义

This commit is contained in:
huangying11 2022-02-21 14:15:36 +08:00
parent e8ccb2720c
commit b34c16f3de
2 changed files with 12 additions and 8 deletions

View File

@ -20,12 +20,18 @@ import {
MultipleValue,
Value,
FormatValue,
MarksType,
RangeItemProps
} from '../renderers/Form/InputRange';
import {stripNumber} from '../utils/tpl-builtin';
import {findDOMNode} from 'react-dom';
type MarksType = {
[index: number | string]: Record<
number,
React.ReactNode | {style?: React.CSSProperties; label?: string}
>;
};
interface HandleItemState {
isDrag: boolean;
labelActive: boolean;

View File

@ -10,6 +10,7 @@ import {Icon} from '../../components/icons';
import {stripNumber} from '../../utils/tpl-builtin';
import {autobind} from '../../utils/helper';
import {filter} from '../../utils/tpl';
import {SchemaObject} from '../../Schema';
/**
* Range
@ -60,7 +61,7 @@ export interface RangeControlSchema extends FormBaseControl {
/**
*
*/
// marks?: MarksType;
marks?: MarksType;
/**
*
@ -98,10 +99,10 @@ export interface RangeControlSchema extends FormBaseControl {
disabled?: boolean;
}
export type MarksType = {
type MarksType = {
[index: number | string]: Record<
number,
React.ReactNode | {style?: React.CSSProperties; label?: string}
SchemaObject | {style?: React.CSSProperties; label?: string}
>;
};
@ -138,11 +139,8 @@ export interface RangeProps extends FormControlProps {
/**
*
*
* todo React.Compnonent json schema
* json function
*/
// marks?: MarksType;
marks?: MarksType;
/**
*