This repository has been archived on 2023-08-30. You can view files and clone it, but cannot push or open issues/pull-requests.
bytedo
/
wcui
Archived
1
0
Fork 0

完成row, col布局组件

old
yutent 2022-01-20 19:07:12 +08:00
parent f6dc01c66d
commit b10bbeff9e
2 changed files with 3 additions and 2 deletions

View File

@ -14,7 +14,7 @@
} }
@for $i from 1 to 25 { @for $i from 1 to 25 {
:host([offset='#{$i}']) { :host([offset='#{$i}']) {
margin-left: math.div($i * 100, 24) + 0%; margin-left: math.div($i * 100, 24) + 0% !important;
} }
} }
</style> </style>

View File

@ -79,7 +79,8 @@ export default class Row {
val = +val val = +val
if (val > 0) { if (val > 0) {
this.props.gutter = val this.props.gutter = val
this.__ROW__.style.cssText = `width:calc(100% + ${val}px);margin-left:${val}px` this.__ROW__.style.cssText = `width:calc(100% + ${val}px);margin-left:${-val /
2}px;margin-right:${-val / 2}px;`
} else { } else {
this.props.gutter = 0 this.props.gutter = 0
this.__ROW__.removeAttribute('style') this.__ROW__.removeAttribute('style')