types: using unknown instead of any (#8152)

* types: using unknown instead of any

* chore: UnknownProp
This commit is contained in:
neverland
2021-02-14 12:37:02 +08:00
committed by GitHub
parent 393b2a256f
commit 08e928111b
23 changed files with 81 additions and 56 deletions

View File

@@ -3,7 +3,13 @@ import { ref, watch, reactive, PropType } from 'vue';
// Utils
import { deepClone } from '../utils/deep-clone';
import { range, isObject, createNamespace, preventDefault } from '../utils';
import {
range,
isObject,
UnknownProp,
preventDefault,
createNamespace,
} from '../utils';
// Composition
import { useParent } from '@vant/use';
@@ -42,7 +48,7 @@ export type PickerOption = string | PickerObjectOption;
export type PickerObjectColumn = {
values?: PickerOption[];
children?: PickerColumn;
className?: any;
className?: unknown;
defaultIndex?: number;
// for custom filed names
[key: string]: any;
@@ -58,7 +64,7 @@ export default createComponent({
props: {
readonly: Boolean,
allowHtml: Boolean,
className: String,
className: UnknownProp,
textKey: {
type: String,
required: true,