Skip to content

Commit

Permalink
Perf: Perf Pt Language Style
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhaoJiSen committed Jan 14, 2025
1 parent 5925ac4 commit d1a48a2
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 11 deletions.
9 changes: 5 additions & 4 deletions src/components/DataActions/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
@click="handleClick(action)"
>
<el-tooltip :content="action.tip" :disabled="!action.tip" :open-delay="500" placement="top">
<span>
<span :title="action.tip">
<span v-if="action.icon && !action.icon.startsWith('el-')" style="vertical-align: initial">
<i v-if="action.icon.startsWith('fa')" :class="'fa ' + action.icon" />
<svg-icon v-else :icon-class="action.icon" />
Expand Down Expand Up @@ -249,10 +249,11 @@ $color-drop-menu-border: #e4e7ed;
align-items: flex-end;
.el-button {
display: flex;
align-items: center;
padding: 2px 6px;
padding: 2px 5px;
color: $btn-text-color;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
* {
vertical-align: baseline !important;
Expand Down
4 changes: 4 additions & 0 deletions src/components/Form/DataForm/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,10 @@ export default {
line-height: 30px;
color: var(--color-text-primary);
span {
display: unset;
}
i {
color: var(--color-icon-primary);
}
Expand Down
15 changes: 11 additions & 4 deletions src/views/dashboard/components/RankTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,24 @@
style="width: 100%"
>
<el-table-column :label="$tc('Ranking')" width="80px">
<template v-slot="scope">
<span>{{ scope.$index + 1 }}</span>
<template v-slot="scope" #header>
<el-tooltip :content="$t('Ranking')" placement="top" :open-delay="500">
<span style="cursor: pointer;">{{ $t('Ranking') }}</span>
</el-tooltip>
</template>
</el-table-column>
<el-table-column
v-for="i in config.columns"
:key="i.prop"
:label="i.label"
:prop="i.prop"
:width="i.width"
/>
>
<template #header>
<el-tooltip :content="i.label" placement="top" :open-delay="500">
<span style="cursor: pointer;">{{ i.label }}</span>
</el-tooltip>
</template>
</el-table-column>
</el-table>
</div>
</template>
Expand Down
24 changes: 21 additions & 3 deletions src/views/dashboard/components/RingChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,35 @@ export default {
let percentage = activeDecimal.dividedBy(totalDecimal).times(100)
percentage = isNaN(percentage) ? 0 : percentage
percentage = percentage.toFixed(2)
const formatTitle = (text) => {
if (!text) return ''
const maxLength = 23
const lines = []
for (let i = 0; i < text.length; i += maxLength) {
lines.push(text.slice(i, i + maxLength))
}
return lines.join('\n')
}
return {
title: [
{
text: this.config.chartTitle,
text: formatTitle(this.config.chartTitle),
textStyle: {
color: '#646A73',
fontSize: 12
fontSize: 12,
lineHeight: 16,
rich: {
width: 100,
overflow: 'break'
}
},
textAlign: 'center',
left: '48%',
top: '32%'
top: '32%',
width: 100,
overflow: 'break'
},
{
left: '48%',
Expand Down

0 comments on commit d1a48a2

Please sign in to comment.