Skip to content

Upload组件图片显示不完整 #3305

@wuyihao1992

Description

@wuyihao1992

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch @nutui/nutui-taro@4.0.7 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/@nutui/nutui-taro/dist/packages/_es/Uploader.js b/node_modules/@nutui/nutui-taro/dist/packages/_es/Uploader.js
index aff65e5..eabaf85 100644
--- a/node_modules/@nutui/nutui-taro/dist/packages/_es/Uploader.js
+++ b/node_modules/@nutui/nutui-taro/dist/packages/_es/Uploader.js
@@ -529,7 +529,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
           ["image", "video"].includes(item.type) && item.url ? (openBlock(), createElementBlock("img", {
             key: 2,
             class: "nut-uploader__preview-img__c",
-            mode: "aspectFit",
+            mode: "aspectFill",
             onClick: ($event) => _ctx.fileItemClick(item),
             src: item.url
           }, null, 8, _hoisted_6)) : (openBlock(), createElementBlock("view", _hoisted_7, [

This issue body was partially generated by patch-package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions