From 99ec7af198a558b519fd9bdd32645191530608f1 Mon Sep 17 00:00:00 2001 From: ZXSheng <952396285@qq.com> Date: Fri, 9 Dec 2022 15:16:15 +0800 Subject: [PATCH] perf: add tooltip for some icon buttons (halo-dev/console#745) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #### What type of PR is this? /kind improvement #### What this PR does / why we need it: 部分 UI 元素使用了图标代替文字,但某些情况下可能会导致无法直观的判断具体用途,添加 tooltip 以提示使用者。 #### Which issue(s) this PR fixes: Fixes https://github.com/halo-dev/halo/issues/2656 #### Screenshots:   #### Does this PR introduce a user-facing change? ```release-note Console 端为部分图标按钮添加操作提示,提升可访问性。 ``` --- src/modules/contents/attachments/AttachmentList.vue | 4 ++++ src/modules/contents/comments/CommentList.vue | 1 + src/modules/contents/pages/SinglePageList.vue | 5 +++-- src/modules/contents/posts/PostList.vue | 5 +++-- src/modules/system/plugins/PluginList.vue | 1 + src/modules/system/users/components/UserEditingModal.vue | 4 ++-- 6 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/modules/contents/attachments/AttachmentList.vue b/src/modules/contents/attachments/AttachmentList.vue index 126c52205..7f6d1b293 100644 --- a/src/modules/contents/attachments/AttachmentList.vue +++ b/src/modules/contents/attachments/AttachmentList.vue @@ -228,10 +228,12 @@ const getPolicyName = (name: string | undefined) => { const viewTypes = [ { name: "list", + tooltip: "列表模式", icon: IconList, }, { name: "grid", + tooltip: "网格模式", icon: IconGrid, }, ]; @@ -526,6 +528,7 @@ onMounted(() => {