diff --git a/package/component/src/component/popper/index.vue b/package/component/src/component/popper/index.vue index 9ce72399..eb8074af 100644 --- a/package/component/src/component/popper/index.vue +++ b/package/component/src/component/popper/index.vue @@ -35,6 +35,7 @@ export interface LayPopperProps { isDark?: boolean; disabled?: boolean; isCanHide?: boolean; + isAutoShow?: boolean; } const props = withDefaults(defineProps(), { @@ -43,6 +44,7 @@ const props = withDefaults(defineProps(), { disabled: false, enterable: true, isCanHide: true, + isAutoShow: false, trigger: "hover", }); diff --git a/package/component/src/component/table/index.vue b/package/component/src/component/table/index.vue index a85f41d2..290fc619 100644 --- a/package/component/src/component/table/index.vue +++ b/package/component/src/component/table/index.vue @@ -354,13 +354,9 @@ onMounted(() => { -
- -
+
{ -
- {{ data[column.key] }} -
+ {{ data[column.key] }}
{{ data[column.key] }} diff --git a/package/component/src/component/tooltip/index.less b/package/component/src/component/tooltip/index.less new file mode 100644 index 00000000..53f10472 --- /dev/null +++ b/package/component/src/component/tooltip/index.less @@ -0,0 +1,6 @@ +.lay-tooltip-content{ + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + cursor: pointer; +} \ No newline at end of file diff --git a/package/component/src/component/tooltip/index.vue b/package/component/src/component/tooltip/index.vue index 1772846b..bb4bf9ac 100644 --- a/package/component/src/component/tooltip/index.vue +++ b/package/component/src/component/tooltip/index.vue @@ -1,9 +1,13 @@ diff --git a/package/document/src/document/zh-CN/components/table.md b/package/document/src/document/zh-CN/components/table.md index 8b08b022..967e046c 100644 --- a/package/document/src/document/zh-CN/components/table.md +++ b/package/document/src/document/zh-CN/components/table.md @@ -39,6 +39,7 @@ export default { title:"备注", width: "180px", key:"remark", + ellipsisTooltip: true, } ] diff --git a/package/document/src/document/zh-CN/components/tooltip.md b/package/document/src/document/zh-CN/components/tooltip.md index 4d0440ce..bb8e7bec 100644 --- a/package/document/src/document/zh-CN/components/tooltip.md +++ b/package/document/src/document/zh-CN/components/tooltip.md @@ -6,6 +6,38 @@ ::: demo + + + + + +::: + +::: title 基础使用 +::: + +::: demo +