jamis
Version:
一种支持通过JSON配置方式生成页面的组件库
48 lines (47 loc) • 1.43 kB
TypeScript
import React from 'react';
import type { ActionObject } from 'jamis-core';
import type { InputRangeValue, RangeFormatValue, RangeProps } from './types';
interface RangeState {
value: RangeFormatValue;
}
/**
* 格式化初始value值
* @param value 初始value值 Value
* @param props RangeProps
* @returns number | {min: number, max: number}
*/
export declare function formatValue(value: InputRangeValue, props: {
multiple: boolean;
delimiter: string;
min: number;
max: number;
}): RangeFormatValue;
export default class RangeControl extends React.PureComponent<RangeProps, RangeState> {
midLabel?: HTMLSpanElement;
static defaultProps: Partial<RangeProps>;
constructor(props: RangeProps);
componentDidUpdate(prevProps: RangeProps): void;
doAction(action: ActionObject, data: object, throwErrors: boolean): void;
clearValue(type?: string): void;
getValue(value: RangeFormatValue): number | {
max: number;
min: number;
};
/**
* 所有触发value变换 -> updateValue
* @param value
*/
updateValue(value: RangeFormatValue): Promise<void>;
/**
* 鼠标松开事件
*/
onAfterChange(): void;
/**
* 获取导出格式数据
*/
getFormatValue(value: RangeFormatValue): string | RangeFormatValue;
render(): JSX.Element;
}
export declare class RangeControlRenderer extends RangeControl {
}
export {};