chore: remove object spead (#8514)

This commit is contained in:
neverland
2021-04-12 20:57:24 +08:00
committed by GitHub
parent 0b764b6347
commit 9deca34d1d
41 changed files with 204 additions and 241 deletions
+3 -3
View File
@@ -1,4 +1,5 @@
import { PropType } from 'vue';
import { extend } from '../utils';
import { pickerProps } from '../picker/Picker';
export type ColumnType = 'year' | 'month' | 'day' | 'hour' | 'minute';
@@ -11,15 +12,14 @@ export type DatetimePickerType =
| 'month-day'
| 'year-month';
export const sharedProps = {
...pickerProps,
export const sharedProps = extend({}, pickerProps, {
filter: Function as PropType<(type: string, values: string[]) => string[]>,
columnsOrder: Array as PropType<ColumnType[]>,
formatter: {
type: Function as PropType<(type: string, value: string) => string>,
default: (type: string, value: string) => value,
},
};
});
export const pickerKeys = Object.keys(pickerProps) as Array<
keyof typeof pickerProps