Skip to content

Commit

Permalink
feat(layout): 添加mobile layout公共样式和文档 (#1794)
Browse files Browse the repository at this point in the history
* feat(layout): 添加mobile layout公共样式和文档

* refactor(layout): 优化样式文件

* style(layout): 优化样式文件格式底部添加换行符

* refactor(layout): 优化row样式支持换行
  • Loading branch information
aaronmhl committed May 24, 2024
1 parent 93737c5 commit 59dac79
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 0 deletions.
21 changes: 21 additions & 0 deletions docs/mobile/api_v2/col.en-US.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
title: Layout Layout
description: Guide and regulate the layout and information distribution on the page with a regular grid array, improve the consistency of the layout within the interface, and save costs.
spline: base
isComponent: true
toc: false
---

## Introduction

## Code Demonstration

### Component Types

Basic

{{ base }}

Increase Spacing

{{ offset }}
21 changes: 21 additions & 0 deletions docs/mobile/api_v2/col.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
title: Layout 布局
description: 以规则的网格阵列来指导和规范页面中的版面布局以及信息分布,提高界面内布局的一致性,节约成本。
spline: base
isComponent: true
toc: false
---

## 引入

## 代码演示

### 组件类型

基础

{{ base }}

增加间距

{{ offset }}
11 changes: 11 additions & 0 deletions style/mobile/components/col/v2/_index.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@import "../../../base.less";

@import "./_mixin.less";

.@{prefix}-col {
display: block;
box-sizing: border-box;
min-height: 1px;
}

.col-generate(24);
11 changes: 11 additions & 0 deletions style/mobile/components/col/v2/_mixin.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.col-generate(@n, @i: 1) when(@i <=@n) {
.@{prefix}-col--@{i} {
width: (@i * 100% / @n);
}

.@{prefix}-col--offset-@{i} {
margin-left: (@i * 100% / @n);
}

.col-generate(@n, (@i + 1));
}
8 changes: 8 additions & 0 deletions style/mobile/components/row/v2/_index.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@import "../../../base.less";

.@{prefix}-row {
display: flex;
flex-flow: row;
box-sizing: border-box;
flex-wrap: wrap;
}

0 comments on commit 59dac79

Please sign in to comment.