【问题标题】:Hiding Upload button of kendo upload隐藏剑道上传的上传按钮
【发布时间】:2015-12-17 10:59:59
【问题描述】:

我想隐藏剑道上传的“上传文件”按钮,因为我正在使用我的自定义按钮上传文件。

我已经在剑道上传的选择文件上写了代码,

function onSelect() {
    $('.k-upload-selected').css("display", "none");
}

我也尝试过使用以下 css,

.k-upload-selected{
    display: none;
}

但是上传按钮还在……

请帮帮我..

【问题讨论】:

    标签: kendo-ui kendo-upload


    【解决方案1】:

    你可以简单地使用

    $(".k-button.k-upload-button").css("visibility", "hidden");

    在初始化小部件之后。 Example Dojo

    【讨论】:

      【解决方案2】:

      隐藏:

      $('.k-upload-selected').css('visibility', 'hidden');
      

      彻底删除

      $('.k-upload-selected').remove();
      

      Dojo example

      【讨论】:

        【解决方案3】:

        你只需使用

        <style>
          .k-clear-selected, .k-upload-selected{
            display: none !important;
          }
        </style>
        

        Dojo example

        【讨论】:

          【解决方案4】:

          如果您使用 Kendo for Angular,您需要将组件中的 encapsulation 设置为 ViewEncapsulation.None

          @Component({
              selector: 'upload-selector',
              templateUrl: 'upload.component.html',
              styleUrls: ['upload.css'],
              encapsulation: ViewEncapsulation.None
          })
          

          【讨论】:

            猜你喜欢
            • 1970-01-01
            • 2018-01-22
            • 1970-01-01
            • 1970-01-01
            • 1970-01-01
            • 1970-01-01
            • 1970-01-01
            • 1970-01-01
            • 1970-01-01
            相关资源
            最近更新 更多