Kendo Angular上传" multiple = false"按钮仍然显示"选择文件"

时间:2018-03-02 16:30:32

标签: angular kendo-ui upload

此处有采访者: 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';
}

按钮应该说&#34;选择文件......&#34;因为你只能选择一个,所以我该如何改变呢?

1 个答案:

答案 0 :(得分:1)

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

文字Select files...只是他们的默认信息。 (可以找到不同的翻译https://github.com/facebook/react-native/issues/10404#issuecomment-267303151

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

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

我还分叉了你的API Reference