File tree Expand file tree Collapse file tree 4 files changed +24
-7
lines changed
Expand file tree Collapse file tree 4 files changed +24
-7
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,20 @@ toc: false
55docClass : timeline
66---
77
8+ ## 🌈 1.11.1 ` 2025-03-07 `
9+ ### 🚀 Features
10+ - ` ImageViewer ` @Wesley-0808
11+ - 新增` imageReferrerpolicy ` API,适用于需要配置` Referrerpolicy ` 的场景([ #3516 ] ( https://github.com/Tencent/tdesign-vue/pull/3516 ) )
12+ - 新增` onDownload ` API,用于需要自定义下载回调的场景 ([ #3516 ] ( https://github.com/Tencent/tdesign-vue/pull/3516 ) )
13+ - ` DatePicker ` : 调整组件禁用日期` before ` 和` after ` 参数的逻辑,调整为禁用` before ` 定义之前和` after ` 定义之后的日期选择,更符合使用习惯。此前有使用相关 API 请注意此改动 @RSS1102 ([ #3511 ] ( https://github.com/Tencent/tdesign-vue/pull/3511 ) )
14+ - ` Upload ` : 支持表单禁用功能作用到上传组件 @RSS1102 ([ #3525 ] ( https://github.com/Tencent/tdesign-vue/pull/3525 ) )
15+
16+ ### 🐞 Bug Fixes
17+ - ` Select ` : 修复多选情况下移除标签时,` trigger ` 参数值错误的问题 @betavs ([ #3509 ] ( https://github.com/Tencent/tdesign-vue/pull/3509 ) )
18+ - ` Message ` : 修复连续调用messagePlugin时,返回的实例不正确的问题 @maoyiluo ([ #3514 ] ( https://github.com/Tencent/tdesign-vue/pull/3514 ) )
19+ - ` Dialog ` : 自定义 ` cancelBtn ` 文本时保留 ` t-dialog__cancel ` 样式 @RSS1102 ([ #3528 ] ( https://github.com/Tencent/tdesign-vue/pull/3528 ) )
20+ - ` Bundle ` : 修复` 1.11.0 ` 的产物中的` cjs ` 在 node 20 以下的使用异常的问题 @uyarn ([ #3512 ] ( https://github.com/Tencent/tdesign-vue/pull/3512 ) )
21+
822## 🌈 1.11.0 ` 2025-02-21 `
923### 🚀 Features
1024- ` Drawer ` : sizeDraggable支持SizeDragLimit类型 @huangchen1031 ([ #3465 ] ( https://github.com/Tencent/tdesign-vue/pull/3465 ) )
Original file line number Diff line number Diff line change 11{
22 "name" : " tdesign-vue" ,
33 "purename" : " tdesign" ,
4- "version" : " 1.11.0 " ,
4+ "version" : " 1.11.1 " ,
55 "description" : " tdesign-vue" ,
66 "title" : " tdesign-vue" ,
77 "keywords" : [
Original file line number Diff line number Diff line change 55import TImageViewerIcon from './ImageModalIcon' ;
66import TToolTip from '../../tooltip' ;
77import { useConfig } from '../../hooks/useConfig' ;
8- import { downloadFile } from '../utils' ;
98import { useImagePreviewUrl } from '../../hooks' ;
109import { ImageInfo } from '../type' ;
1110
@@ -88,7 +87,7 @@ export default defineComponent({
8887 < TImageViewerIcon
8988 icon = { ( ) => < DownloadIcon size = "medium" /> }
9089 clickHandler = { ( ) => {
91- downloadFile ( this . previewUrl ) ;
90+ this . downloadHandler ( this . previewUrl ) ;
9291 } }
9392 />
9493 ) }
Original file line number Diff line number Diff line change @@ -26,13 +26,13 @@ export default defineComponent({
2626 prop : 'visible' ,
2727 event : 'change' ,
2828 } ,
29- setup ( props , { emit } ) {
29+ setup ( props , { emit, listeners } ) {
3030 const classPrefix = usePrefixClass ( ) ;
3131 const COMPONENT_NAME = usePrefixClass ( 'image-viewer' ) ;
3232 const isExpand = ref ( true ) ;
3333 const showOverlayValue = computed ( ( ) => getOverlay ( props ) ) ;
3434
35- const { index, visible, imageReferrerpolicy } = toRefs ( props ) ;
35+ const { index, visible } = toRefs ( props ) ;
3636 const [ indexValue , setIndexValue ] = useDefaultValue (
3737 index ,
3838 props . defaultIndex ?? 0 ,
@@ -93,7 +93,12 @@ export default defineComponent({
9393 } ;
9494
9595 const onDownloadClick = ( url : string ) => {
96- props . onDownload ? props . onDownload ( url ) : downloadFile ( url ) ;
96+ if ( props . onDownload || listeners . download ) {
97+ props . onDownload ?.( url ) ;
98+ emit ( 'download' , url ) ;
99+ return ;
100+ }
101+ downloadFile ( url ) ;
97102 } ;
98103
99104 const openHandler = ( ) => {
@@ -217,7 +222,6 @@ export default defineComponent({
217222 containerRef,
218223 keydownHandler,
219224 divRef,
220- imageReferrerpolicy,
221225 } ;
222226 } ,
223227 methods : {
You can’t perform that action at this time.
0 commit comments