pull/5756/head
tugcekucukoglu 2024-05-13 15:35:52 +03:00
parent dc1a062225
commit 3fabb33fc5
4 changed files with 6 additions and 6 deletions

View File

@ -393,7 +393,7 @@ export interface PrimeVueLocaleOptions {
emptySearchMessage?: string;
emptyMessage?: string;
fileChosenMessage?: string;
emptyFileChosenMessage?: string;
noFileChosenMessage?: string;
aria?: PrimeVueLocaleAriaOptions;
}

View File

@ -73,7 +73,7 @@ export const defaultOptions = {
emptySelectionMessage: 'No selected item',
emptySearchMessage: 'No results found',
fileChosenMessage: '{0} files',
emptyFileChosenMessage: 'No file chosen',
noFileChosenMessage: 'No file chosen',
emptyMessage: 'No available options',
aria: {
trueLabel: 'True',

View File

@ -56,7 +56,7 @@
</Button>
<slot v-if="!auto" name="filelabel" :class="cx('filelabel')">
<span :class="cx('filelabel')" :files="files">
{{ basicChooseButtonLabel }}
{{ basicFileChosenLabel }}
</span>
</slot>
<input v-if="!hasFiles" ref="fileInput" type="file" :accept="accept" :disabled="disabled" :multiple="multiple" @change="onFileSelect" @focus="onFocus" @blur="onBlur" v-bind="ptm('input')" />
@ -379,7 +379,7 @@ export default {
chooseButtonClass() {
return [this.cx('pcChooseButton'), this.class];
},
basicChooseButtonLabel() {
basicFileChosenLabel() {
if (this.auto) return this.chooseButtonLabel;
else if (this.hasFiles) {
if (this.files && this.files.length === 1) return this.files[0].name;
@ -387,7 +387,7 @@ export default {
return this.$primevue.config.locale?.fileChosenMessage?.replace('{0}', this.files.length);
}
return this.$primevue.config.locale?.emptyFileChosenMessage || '';
return this.$primevue.config.locale?.noFileChosenMessage || '';
},
hasFiles() {
return this.files && this.files.length > 0;

View File

@ -277,7 +277,7 @@
<td>{0} files</td>
</tr>
<tr>
<td>emptyFileChosenMessage</td>
<td>noFileChosenMessage</td>
<td>No file chosen</td>
</tr>
<tr>