primefaces / sakai-vue-cli

Free Vue Admin Template by PrimeVue
https://www.primefaces.org/sakai-vue
MIT License
454 stars 204 forks source link

FileDemo missing label props #12

Closed tbarkley closed 3 years ago

tbarkley commented 3 years ago

In the file upload demo, if you do not add label props to the FileUpload component, it will fail to render as it's unable to find this.$primevue.config

Exception (Uncaught (in promise) TypeError: Cannot read property 'locale' of undefined)

FileDemo.vue <FileUpload name="demo[]" url="./upload.php" @upload="onUpload" :multiple="true" accept="image/*" :maxFileSize="1000000"/>

FileUpload.vue


chooseButtonLabel() {
      //fails here at this.$primevue.config
      return this.chooseLabel || this.$primevue.config.locale.choose;
},
uploadButtonLabel() {
    return this.uploadLabel || this.$primevue.config.locale.upload;
},
cancelButtonLabel() {
    return this.cancelLabel || this.$primevue.config.locale.cancel;
}
jerry771230 commented 3 years ago

try this

https://primefaces.org/primevue/showcase/#/locale

tugcekucukoglu commented 3 years ago

Please try PrimeVue 3.3.5