(component): tooltip,table

tooltip 新增isAutoShow属性 目的控制超出文本 `...` 时自动展示, 没有 `...` 时不展示
table 列添加ellipsisTooltip属性时,无 `...`
的不显示tooltip效果
This commit is contained in:
dingyongya
2022-05-24 19:15:57 +08:00
parent 59e874d3c4
commit 2036a9ef6f
7 changed files with 72 additions and 13 deletions

View File

@@ -39,6 +39,7 @@ export default {
title:"备注",
width: "180px",
key:"remark",
ellipsisTooltip: true,
}
]

View File

@@ -6,6 +6,38 @@
::: demo
<template>
<div style="width: 125px; ">
<lay-tooltip content="假装这里有文字提示" ref="tooltip" :isAutoShow="true">
假装这里有文字提示
</lay-tooltip>
</div>
<div style="width: 126px; margin-top: 20px">
<lay-tooltip content="假装这里有文字提示" ref="tooltip" :isAutoShow="true">
假装这里有文字提示
</lay-tooltip>
</div>
</template>
<script>
import { ref } from 'vue';
export default {
setup() {
}
}
</script>
<style>
</style>
:::
::: title 基础使用
:::
::: demo
<template>
<lay-tooltip content="假装这里有文字提示">
<lay-button>tooltip</lay-button>
@@ -125,6 +157,7 @@
| isDark | 是否为黑色主题 | `true`(默认值)、`false`(浅色) |
| disabled | 是否禁用 | `false`(默认值)、`true`(禁用) ||
| isCanHide | 控制是否可以隐藏,可参考`lay-slider`组件 | `true`(默认值)、`false` ||
| isAutoShow | 控制超出文本 `...` 时自动展示, 没有 `...` 时不展示 | `false`(默认值)、`true` ||
:::