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,7 +1,7 @@
import { PropType, defineComponent } from 'vue';
// Utils
import { createNamespace } from '../utils';
import { truthProp, createNamespace } from '../utils';
// Components
import { Button } from '../button';
@@ -15,6 +15,7 @@ export default defineComponent({
props: {
modelValue: [Number, String],
switchable: truthProp,
disabledText: String,
addButtonText: String,
defaultTagText: String,
@@ -26,10 +27,6 @@ export default defineComponent({
type: Array as PropType<AddressListAddress[]>,
default: () => [],
},
switchable: {
type: Boolean,
default: true,
},
},
emits: [