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
+5 -16
View File
@@ -4,6 +4,7 @@ import { ref, watch, computed, PropType, defineComponent } from 'vue';
import {
isDef,
addUnit,
truthProp,
resetScroll,
formatNumber,
getSizeStyle,
@@ -39,6 +40,10 @@ export default defineComponent({
theme: String as PropType<StepperTheme>,
integer: Boolean,
disabled: Boolean,
showPlus: truthProp,
showMinus: truthProp,
showInput: truthProp,
longPress: truthProp,
allowEmpty: Boolean,
modelValue: [Number, String],
inputWidth: [Number, String],
@@ -69,22 +74,6 @@ export default defineComponent({
type: [Number, String],
default: 1,
},
showPlus: {
type: Boolean,
default: true,
},
showMinus: {
type: Boolean,
default: true,
},
showInput: {
type: Boolean,
default: true,
},
longPress: {
type: Boolean,
default: true,
},
},
emits: [