Vaadin 上传组件上传按钮,更改其样式? [英] Vaadin Upload Component Upload Button, changing it's Style?

查看:42
本文介绍了Vaadin 上传组件上传按钮,更改其样式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

瓦丁 7.6.2

如何在上传组件的上传按钮上应用 setStyleName("small") 并使其工作?如果这需要自定义 CSS,最好能看到一个示例.这个问题是针对上传按钮的,而不是浏览"按钮,在我的情况下,它已被 setImmediate(true) 隐藏.

How to apply setStyleName("small") on an Upload component’s upload button and have it work? If this requires custom CSS it would be great to see an example of what that looks like. This question is for the Upload Button, not the "browse" button, which has been hidden by setImmediate(true) in my case.

推荐答案

将此 scss 用于小型上传按钮:

Use this scss for the small upload buttons:

.v-upload-small .v-button
{
    height: 31px;
    padding: 0 14px;
    font-size: 14px;
    border-radius: 4px;
}

在上传按钮上使用 addStyleName("small") 而不是 setStyleName(...)

And on the upload button use the addStyleName("small") instead of setStyleName(...)

这篇关于Vaadin 上传组件上传按钮,更改其样式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆