Browse Source

fix: icon display issue

main
刘凯 1 year ago
parent
commit
a46afa201d
  1. 12
      src/components/Cropper/src/CopperModal.vue
  2. 2
      src/components/Upload/src/BasicUpload.vue
  3. 36
      src/enums/appEnum.ts
  4. 13
      src/layouts/default/tabs/useTabDropdown.ts
  5. 2
      src/router/routes/index.ts
  6. 2
      src/views/base/profile/BaseSetting.vue
  7. 4
      src/views/system/notify/my/index.vue

12
src/components/Cropper/src/CopperModal.vue

@ -109,14 +109,14 @@ async function handleOk() {
<div :class="`${prefixCls}-toolbar`"> <div :class="`${prefixCls}-toolbar`">
<Upload :file-list="[]" accept="image/*" :before-upload="handleBeforeUpload"> <Upload :file-list="[]" accept="image/*" :before-upload="handleBeforeUpload">
<Tooltip :title="t('component.cropper.selectImage')" placement="bottom"> <Tooltip :title="t('component.cropper.selectImage')" placement="bottom">
<a-button size="small" pre-icon="ant-design:upload-outlined" type="primary" /> <a-button size="small" pre-icon="i-ant-design:upload-outlined" type="primary" />
</Tooltip> </Tooltip>
</Upload> </Upload>
<Space> <Space>
<Tooltip :title="t('component.cropper.btn_reset')" placement="bottom"> <Tooltip :title="t('component.cropper.btn_reset')" placement="bottom">
<a-button <a-button
type="primary" type="primary"
pre-icon="ant-design:reload-outlined" pre-icon="i-ant-design:reload-outlined"
size="small" size="small"
:disabled="!src" :disabled="!src"
@click="handlerToolbar('reset')" @click="handlerToolbar('reset')"
@ -125,7 +125,7 @@ async function handleOk() {
<Tooltip :title="t('component.cropper.btn_rotate_left')" placement="bottom"> <Tooltip :title="t('component.cropper.btn_rotate_left')" placement="bottom">
<a-button <a-button
type="primary" type="primary"
pre-icon="ant-design:rotate-left-outlined" pre-icon="i-ant-design:rotate-left-outlined"
size="small" size="small"
:disabled="!src" :disabled="!src"
@click="handlerToolbar('rotate', -45)" @click="handlerToolbar('rotate', -45)"
@ -134,7 +134,7 @@ async function handleOk() {
<Tooltip :title="t('component.cropper.btn_rotate_right')" placement="bottom"> <Tooltip :title="t('component.cropper.btn_rotate_right')" placement="bottom">
<a-button <a-button
type="primary" type="primary"
pre-icon="ant-design:rotate-right-outlined" pre-icon="i-ant-design:rotate-right-outlined"
size="small" size="small"
:disabled="!src" :disabled="!src"
@click="handlerToolbar('rotate', 45)" @click="handlerToolbar('rotate', 45)"
@ -149,7 +149,7 @@ async function handleOk() {
<Tooltip :title="t('component.cropper.btn_zoom_in')" placement="bottom"> <Tooltip :title="t('component.cropper.btn_zoom_in')" placement="bottom">
<a-button <a-button
type="primary" type="primary"
pre-icon="ant-design:zoom-in-outlined" pre-icon="i-ant-design:zoom-in-outlined"
size="small" size="small"
:disabled="!src" :disabled="!src"
@click="handlerToolbar('zoom', 0.1)" @click="handlerToolbar('zoom', 0.1)"
@ -158,7 +158,7 @@ async function handleOk() {
<Tooltip :title="t('component.cropper.btn_zoom_out')" placement="bottom"> <Tooltip :title="t('component.cropper.btn_zoom_out')" placement="bottom">
<a-button <a-button
type="primary" type="primary"
pre-icon="ant-design:zoom-out-outlined" pre-icon="i-ant-design:zoom-out-outlined"
size="small" size="small"
:disabled="!src" :disabled="!src"
@click="handlerToolbar('zoom', -0.1)" @click="handlerToolbar('zoom', -0.1)"

2
src/components/Upload/src/BasicUpload.vue

@ -70,7 +70,7 @@ function handlePreviewDelete(url: string) {
<template> <template>
<div> <div>
<Space> <Space>
<a-button type="primary" pre-icon="carbon:cloud-upload" @click="openUploadModal"> <a-button type="primary" pre-icon="i-carbon:cloud-upload" @click="openUploadModal">
{{ t('component.upload.upload') }} {{ t('component.upload.upload') }}
</a-button> </a-button>
<Tooltip v-if="showPreview" placement="bottom"> <Tooltip v-if="showPreview" placement="bottom">

36
src/enums/appEnum.ts

@ -52,22 +52,22 @@ export enum RouterTransitionEnum {
} }
export enum IconEnum { export enum IconEnum {
VIEW = 'ant-design:file-search-outlined', VIEW = 'i-ant-design:file-search-outlined',
ADD = 'ant-design:plus-outlined', ADD = 'i-ant-design:plus-outlined',
IMPORT = 'ant-design:vertical-align-top-outlined', IMPORT = 'i-ant-design:vertical-align-top-outlined',
EXPORT = 'ant-design:vertical-align-bottom-outlined', EXPORT = 'i-ant-design:vertical-align-bottom-outlined',
TEST = 'ant-design:deployment-unit-outlined', TEST = 'i-ant-design:deployment-unit-outlined',
EDIT = 'clarity:note-edit-line', EDIT = 'i-ant-design:edit-outlined',
AUTH = 'ant-design:safety-certificate-outlined', AUTH = 'i-ant-design:safety-certificate-outlined',
DELETE = 'ant-design:delete-outlined', DELETE = 'i-ant-design:delete-outlined',
SEARCH = 'ant-design:search-outlined', SEARCH = 'i-ant-design:search-outlined',
RESET = 'ant-design:sync-outlined', RESET = 'i-ant-design:sync-outlined',
UPLOAD = 'ant-design:cloud-upload-outlined', UPLOAD = 'i-ant-design:cloud-upload-outlined',
DOWNLOAD = 'ant-design:cloud-download-outlined', DOWNLOAD = 'i-ant-design:cloud-download-outlined',
PREVIEW = 'ant-design:eye-outlined', PREVIEW = 'i-ant-design:eye-outlined',
ADD_FOLD = 'ant-design:folder-add-outlined', ADD_FOLD = 'i-ant-design:folder-add-outlined',
LOG = 'ant-design:exception-outlined', LOG = 'i-ant-design:exception-outlined',
PASSWORD = 'ant-design:key-outlined', PASSWORD = 'i-ant-design:key-outlined',
SETTING = 'ant-design:setting-outlined', SETTING = 'i-ant-design:setting-outlined',
SEND = 'ant-design:send-outlined', SEND = 'i-ant-design:send-outlined',
} }

13
src/layouts/default/tabs/useTabDropdown.ts

@ -49,42 +49,43 @@ export function useTabDropdown(tabContentProps: TabContentProps, getIsTabs: Comp
// Close right // Close right
const closeRightDisabled = !isCurItem || (index === tabStore.getTabList.length - 1 && tabStore.getLastDragEndIndex >= 0) const closeRightDisabled = !isCurItem || (index === tabStore.getTabList.length - 1 && tabStore.getLastDragEndIndex >= 0)
// @unocss-include
const dropMenuList: DropMenu[] = [ const dropMenuList: DropMenu[] = [
{ {
icon: 'ion:reload-sharp', icon: 'i-ion:reload-sharp',
event: MenuEventEnum.REFRESH_PAGE, event: MenuEventEnum.REFRESH_PAGE,
text: t('layout.multipleTab.reload'), text: t('layout.multipleTab.reload'),
disabled: refreshDisabled, disabled: refreshDisabled,
}, },
{ {
icon: 'clarity:close-line', icon: 'i-clarity:close-line',
event: MenuEventEnum.CLOSE_CURRENT, event: MenuEventEnum.CLOSE_CURRENT,
text: t('layout.multipleTab.close'), text: t('layout.multipleTab.close'),
disabled: !!meta?.affix || disabled, disabled: !!meta?.affix || disabled,
divider: true, divider: true,
}, },
{ {
icon: 'line-md:arrow-close-left', icon: 'i-line-md:arrow-close-left',
event: MenuEventEnum.CLOSE_LEFT, event: MenuEventEnum.CLOSE_LEFT,
text: t('layout.multipleTab.closeLeft'), text: t('layout.multipleTab.closeLeft'),
disabled: closeLeftDisabled, disabled: closeLeftDisabled,
divider: false, divider: false,
}, },
{ {
icon: 'line-md:arrow-close-right', icon: 'i-line-md:arrow-close-right',
event: MenuEventEnum.CLOSE_RIGHT, event: MenuEventEnum.CLOSE_RIGHT,
text: t('layout.multipleTab.closeRight'), text: t('layout.multipleTab.closeRight'),
disabled: closeRightDisabled, disabled: closeRightDisabled,
divider: true, divider: true,
}, },
{ {
icon: 'dashicons:align-center', icon: 'i-dashicons:align-center',
event: MenuEventEnum.CLOSE_OTHER, event: MenuEventEnum.CLOSE_OTHER,
text: t('layout.multipleTab.closeOther'), text: t('layout.multipleTab.closeOther'),
disabled: disabled || !isCurItem, disabled: disabled || !isCurItem,
}, },
{ {
icon: 'clarity:minus-line', icon: 'i-clarity:minus-line',
event: MenuEventEnum.CLOSE_ALL, event: MenuEventEnum.CLOSE_ALL,
text: t('layout.multipleTab.closeAll'), text: t('layout.multipleTab.closeAll'),
disabled, disabled,

2
src/router/routes/index.ts

@ -64,7 +64,7 @@ export const ProfileRoute: AppRouteRecordRaw = {
canTo: true, canTo: true,
hidden: true, hidden: true,
noTagsView: false, noTagsView: false,
icon: 'ant-design:user-outlined', icon: 'i-ant-design:user-outlined',
title: t('routes.basic.profile'), title: t('routes.basic.profile'),
}, },
}, },

2
src/views/base/profile/BaseSetting.vue

@ -61,7 +61,7 @@ async function handleSubmit() {
<CropperAvatar <CropperAvatar
:value="avatar" :value="avatar"
btn-text="更换头像" btn-text="更换头像"
:btn-props="{ preIcon: 'ant-design:cloud-upload-outlined' }" :btn-props="{ preIcon: 'i-ant-design:cloud-upload-outlined' }"
width="150" width="150"
class="mb-4 block rounded-full" class="mb-4 block rounded-full"
@change="updateAvatar" @change="updateAvatar"

4
src/views/system/notify/my/index.vue

@ -88,10 +88,10 @@ function handleInfo(record: any) {
<div> <div>
<BasicTable bordered @register="registerTable"> <BasicTable bordered @register="registerTable">
<template #toolbar> <template #toolbar>
<a-button pre-icon="solar:check-read-line-duotone" type="primary" :disabled="readedDisabled" @click="handleUpdateList"> <a-button pre-icon="i-solar:check-read-line-duotone" type="primary" :disabled="readedDisabled" @click="handleUpdateList">
标记已读 标记已读
</a-button> </a-button>
<a-button pre-icon="solar:check-read-linear" type="primary" @click="handleUpdateAll"> <a-button pre-icon="i-solar:check-read-linear" type="primary" @click="handleUpdateAll">
全部已读 全部已读
</a-button> </a-button>
</template> </template>