【问题标题】:Kendo Angular upload "multiple = false" and the button still says "Select Files"Kendo Angular上传“multiple = false”,按钮仍然显示“选择文件”
【发布时间】:2018-08-10 22:01:07
【问题描述】:

Plunker 在这里: https://plnkr.co/edit/hzH1C1ZGIdyQPcu5kokA?p=info

import { Component } from '@angular/core';

@Component({
selector: 'my-upload',
template: `
<kendo-upload
 [saveUrl]="uploadSaveUrl"
 [removeUrl]="uploadRemoveUrl"
 [multiple]="false">
</kendo-upload>
 `
})
export class UploadComponent {
uploadSaveUrl = 'saveUrl'; // should represent an actual API endpoint
uploadRemoveUrl = 'removeUrl';
}

按钮应该真的是“选择文件...”,因为你只能选择一个,那我该如何更改呢?

【问题讨论】:

    标签: angular kendo-ui upload


    【解决方案1】:

    据我所知,上传组件不支持复数。

    文本Select files... 只是他们的默认消息。 (不同的翻译可以找到here

    但是您可以通过将kendo-upload-messages 组件嵌套在kendo-upload 标记中来覆盖使用的消息。 (API Reference)

    <kendo-upload
        ...
    >
        <kendo-upload-messages
            select="Select file..."
        >
        </kendo-upload-messages>
    </kendo-upload>
    

    我还分叉了你的Plunker

    【讨论】:

      猜你喜欢
      • 2012-12-30
      • 2022-01-12
      • 2020-04-28
      • 2012-02-16
      • 1970-01-01
      • 2015-10-01
      • 1970-01-01
      • 1970-01-01
      • 2016-06-19
      相关资源
      最近更新 更多