perf: add truthProp util (#8522)

* perf: add TruthyProp util

* chore: rename

* chore: upd
This commit is contained in:
neverland
2021-04-14 10:26:21 +08:00
committed by GitHub
parent 9381640d2e
commit bd609e1df0
59 changed files with 226 additions and 460 deletions
+9 -7
View File
@@ -8,7 +8,12 @@ import {
} from 'vue';
// Utils
import { createNamespace, getZIndexStyle, UnknownProp } from '../utils';
import {
truthProp,
unknownProp,
getZIndexStyle,
createNamespace,
} from '../utils';
import {
DROPDOWN_KEY,
DropdownMenuProvide,
@@ -38,16 +43,13 @@ export default defineComponent({
title: String,
disabled: Boolean,
teleport: [String, Object] as PropType<TeleportProps['to']>,
modelValue: UnknownProp,
titleClass: UnknownProp,
lazyRender: truthProp,
modelValue: unknownProp,
titleClass: unknownProp,
options: {
type: Array as PropType<DropdownItemOption[]>,
default: () => [],
},
lazyRender: {
type: Boolean,
default: true,
},
},
emits: ['open', 'opened', 'close', 'closed', 'change', 'update:modelValue'],