Skip to content

Commit

Permalink
fix(components): [SelectorField] 修复input文字过长换行的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
godxiaoji committed May 17, 2023
1 parent 034bc46 commit 198a334
Show file tree
Hide file tree
Showing 4 changed files with 2,038 additions and 1,990 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tantalum-ui-mobile",
"version": "0.3.8",
"version": "0.3.9",
"description": "A Mobile UI Components built on Vue 3.x",
"main": "lib/index.js",
"module": "es/index.mjs",
Expand Down
7 changes: 7 additions & 0 deletions packages/ui/src/Input/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,13 @@
box-shadow: none;
resize: none;

&.ellipsis {
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
overflow: hidden;
}

// white-space: nowrap;
// text-overflow: ellipsis;
// overflow: hidden;
Expand Down
1 change: 1 addition & 0 deletions packages/ui/src/SelectorField/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ export const getClasses = (props: { label?: string; disabled?: boolean }) => [

export const getInputClasses = (label?: string) => [
'ta-input_input',
'ellipsis',
{ placeholder: !label }
]
Loading

0 comments on commit 198a334

Please sign in to comment.