React · Vue
示例
第 1 列
第 2 列
第 1 列
第 2 列
第 3 列
用法
import { Grid } from '@momoyeyu/momo-ui';
import '@momoyeyu/momo-ui/styles.css';
<Grid columns={2} gap="sm">
<div>时钟</div><div>记事本</div>
</Grid>Vue
<script setup>
import { Grid } from '@momoyeyu/momo-ui/vue';
import '@momoyeyu/momo-ui/styles.css';
</script>
<template>
<Grid :columns="2" gap="sm">
<div>时钟</div><div>记事本</div>
</Grid>
</template> API
| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
as | LayoutTag | div | 使用原生标签保留页面语义。 |
gap | Spacing | md | 相邻子项的间距。 |
align | Alignment | stretch | start、center、end、stretch 或 baseline。 |
columns | number | 1 | 等宽列数。 |
继承根元素的 HTML 属性。