-
Notifications
You must be signed in to change notification settings - Fork 232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(steps): resolve text overflow no tooltip #1629
base: dev
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -960,9 +960,10 @@ | |||
} | ||||
|
||||
.label { | ||||
display: flex; | ||||
align-items: center; | ||||
border: solid 1px var(--ti-steps-advanced-border-color); | ||||
border-right: none; | ||||
display: block; | ||||
text-align: center; | ||||
position: relative; | ||||
text-decoration: none; | ||||
|
@@ -1001,6 +1002,17 @@ | |||
border-left-color: var(--ti-steps-advanced-li-hover-bg-color); | ||||
} | ||||
} | ||||
|
||||
span { | ||||
flex: 1; | ||||
display: block; | ||||
width: 100%; | ||||
height: 100%; | ||||
margin: 0 var(--ti-steps-label-margin-horizontal); | ||||
overflow: hidden; | ||||
text-overflow: ellipsis; | ||||
white-space: nowrap; | ||||
} | ||||
} | ||||
|
||||
&:first-child { | ||||
|
@@ -1030,12 +1042,12 @@ | |||
height: var(--ti-steps-advanced-dot-height); | ||||
width: var(--ti-steps-advanced-dot-width); | ||||
margin-right: 8px; | ||||
padding: 0; | ||||
right: 0; | ||||
top: 50%; | ||||
transform: translateY(-50%); | ||||
// padding: 0; | ||||
// right: 0; | ||||
// top: 50%; | ||||
// transform: translateY(-50%); | ||||
display: flex; | ||||
position: absolute; | ||||
// position: absolute; | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
这一段也许删掉会更好 |
||||
|
||||
svg { | ||||
width: 100%; | ||||
|
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -12,16 +12,18 @@ | |||||||||
@click="$emit('click', index, node)" | ||||||||||
> | ||||||||||
<slot name="item" :slot-scope="node" :index="index"> | ||||||||||
<div class="label" :title="node[nameField]"> | ||||||||||
<span>{{ node[nameField] }}</span> | ||||||||||
<div class="label"> | ||||||||||
<tiny-tooltip :content="node[nameField]" visible="auto"> | ||||||||||
<span>{{ node[nameField] }}</span> | ||||||||||
</tiny-tooltip> | ||||||||||
<div v-if="['doing', 'done'].includes(node[statusField])" :class="['dot', node[statusField]]"> | ||||||||||
<icon-refres v-if="node[statusField] === 'doing'"></icon-refres> | ||||||||||
<icon-yes v-else-if="node[statusField] === 'done'"></icon-yes> | ||||||||||
</div> | ||||||||||
</div> | ||||||||||
<div v-if="node[countField]" class="count"> | ||||||||||
{{ node[countField] }} | ||||||||||
</div> | ||||||||||
<div v-if="node[statusField]" :class="['dot', node[statusField]]"> | ||||||||||
<icon-refres v-if="node[statusField] === 'doing'"></icon-refres> | ||||||||||
<icon-yes v-else-if="node[statusField] === 'done'"></icon-yes> | ||||||||||
</div> | ||||||||||
</slot> | ||||||||||
</li> | ||||||||||
</ul> | ||||||||||
|
@@ -31,11 +33,13 @@ | |||||||||
<script lang="ts"> | ||||||||||
import { renderless, api } from '@opentiny/vue-renderless/steps/vue' | ||||||||||
import { props, setup, defineComponent } from '@opentiny/vue-common' | ||||||||||
import ToolTip from '@opentiny/vue-tooltip' | ||||||||||
import { iconRefres, iconYes } from '@opentiny/vue-icon' | ||||||||||
|
||||||||||
export default defineComponent({ | ||||||||||
emits: ['click'], | ||||||||||
components: { | ||||||||||
TinyTooltip: ToolTip, | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Correct the registration of - IconRefres: iconRefres(),
- IconYes: iconYes()
+ IconRefres: iconRefres,
+ IconYes: iconYes This change ensures that the components are correctly registered without invoking them as functions. Committable suggestion
Suggested change
|
||||||||||
IconRefres: iconRefres(), | ||||||||||
IconYes: iconYes() | ||||||||||
}, | ||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这一段也许删掉会更好