Files
HuajisheTools/HuajisheCheckChaoXing/miniprogram_npm/tdesign-miniprogram/col/README.md
2025-10-01 10:01:52 +08:00

1.7 KiB
Raw Blame History

title, description, spline, isComponent
title description spline isComponent
Layout 布局 以规则的网格阵列来指导和规范页面中的版面布局以及信息分布,提高界面内布局的一致性,节约成本。 base true

引入

全局引入,在 miniprogram 根目录下的app.json中配置,局部引入,在需要引入的页面或组件的index.json中配置。

"usingComponents": {
  "t-row": "tdesign-miniprogram/row/row",
  "t-col": "tdesign-miniprogram/col/col"
}

代码演示

在开发者工具中预览效果

Tips: 请确保开发者工具为打开状态。导入开发者工具后依次执行npm i > 构建npm包 > 勾选 "将JS编译成ES5"

组件类型

基础

{{ base }}

增加间距

{{ offset }}

API

Col Props

名称 类型 默认值 描述 必传
style Object - 样式 N
custom-style Object - 样式,一般用于开启虚拟化组件节点场景 N
offset String / Number - 列的偏移量默认单位px N
span String / Number - 列的宽度默认单位px N

Row Props

名称 类型 默认值 描述 必传
style Object - 样式 N
custom-style Object - 样式,一般用于开启虚拟化组件节点场景 N
gutter String / Number - 列之间的间距默认单位px N