Skip to content

Commit eefcbec

Browse files
authored
Merge pull request #12 from realsaeedhassani/master
Replace computed instead of method
2 parents 3d483d9 + 13f3146 commit eefcbec

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

src/Row.vue

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,12 @@ export default {
1414
default: 12,
1515
},
1616
},
17-
data() {
18-
return {
19-
styleGeneral: this.createGutter(this.gutter),
20-
};
21-
},
22-
methods: {
23-
createGutter(gutter) {
24-
return gutter
25-
? `--paddingVGR:${gutter / 2}px;--marginVGR:-${gutter / 2}px`
26-
: '--paddingVGR:0px;--marginVGR:0px';
27-
},
17+
computed: {
18+
styleGeneral() {
19+
return this.gutter
20+
? `--paddingVGR:${this.gutter / 2}px;--marginVGR:-${this.gutter / 2}px`
21+
: '--paddingVGR:0px;--marginVGR:0px';
22+
}
2823
},
2924
};
3025
</script>

0 commit comments

Comments
 (0)