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

问题描述 投票:0回答:1

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个回答
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

© www.soinside.com 2019 - 2024. All rights reserved.