diff --git a/docs/example/Tooltip/demos/placement.tsx b/docs/example/Tooltip/demos/placement.tsx index 3341037c..962cd816 100644 --- a/docs/example/Tooltip/demos/placement.tsx +++ b/docs/example/Tooltip/demos/placement.tsx @@ -12,6 +12,7 @@ export default function Placement() { display: inline-flex; flex-direction: column; gap: 8px; + --banana-tooltip-max-width: 80px; } .placement-row { diff --git a/docs/example/Tooltip/index.md b/docs/example/Tooltip/index.md index 389ce096..36578e00 100644 --- a/docs/example/Tooltip/index.md +++ b/docs/example/Tooltip/index.md @@ -24,18 +24,18 @@ demo: ## 属性 - Attributes & Properties -| 属性 | 说明 | 类型 | 默认值 | -| --------------------------------------------------------------- | ------------------------------- | -------------------- | ------- | -| content | 提示内容 | `boolean` | '' | -| placement | 弹出位置 | `Placement` | 'top' | -| disableAutoAdjustOverflow
(disable-auto-adjust-overflow) | 禁用自动调整弹出位置 | `boolean` | false | -| maxWidth
(max-width) | 气泡的最大宽度 | `number \| string ` | - | -| backgroundColor
(background-color) | 气泡的背景颜色 | `string` | - | -| margin | 气泡与触发元素(trigger)的距离 | `number` | 8 | -| mouseEnterDelay
(mouse-enter-delay) | 鼠标移入后延时多少才显示 | `number` | 100 | -| mouseLeaveDelay
(mouse-leave-delay) | 鼠标移出后延时多少才隐藏 | `number` | 100 | -| triggerAction
(trigger-action) | 触发行为 | `'hover' \| 'click'` | 'hover' | -| noArrow | 是否隐藏箭头 | `boolean` | false | +| 属性 | 说明 | 类型 | 默认值 | +| --------------------------------------------------------------- | ------------------------------- | -------------------- | --------------------- | +| content | 提示内容 | `boolean` | '' | +| placement | 弹出位置 | `Placement` | 'top' | +| disableAutoAdjustOverflow
(disable-auto-adjust-overflow) | 禁用自动调整弹出位置 | `boolean` | false | +| maxWidth
(max-width) | 气泡的最大宽度 | `number \| string ` | '300px' | +| backgroundColor
(background-color) | 气泡的背景颜色 | `string` | 'rgba(46, 50 ,56, 1)' | +| margin | 气泡与触发元素(trigger)的距离 | `number` | 8 | +| mouseEnterDelay
(mouse-enter-delay) | 鼠标移入后延时多少才显示 | `number` | 100 | +| mouseLeaveDelay
(mouse-leave-delay) | 鼠标移出后延时多少才隐藏 | `number` | 100 | +| triggerAction
(trigger-action) | 触发行为 | `'hover' \| 'click'` | 'hover' | +| noArrow | 是否隐藏箭头 | `boolean` | false | ```typescript export type Placement =