完成row, col布局组件
parent
f6dc01c66d
commit
b10bbeff9e
|
@ -14,7 +14,7 @@
|
|||
}
|
||||
@for $i from 1 to 25 {
|
||||
:host([offset='#{$i}']) {
|
||||
margin-left: math.div($i * 100, 24) + 0%;
|
||||
margin-left: math.div($i * 100, 24) + 0% !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -79,7 +79,8 @@ export default class Row {
|
|||
val = +val
|
||||
if (val > 0) {
|
||||
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 {
|
||||
this.props.gutter = 0
|
||||
this.__ROW__.removeAttribute('style')
|
||||
|
|
Reference in New Issue