diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index 77a8ae2b7..40968c464 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -1,5 +1,11 @@ # CHANGELOG +## 2.4.2 + +### Fixes + +- Fix `n-ellipsis` & `n-data-table` ellpisis cell mis-vertical-aligned. + ## 2.4.1 ### Fixes diff --git a/CHANGELOG.zh-CN.md b/CHANGELOG.zh-CN.md index 80aa2de01..59b3b30eb 100644 --- a/CHANGELOG.zh-CN.md +++ b/CHANGELOG.zh-CN.md @@ -1,5 +1,11 @@ # CHANGELOG +## 2.4.2 + +### Fixes + +- 修正 `n-ellipsis` & `n-data-table` ellpisis 单元格文本垂直排列错位 + ## 2.4.1 ### Fixes diff --git a/src/data-table/src/interface.ts b/src/data-table/src/interface.ts index 60020cf4c..c8eaeda28 100644 --- a/src/data-table/src/interface.ts +++ b/src/data-table/src/interface.ts @@ -1,6 +1,6 @@ import { TreeNode, TreeMate } from 'treemate' import { CSSProperties, VNodeChild } from 'vue' -import { EllipsisProps } from '../../ellipsis/src' +import { EllipsisProps } from '../../ellipsis/src/Ellipsis' import { NLocale } from '../../locales' import { MergedTheme } from '../../_mixins' import { DataTableTheme } from '../styles' diff --git a/src/data-table/src/styles/index.cssr.ts b/src/data-table/src/styles/index.cssr.ts index aa66040eb..ed03d3c74 100644 --- a/src/data-table/src/styles/index.cssr.ts +++ b/src/data-table/src/styles/index.cssr.ts @@ -211,6 +211,7 @@ export default c([ `), cE('ellipsis', ` display: inline-block; + vertical-align: bottom; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; diff --git a/src/ellipsis/index.ts b/src/ellipsis/index.ts index 680dc4224..c7b5aa75b 100644 --- a/src/ellipsis/index.ts +++ b/src/ellipsis/index.ts @@ -1 +1 @@ -export { default as NEllipsis } from './src' +export { default as NEllipsis } from './src/Ellipsis' diff --git a/src/ellipsis/src/index.tsx b/src/ellipsis/src/Ellipsis.tsx similarity index 100% rename from src/ellipsis/src/index.tsx rename to src/ellipsis/src/Ellipsis.tsx diff --git a/src/ellipsis/src/styles/index.cssr.ts b/src/ellipsis/src/styles/index.cssr.ts index 913176d4d..7db5864c8 100644 --- a/src/ellipsis/src/styles/index.cssr.ts +++ b/src/ellipsis/src/styles/index.cssr.ts @@ -6,6 +6,7 @@ export default cB('ellpisis', { cNotM('line-clamp', ` white-space: nowrap; display: inline-block; + vertical-align: bottom; max-width: 100%; `), cM('line-clamp', ` diff --git a/src/version.ts b/src/version.ts index 8ef45cc80..328d72d99 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export default '2.4.0' +export default '2.4.1'