@@ -62,10 +62,10 @@ export default defineComponent({
const renderHorizontalBody = (actionData: ActionData, parentIndex: number) =>
actionData.actions?.map((item, index) => (
-
+ {ctx.slots.iconContent?.({ option: item }) ||
+
}
{ctx.slots.content?.({ option: item })}
{item.createdAt}
{!(actionData.actions && data?.value && index === actionData.actions.length - 1 && parentIndex === data?.value?.length - 1) && (
diff --git a/packages/devui-vue/docs/components/action-timeline/index.md b/packages/devui-vue/docs/components/action-timeline/index.md
index 72610019f7..cc344a2452 100644
--- a/packages/devui-vue/docs/components/action-timeline/index.md
+++ b/packages/devui-vue/docs/components/action-timeline/index.md
@@ -180,6 +180,118 @@ export default defineComponent({
:::
+### 自定义Icon位置的代码
+
+icon区域想要自定义样式和事件,可以通过iconContent插槽实现。
+
+:::demo
+
+```vue
+
+
+
+ {{ page.option.action }}
+
+
+ {{ page.option.actionContent }}
+
+
+
+ {{ page.option.icon }}
+
+
+
+
+
+
+
+
+```
+
+:::
+
### ActionTimeline 参数
| 参数名 | 类型 | 默认值 | 说明 |
@@ -203,6 +315,7 @@ export default defineComponent({
| :------ | :----------------------- | :------------------------------------------- |
| content | `{ option: ActionItem }` | 必选,内容区域插槽 |
| title | `{ option: ActionItem }` | 标题区域插槽,横向布局时可选,纵向布局时必选 |
+| iconContent | `{ option: ActionItem }` | 可选,图标区域插槽 |
### 接口定义