Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix:uploader组件增加单张只读属性 #3270

Merged
merged 6 commits into from
Jun 16, 2020
Merged

Conversation

wangyingbo
Copy link
Contributor

uploader组件,deletable属性只能控制全局是否可以删除,不能控制单张图片是否可删除;因此当fileList内为对象时,增加onlyRead标识,当onlyRead为true时,单张不显示删除icon。

uploader组件,deletable属性只能控制全局是否可以删除,不能控制单张图片是否可删除,因此当fileList内为对象时,增加onlyRead标识,当onlyRead为true时,单张不显示删除icon;
uploader组件,deletable属性只能控制全局是否可以删除,不能控制单张图片是否可删除,因此当fileList内为对象时,增加onlyRead标识,当onlyRead为true时,单张不显示删除icon;
refactor:uoloader组件增加单张只读属性
@huwenkang99
Copy link

是否有必要添加这个功能?我觉的没有,不让删除的图片不用这包裹就好了,感觉需求不大。

@wangyingbo
Copy link
Contributor Author

wangyingbo commented Jun 11, 2020

是否有必要添加这个功能?我觉的没有,不让删除的图片不用这包裹就好了,感觉需求不大。

可能业务情况不同吧,我们的需求是服务端默认显示的图片或者上一次上传的图片,在回显详情的时候不让删除,但可以继续添加新图片,新图片是可以删除的,为了UI一致性和美观,不让删除的和可以删除的都用了uploader包裹,这样全局的是否可删除属性就不够用了。
image

@@ -38,7 +38,7 @@
<text wx:if="{{ item.message }}" class="van-uploader__upload-text">{{ item.message }}</text>
</view>
<view
wx:if="{{ deletable }}"
wx:if="{{ deletable && !item.onlyRead }}"
Copy link
Member

@chenjiahan chenjiahan Jun 11, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

推荐命名为 item.deletable,并补充到文档中

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修改了代码,并更新了文档了

@wangyingbo
Copy link
Contributor Author

修改内容:
1、更改命名为:item.deletable;
2、文档增加了对图片编辑状态的字段说明;

@rex-zsd rex-zsd merged commit d35649e into youzan:dev Jun 16, 2020
@rex-zsd rex-zsd added this to the 1.3.3 milestone Jun 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants