mirror of
https://github.com/youzan/vant.git
synced 2026-05-07 01:01:01 +08:00
perf: add truthProp util (#8522)
* perf: add TruthyProp util * chore: rename * chore: upd
This commit is contained in:
@@ -9,7 +9,7 @@ import {
|
||||
} from 'vue';
|
||||
|
||||
// Utils
|
||||
import { isDef, ComponentInstance, createNamespace } from '../utils';
|
||||
import { isDef, truthProp, createNamespace, ComponentInstance } from '../utils';
|
||||
|
||||
// Composables
|
||||
import {
|
||||
@@ -27,12 +27,11 @@ export const DROPDOWN_KEY = Symbol(name);
|
||||
export type DropdownMenuDirection = 'up' | 'down';
|
||||
|
||||
const props = {
|
||||
overlay: truthProp,
|
||||
zIndex: [Number, String],
|
||||
activeColor: String,
|
||||
overlay: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
closeOnClickOutside: truthProp,
|
||||
closeOnClickOverlay: truthProp,
|
||||
duration: {
|
||||
type: [Number, String],
|
||||
default: 0.2,
|
||||
@@ -41,14 +40,6 @@ const props = {
|
||||
type: String as PropType<DropdownMenuDirection>,
|
||||
default: 'down',
|
||||
},
|
||||
closeOnClickOutside: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
closeOnClickOverlay: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
};
|
||||
|
||||
export type DropdownMenuProvide = {
|
||||
|
||||
Reference in New Issue
Block a user