2
0
mirror of https://github.com/tusen-ai/naive-ui.git synced 2025-04-24 15:01:22 +08:00

fix(image): download icon

This commit is contained in:
07akioni 2024-04-24 00:48:49 +08:00
parent fb1a86cfe8
commit 4845729961
4 changed files with 6 additions and 17 deletions

@ -33,6 +33,7 @@
- `n-scrollbar` adds `content-style` and `content-class` props, closes [#4497](https://github.com/tusen-ai/naive-ui/issues/4497).
- `n-image` adds `render-toolbar` prop.
- `n-cascader` adds `get-column-style` prop.
- `n-image` optimizes download icon style.
## 2.38.1

@ -33,6 +33,7 @@
- `n-scrollbar` 新增 `content-style``content-class` 属性,关闭 [#4497](https://github.com/tusen-ai/naive-ui/issues/4497)
- `n-image` 新增 `render-toolbar` 属性
- `n-cascader` 新增 `get-column-width` 属性
- `n-image` 优化下载按钮图标
## 2.38.1

@ -27,14 +27,15 @@ import {
RotateCounterclockwiseIcon,
ZoomInIcon,
ZoomOutIcon,
ResizeSmallIcon
ResizeSmallIcon,
DownloadIcon
} from '../../_internal/icons'
import { useConfig, useLocale, useTheme, useThemeClass } from '../../_mixins'
import { NBaseIcon } from '../../_internal'
import { download } from '../../_utils'
import { NTooltip } from '../../tooltip'
import { imageLight } from '../styles'
import { prevIcon, nextIcon, closeIcon, downloadIcon } from './icons'
import { prevIcon, nextIcon, closeIcon } from './icons'
import {
imageContextKey,
type MoveStrategy,
@ -539,7 +540,7 @@ export default defineComponent({
const downloadNode = withTooltip(
<NBaseIcon clsPrefix={clsPrefix} onClick={this.handleDownloadClick}>
{{ default: () => downloadIcon }}
{{ default: () => <DownloadIcon /> }}
</NBaseIcon>,
'tipDownload'
)

@ -26,17 +26,3 @@ export const closeIcon = (
/>
</svg>
)
export const downloadIcon = (
<svg
xmlns="http://www.w3.org/2000/svg"
width="32"
height="32"
viewBox="0 0 1024 1024"
>
<path
fill="currentColor"
d="M505.7 661a8 8 0 0 0 12.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"
/>
</svg>
)