Skip to content
This repository has been archived by the owner on Jan 8, 2025. It is now read-only.

Commit

Permalink
fix(ui/row): add gutter/cols length watcher
Browse files Browse the repository at this point in the history
  • Loading branch information
leno23 committed Feb 24, 2022
1 parent fea3a14 commit 96b0a7e
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 166 deletions.
11 changes: 11 additions & 0 deletions packages/varlet-vue2-ui/src/row/Row.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,17 @@ export default defineComponent({
average() {
return toPxNum(this.gutter) / 2
},
length() {
return this.cols.length
},
},
watch: {
gutter() {
this.computePadding()
},
length() {
this.computePadding()
},
},
methods: {
computePadding() {
Expand Down
Loading

0 comments on commit 96b0a7e

Please sign in to comment.