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
+2 -5
View File
@@ -1,5 +1,5 @@
import { PropType, defineComponent } from 'vue';
import { createNamespace } from '../utils';
import { truthProp, createNamespace } from '../utils';
import { BORDER_TOP_BOTTOM } from '../utils/constant';
import { useChildren } from '@vant/use';
@@ -16,6 +16,7 @@ export default defineComponent({
name,
props: {
border: truthProp,
accordion: Boolean,
modelValue: {
type: [String, Number, Array] as PropType<
@@ -23,10 +24,6 @@ export default defineComponent({
>,
default: '',
},
border: {
type: Boolean,
default: true,
},
},
emits: ['change', 'update:modelValue'],