perf: add truthProp util (#8522)
* perf: add TruthyProp util * chore: rename * chore: upd
This commit is contained in:
@@ -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'],
|
||||
|
||||
Reference in New Issue
Block a user