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
+4 -13
View File
@@ -1,7 +1,7 @@
import { nextTick, PropType, defineComponent } from 'vue';
// Utils
import { pick, extend, createNamespace } from '../utils';
import { pick, extend, truthProp, createNamespace } from '../utils';
// Components
import { Icon } from '../icon';
@@ -26,27 +26,18 @@ export default defineComponent({
props: extend({}, popupSharedProps, {
title: String,
round: truthProp,
actions: Array as PropType<ActionSheetAction[]>,
closeable: truthProp,
cancelText: String,
description: String,
closeOnPopstate: Boolean,
closeOnClickAction: Boolean,
round: {
type: Boolean,
default: true,
},
closeable: {
type: Boolean,
default: true,
},
safeAreaInsetBottom: truthProp,
closeIcon: {
type: String,
default: 'cross',
},
safeAreaInsetBottom: {
type: Boolean,
default: true,
},
}),
emits: ['select', 'cancel', 'update:show'],