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
@@ -9,7 +9,7 @@ import {
} from 'vue';
// Utils
import { createNamespace } from '../utils';
import { truthProp, createNamespace } from '../utils';
// Composables
import { useWindowSize } from '@vant/use';
@@ -29,8 +29,11 @@ export default defineComponent({
name,
props: {
showCount: truthProp,
enabledTitle: String,
disabledTitle: String,
showExchangeBar: truthProp,
showCloseButton: truthProp,
closeButtonText: String,
inputPlaceholder: String,
exchangeButtonText: String,
@@ -60,18 +63,6 @@ export default defineComponent({
type: Number,
default: -1,
},
showExchangeBar: {
type: Boolean,
default: true,
},
showCloseButton: {
type: Boolean,
default: true,
},
showCount: {
type: Boolean,
default: true,
},
currency: {
type: String,
default: '¥',