mirror of
https://github.com/jumpserver/lina.git
synced 2025-08-02 07:27:01 +00:00
perf: tooltip 全局添加 delay
This commit is contained in:
parent
2d7fae677b
commit
aed40c518e
@ -22,6 +22,7 @@
|
|||||||
<el-tooltip
|
<el-tooltip
|
||||||
v-if="isSystemError && isLoading"
|
v-if="isSystemError && isLoading"
|
||||||
:content="$tc('Reconnect')"
|
:content="$tc('Reconnect')"
|
||||||
|
open-delay="500"
|
||||||
placement="top"
|
placement="top"
|
||||||
>
|
>
|
||||||
<svg-icon icon-class="refresh" @click="onRefresh" />
|
<svg-icon icon-class="refresh" @click="onRefresh" />
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
<template v-if="showHasObjects">
|
<template v-if="showHasObjects">
|
||||||
<tr v-for="obj of iHasObjects" :key="obj.value" class="item">
|
<tr v-for="obj of iHasObjects" :key="obj.value" class="item">
|
||||||
<td style="width: 100%;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
|
<td style="width: 100%;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
|
||||||
<el-tooltip :content="obj.label" effect="dark" placement="left" style="margin: 4px;">
|
<el-tooltip :content="obj.label" effect="dark" open-delay="500" placement="left" style="margin: 4px;">
|
||||||
<b>{{ obj.label }}</b>
|
<b>{{ obj.label }}</b>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</td>
|
</td>
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
>
|
>
|
||||||
{{ option.group }}
|
{{ option.group }}
|
||||||
</div>
|
</div>
|
||||||
<el-tooltip :key="option.name" :content="option.tip" :disabled="!option.tip" open-delay="1000" placement="top">
|
<el-tooltip :key="option.name" :content="option.tip" :disabled="!option.tip" open-delay="500" placement="top">
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
:key="option.name"
|
:key="option.name"
|
||||||
:command="[option, action]"
|
:command="[option, action]"
|
||||||
@ -56,7 +56,7 @@
|
|||||||
v-bind="{...cleanButtonAction(action), icon: action.icon && action.icon.startsWith('el-') ? action.icon : ''}"
|
v-bind="{...cleanButtonAction(action), icon: action.icon && action.icon.startsWith('el-') ? action.icon : ''}"
|
||||||
@click="handleClick(action)"
|
@click="handleClick(action)"
|
||||||
>
|
>
|
||||||
<el-tooltip :content="action.tip" :disabled="!action.tip" :open-delay="1000" placement="top">
|
<el-tooltip :content="action.tip" :disabled="!action.tip" :open-delay="500" placement="top">
|
||||||
<span>
|
<span>
|
||||||
<span v-if="action.icon && !action.icon.startsWith('el-')" style="vertical-align: initial">
|
<span v-if="action.icon && !action.icon.startsWith('el-')" style="vertical-align: initial">
|
||||||
<i v-if="action.icon.startsWith('fa')" :class="'fa ' + action.icon" />
|
<i v-if="action.icon.startsWith('fa')" :class="'fa ' + action.icon" />
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
>
|
>
|
||||||
<template v-if="data.label" #label>
|
<template v-if="data.label" #label>
|
||||||
<span>{{ data.label }}</span>
|
<span>{{ data.label }}</span>
|
||||||
<el-tooltip v-if="data.helpTip" effect="dark" placement="right" popper-class="help-tips">
|
<el-tooltip v-if="data.helpTip" effect="dark" open-delay="500" placement="right" popper-class="help-tips">
|
||||||
<div slot="content" v-html="data.helpTip" />
|
<div slot="content" v-html="data.helpTip" />
|
||||||
<i class="fa fa-question-circle-o help-tip-icon" />
|
<i class="fa fa-question-circle-o help-tip-icon" />
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
:key="index"
|
:key="index"
|
||||||
style="display: inline-block; margin: 0 2px"
|
style="display: inline-block; margin: 0 2px"
|
||||||
>
|
>
|
||||||
<el-tooltip :content="item.tip" :disabled="!item.tip" placement="top">
|
<el-tooltip :content="item.tip" :disabled="!item.tip" open-delay="500" placement="top">
|
||||||
<el-button
|
<el-button
|
||||||
v-if="item.type ==='button' && !item.isVisible"
|
v-if="item.type ==='button' && !item.isVisible"
|
||||||
:type="item.el&&item.el.type"
|
:type="item.el&&item.el.type"
|
||||||
@ -93,7 +93,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="toolbar.hasOwnProperty('fold')" class="fold">
|
<div v-if="toolbar.hasOwnProperty('fold')" class="fold">
|
||||||
<el-tooltip :content="$tc('MoreActions')" placement="top">
|
<el-tooltip :content="$tc('MoreActions')" open-delay="500" placement="top">
|
||||||
<i
|
<i
|
||||||
:class="[isFold ? 'fa-angle-double-right': 'fa-angle-double-down']"
|
:class="[isFold ? 'fa-angle-double-right': 'fa-angle-double-down']"
|
||||||
class="fa"
|
class="fa"
|
||||||
@ -108,7 +108,7 @@
|
|||||||
:key="index"
|
:key="index"
|
||||||
style="display: inline-block"
|
style="display: inline-block"
|
||||||
>
|
>
|
||||||
<el-tooltip :content="item.tip">
|
<el-tooltip :content="item.tip" open-delay="500">
|
||||||
<el-button
|
<el-button
|
||||||
v-if="item.type ==='button'"
|
v-if="item.type ==='button'"
|
||||||
:disabled="item.disabled"
|
:disabled="item.disabled"
|
||||||
|
@ -199,7 +199,7 @@ export default {
|
|||||||
col.renderHeader = (h, { column, $index }) => {
|
col.renderHeader = (h, { column, $index }) => {
|
||||||
return (
|
return (
|
||||||
<span>{column.label}
|
<span>{column.label}
|
||||||
<el-tooltip placement='bottom' effect='light' popperClass='help-tips'>
|
<el-tooltip open-delay='1000' placement='bottom' effect='light' popperClass='help-tips'>
|
||||||
<div slot='content' domPropsInnerHTML={helpTip}/>
|
<div slot='content' domPropsInnerHTML={helpTip}/>
|
||||||
<el-button style='padding: 0'>
|
<el-button style='padding: 0'>
|
||||||
<i class='fa fa-info-circle'/>
|
<i class='fa fa-info-circle'/>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<span>
|
<span>
|
||||||
<el-tooltip v-if="shown" :disabled="!formatterArgs.hasTips" effect="dark" placement="bottom">
|
<el-tooltip v-if="shown" :disabled="!formatterArgs.hasTips" effect="dark" open-delay="500" placement="bottom">
|
||||||
<div slot="content" v-html="tips" />
|
<div slot="content" v-html="tips" />
|
||||||
<span :class="classes">
|
<span :class="classes">
|
||||||
<i v-if="formatterArgs.showIcon && icon" :class="'fa ' + icon" />
|
<i v-if="formatterArgs.showIcon && icon" :class="'fa ' + icon" />
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-tooltip v-if="formatterArgs.hasTips" placement="bottom" effect="dark">
|
<el-tooltip v-if="formatterArgs.hasTips" effect="dark" open-delay="500" placement="bottom">
|
||||||
<div slot="content">
|
<div slot="content">
|
||||||
<template v-if="tipsIsArray">
|
<template v-if="tipsIsArray">
|
||||||
<div v-for="tip of tips" :key="tip">
|
<div v-for="tip of tips" :key="tip">
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
:key="index"
|
:key="index"
|
||||||
style="display: inline-block"
|
style="display: inline-block"
|
||||||
>
|
>
|
||||||
<el-tooltip :content="item.tip">
|
<el-tooltip :content="item.tip" open-delay="500">
|
||||||
<el-button
|
<el-button
|
||||||
v-if="!item.isScrollButton || showScrollButton"
|
v-if="!item.isScrollButton || showScrollButton"
|
||||||
size="mini"
|
size="mini"
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
:manual="true"
|
:manual="true"
|
||||||
class="item"
|
class="item"
|
||||||
effect="dark"
|
effect="dark"
|
||||||
|
open-delay="500"
|
||||||
placement="bottom-start"
|
placement="bottom-start"
|
||||||
>
|
>
|
||||||
<el-menu
|
<el-menu
|
||||||
|
@ -2,22 +2,22 @@
|
|||||||
<div class="navbar">
|
<div class="navbar">
|
||||||
<ul class="navbar-right">
|
<ul class="navbar-right">
|
||||||
<li class="header-item header-icon">
|
<li class="header-item header-icon">
|
||||||
<el-tooltip :content="$tc('SiteMessageList')" effect="dark">
|
<el-tooltip :content="$tc('SiteMessageList')" effect="dark" open-delay="500">
|
||||||
<SiteMessages />
|
<SiteMessages />
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</li>
|
</li>
|
||||||
<li v-perms="['rbac.view_webterminal']" class="header-item header-icon">
|
<li v-perms="['rbac.view_webterminal']" class="header-item header-icon">
|
||||||
<el-tooltip :content="$tc('WebTerminal')" effect="dark">
|
<el-tooltip :content="$tc('WebTerminal')" effect="dark" open-delay="500">
|
||||||
<WebTerminal />
|
<WebTerminal />
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</li>
|
</li>
|
||||||
<li v-if="ticketsEnabled" class="header-item header-hover">
|
<li v-if="ticketsEnabled" class="header-item header-hover">
|
||||||
<el-tooltip :content="$tc('Ticket')" effect="dark">
|
<el-tooltip :content="$tc('Ticket')" effect="dark" open-delay="500">
|
||||||
<Tickets />
|
<Tickets />
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</li>
|
</li>
|
||||||
<li v-perms="'settings.view_setting'" class="header-item header-icon">
|
<li v-perms="'settings.view_setting'" class="header-item header-icon">
|
||||||
<el-tooltip :content="$tc('SystemSetting')" effect="dark">
|
<el-tooltip :content="$tc('SystemSetting')" effect="dark" open-delay="500">
|
||||||
<SystemSetting />
|
<SystemSetting />
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</li>
|
</li>
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
<slot name="title">
|
<slot name="title">
|
||||||
<span style="padding-left: 10px">
|
<span style="padding-left: 10px">
|
||||||
{{ iTitle }}
|
{{ iTitle }}
|
||||||
<el-tooltip v-if="helpTip" effect="dark" placement="top" popper-class="help-tips">
|
<el-tooltip v-if="helpTip" effect="dark" open-delay="500" placement="top" popper-class="help-tips">
|
||||||
<div slot="content" class="page-help-content" v-html="helpTip" />
|
<div slot="content" class="page-help-content" v-html="helpTip" />
|
||||||
<span>
|
<span>
|
||||||
<el-button class="help-msg-btn">
|
<el-button class="help-msg-btn">
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
<i v-if="item.icon" :class="item.icon" class="fa pre-icon " />
|
<i v-if="item.icon" :class="item.icon" class="fa pre-icon " />
|
||||||
{{ toSentenceCase(item.title) }}
|
{{ toSentenceCase(item.title) }}
|
||||||
<slot :tab="item.name" name="badge" />
|
<slot :tab="item.name" name="badge" />
|
||||||
<el-tooltip v-if="item.helpTip" effect="dark" placement="bottom" popper-class="help-tips">
|
<el-tooltip v-if="item.helpTip" effect="dark" open-delay="500" placement="bottom" popper-class="help-tips">
|
||||||
<div slot="content" class="page-help-content" v-html="item.helpTip" />
|
<div slot="content" class="page-help-content" v-html="item.helpTip" />
|
||||||
<span>
|
<span>
|
||||||
<el-button class="help-msg-btn">
|
<el-button class="help-msg-btn">
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
<el-tooltip
|
<el-tooltip
|
||||||
:content="obj.label"
|
:content="obj.label"
|
||||||
effect="dark"
|
effect="dark"
|
||||||
|
open-delay="500"
|
||||||
placement="left"
|
placement="left"
|
||||||
style="margin: 4px;"
|
style="margin: 4px;"
|
||||||
>
|
>
|
||||||
|
@ -3,8 +3,9 @@
|
|||||||
<span class="title">{{ config.title }}</span>
|
<span class="title">{{ config.title }}</span>
|
||||||
<el-tooltip
|
<el-tooltip
|
||||||
v-if="hasTip"
|
v-if="hasTip"
|
||||||
effect="dark"
|
|
||||||
:content="config.tip"
|
:content="config.tip"
|
||||||
|
effect="dark"
|
||||||
|
open-delay="500"
|
||||||
placement="top"
|
placement="top"
|
||||||
>
|
>
|
||||||
<i class="fa fa-exclamation-circle icon" />
|
<i class="fa fa-exclamation-circle icon" />
|
||||||
|
@ -49,12 +49,12 @@ export default {
|
|||||||
formatter: (row) => {
|
formatter: (row) => {
|
||||||
if (row.count) {
|
if (row.count) {
|
||||||
return <div>
|
return <div>
|
||||||
<el-tooltip content='success'><span Class='text-success'>{row.count.ok} </span></el-tooltip>
|
<el-tooltip open-delay='1000' content='success'><span Class='text-success'>{row.count.ok} </span></el-tooltip>
|
||||||
<el-tooltip content='failed'><span Class='text-danger'> {row.count.failed} </span>
|
<el-tooltip open-delay='1000' content='failed'><span Class='text-danger'> {row.count.failed} </span>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip content='exclude'><span Class='text-warning'> {row.count.excludes} </span>
|
<el-tooltip open-delay='1000' content='exclude'><span Class='text-warning'> {row.count.excludes} </span>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip content='total'><span Class='text-primary'> {row.count.total}</span></el-tooltip>
|
<el-tooltip open-delay='1000' content='total'><span Class='text-primary'> {row.count.total}</span></el-tooltip>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
return '-'
|
return '-'
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
@change="handleCheckboxCheck(i, $event)"
|
@change="handleCheckboxCheck(i, $event)"
|
||||||
>
|
>
|
||||||
{{ i.label }}
|
{{ i.label }}
|
||||||
<el-tooltip :content="i.tip" placement="top">
|
<el-tooltip :content="i.tip" open-delay="500" placement="top">
|
||||||
<i class="fa fa-question-circle-o" />
|
<i class="fa fa-question-circle-o" />
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</el-checkbox>
|
</el-checkbox>
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
<el-form-item :label="item.label" :prop="item.name" label-width="80px">
|
<el-form-item :label="item.label" :prop="item.name" label-width="80px">
|
||||||
<template #label>
|
<template #label>
|
||||||
{{ item.label }}
|
{{ item.label }}
|
||||||
<el-tooltip v-if="item.tip" :content="item.tip" placement="top">
|
<el-tooltip v-if="item.tip" :content="item.tip" open-delay="500" placement="top">
|
||||||
<i class="fa fa-question-circle-o" />
|
<i class="fa fa-question-circle-o" />
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</template>
|
</template>
|
||||||
@ -27,7 +27,7 @@
|
|||||||
<el-form-item :label="field.label" :prop="field.name">
|
<el-form-item :label="field.label" :prop="field.name">
|
||||||
<template #label>
|
<template #label>
|
||||||
{{ field.label }}
|
{{ field.label }}
|
||||||
<el-tooltip v-if="field.tip" :content="field.tip" placement="top">
|
<el-tooltip v-if="field.tip" :content="field.tip" open-delay="500" placement="top">
|
||||||
<i class="fa fa-question-circle-o" />
|
<i class="fa fa-question-circle-o" />
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</template>
|
</template>
|
||||||
|
Loading…
Reference in New Issue
Block a user