Commit 93d1895b authored by Clement Ho's avatar Clement Ho

Refactor v-if into computed

parent dd20613c
......@@ -4,10 +4,15 @@ export default {
hiddenAssignees: { type: Number, required: true },
toggle: { type: Function, required: true }
},
computed: {
showMore() {
return this.hiddenAssignees > 0;
}
},
template: `
<div class="user-list-more">
<button type="button" class="btn-link" @click="toggle">
<template v-if="hiddenAssignees > 0">
<template v-if="showMore">
+ {{hiddenAssignees}} more
</template>
<template v-else>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment