Skip to content

Commit 9e1c2a3

Browse files
committed
Simplify computeOverlap method, the calcValue is redundant.
1 parent ed82b62 commit 9e1c2a3

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/components/BAvatar/BAvatarGroup.vue

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,8 @@ export default defineComponent({
4444
setup(props) {
4545
const computedSize = computed(() => computeSize(props.size))
4646
47-
const computeOverlap = (value: any): number => {
48-
const calcValue = isString(value) && isNumeric(value) ? toFloat(value, 0) : value || 0
49-
return calcValue
50-
}
47+
const computeOverlap = (value: any): number =>
48+
isString(value) && isNumeric(value) ? toFloat(value, 0) : value || 0
5149
const overlapScale = computed(() => mathMin(mathMax(computeOverlap(props.overlap), 0), 1) / 2)
5250
5351
const paddingStyle = computed((): StyleValue => {

0 commit comments

Comments
 (0)