types(Area): use tsx (#8140)

This commit is contained in:
neverland
2021-02-12 13:18:13 +08:00
committed by GitHub
parent 54be2b3c0a
commit a00f599dc2
6 changed files with 83 additions and 52 deletions
+8 -8
View File
@@ -29,14 +29,14 @@ function getElementTranslateY(element: Element) {
return Number(translateY);
}
export type PickerOption =
| string
| {
text: string;
disabled?: boolean;
// for custom filed names
[key: string]: any;
};
export type PickerObjectOption = {
text?: string;
disabled?: boolean;
// for custom filed names
[key: string]: any;
};
export type PickerOption = string | PickerObjectOption;
export type PickerObjectColumn = {
values?: PickerOption[];
+9 -1
View File
@@ -12,9 +12,10 @@ import { useExpose } from '../composables/use-expose';
// Components
import Loading from '../loading';
import Column, {
PickerOption,
PickerColumn,
PickerOption,
PickerObjectColumn,
PickerObjectOption,
} from './PickerColumn';
const [createComponent, bem, t] = createNamespace('picker');
@@ -27,6 +28,13 @@ export type PickerFieldNames = {
children?: string;
};
export type {
PickerColumn,
PickerOption,
PickerObjectColumn,
PickerObjectOption,
};
export default createComponent({
props: {
...pickerProps,