From 139898209fea4559a69cbaffed2e7b45b91aa107 Mon Sep 17 00:00:00 2001 From: Feng Date: Thu, 4 Apr 2024 23:59:55 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E2=9C=A8=20img=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E7=9A=84mode=E5=B1=9E=E6=80=A7=E5=A2=9E=E5=8A=A0=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B`ImageMode`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mode有了类型后就不需要再去赋值mode了,直接类型提示+回车 --- docs/component/img.md | 2 +- src/pages/img/Index.vue | 4 +++- .../wot-design-uni/components/wd-img/types.ts | 17 ++++++++++++++++- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/docs/component/img.md b/docs/component/img.md index 0d9020ac..24055ff3 100644 --- a/docs/component/img.md +++ b/docs/component/img.md @@ -78,7 +78,7 @@ mode为小程序原生属性,参考[微信小程序image官方文档](https:// | src | 图片链接 | string | - | - | - | | width | 宽度,默认单位为px | number / string | - | - | - | | height | 高度,默认单位为px | number / string | - | - | - | -| mode | 填充模式 | string | 'top left' / 'top right' / 'bottom left' / 'bottom right' / 'right' / 'left' / 'center' / 'bottom' / 'top' / 'heightFix' / 'widthFix' / 'aspectFill' / 'aspectFit' / 'scaleToFill' | 'scaleToFill' | - | +| mode | 填充模式 | ImageMode | 'top left' / 'top right' / 'bottom left' / 'bottom right' / 'right' / 'left' / 'center' / 'bottom' / 'top' / 'heightFix' / 'widthFix' / 'aspectFill' / 'aspectFit' / 'scaleToFill' | 'scaleToFill' | - | | round | 是否显示为圆形 | boolean | - | false | - | | radius | 圆角大小,默认单位为px | number / string | - | - | - | | enable-preview | 是否支持点击预览 | boolean | - | false | - | diff --git a/src/pages/img/Index.vue b/src/pages/img/Index.vue index 7b005c83..30491cf4 100644 --- a/src/pages/img/Index.vue +++ b/src/pages/img/Index.vue @@ -41,7 +41,9 @@