diff --git a/components/tile-grid/README.md b/components/tile-grid/README.md new file mode 100644 index 0000000..7575ed6 --- /dev/null +++ b/components/tile-grid/README.md @@ -0,0 +1,59 @@ +# TileGrid 组件 + +## 简介 +TileGrid 是一个通用的瓦片网格组件,用于显示一排均匀分布的瓦片图片。 + +## 功能 +- 支持自定义瓦片数量 +- 支持自定义瓦片图片 +- 自动均匀分布瓦片 +- 响应式布局 + +## 使用方法 + +### 1. 导入组件 +```javascript +import TileGrid from "../../components/tile-grid/tile-grid.vue"; +``` + +### 2. 注册组件 +```javascript +export default { + components: { + TileGrid + } +} +``` + +### 3. 在模板中使用 +```vue + +``` + +## Props 参数 + +| 参数 | 类型 | 默认值 | 必填 | 说明 | +|------|------|--------|------|------| +| tileCount | Number | 10 | 否 | 瓦片数量 | +| tileImage | String | - | 是 | 瓦片图片URL | + +## 样式说明 +- 瓦片网格使用 `flex` 布局,自动均匀分布 +- 每个瓦片图片尺寸为 `75rpx × 48rpx` +- 瓦片间距通过 `justify-content: space-between` 自动计算 + +## 注意事项 +- 确保传入的图片URL有效 +- 瓦片数量建议在 1-20 之间,避免过多影响性能 +- 组件会自动适应容器宽度 \ No newline at end of file diff --git a/components/tile-grid/tile-grid.vue b/components/tile-grid/tile-grid.vue new file mode 100644 index 0000000..a799062 --- /dev/null +++ b/components/tile-grid/tile-grid.vue @@ -0,0 +1,48 @@ + + + + + \ No newline at end of file diff --git a/pages/institutionalStructure/institutionalStructure.vue b/pages/institutionalStructure/institutionalStructure.vue index 11563d9..d2595e6 100644 --- a/pages/institutionalStructure/institutionalStructure.vue +++ b/pages/institutionalStructure/institutionalStructure.vue @@ -1,11 +1,7 @@