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,6 +1,6 @@
import { watch, computed, PropType, CSSProperties, defineComponent } from 'vue';
import { raf, cancelRaf } from '@vant/use';
import { isObject, getSizeStyle, createNamespace } from '../utils';
import { isObject, getSizeStyle, truthProp, createNamespace } from '../utils';
const [name, bem] = createNamespace('circle');
@@ -24,6 +24,7 @@ export default defineComponent({
text: String,
size: [Number, String],
color: [String, Object] as PropType<string | Record<string, string>>,
clockwise: truthProp,
layerColor: String,
strokeLinecap: String as PropType<CanvasLineCap>,
currentRate: {
@@ -46,10 +47,6 @@ export default defineComponent({
type: [Number, String],
default: 40,
},
clockwise: {
type: Boolean,
default: true,
},
},
emits: ['update:currentRate'],