Riku
2024-08-13 093afd3be27ea5e9692839845b69bd56e2405518
miniprogram_npm/tdesign-miniprogram/collapse/README.md
@@ -27,6 +27,12 @@
## 代码演示
<a href="https://developers.weixin.qq.com/s/P67sAimx75Sy" title="在开发者工具中预览效果" target="_blank" rel="noopener noreferrer"> 在开发者工具中预览效果 </a>
<blockquote style="background-color: #d9e1ff; font-size: 15px; line-height: 26px;margin: 16px 0 0;padding: 16px; border-radius: 6px; color: #0052d9" >
<p>Tips: 请确保开发者工具为打开状态。导入开发者工具后,依次执行:npm i > 构建npm包 > 勾选 "将JS编译成ES5"</p>
</blockquote>
### 类型
基础折叠面板
@@ -74,9 +80,33 @@
content | String / Slot | - | 折叠面板内容 | N
disabled | Boolean | undefined | 禁止当前面板展开,优先级大于 Collapse 的同名属性 | N
expand-icon | Boolean / Slot | undefined | 当前折叠面板展开图标,优先级大于 Collapse 的同名属性 | N
external-classes | Array | - | 组件类名,用于组件外层元素、标题、内容。`['t-class', 't-class-header', 't-class-content']` | N
header | String / Slot | - | 面板头内容 | N
header-left-icon | String / Slot | - | 面板头左侧图标 | N
header-right-content | String / Slot | - | 面板头的右侧区域,一般用于呈现面板操作 | N
placement | String | bottom | `0.34.0`。选项卡内容的位置。可选项:bottom/top | N
value | String / Number | - | 当前面板唯一标识,如果值为空则取当前面下标兜底作为唯一标识 | N
### CollapsePanel 外部样式类
类名 | 说明
-- | --
t-class | 根节点样式类
t-class-content | 内容样式类
t-class-header | 头部样式类
### CSS 变量
组件提供了下列 CSS 变量,可用于自定义样式。
名称 | 默认值 | 描述
-- | -- | --
--td-collapse-border-color | @border-color | -
--td-collapse-content-font-size | @font-size-base | -
--td-collapse-content-line-height | 1.5 | -
--td-collapse-content-padding | 32rpx | -
--td-collapse-content-text-color | @font-gray-1 | -
--td-collapse-extra-font-size | @font-size-m | -
--td-collapse-header-height | 96rpx | -
--td-collapse-header-text-color | @font-gray-1 | -
--td-collapse-header-text-disabled-color | @font-gray-4 | -
--td-collapse-horizontal-padding | 32rpx | -
--td-collapse-icon-color | @font-gray-3 | -
--td-collapse-panel-bg-color | @bg-color-container | -
--td-collapse-title-font-size | @font-size-m | -