Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: upload: accept and label
  • Loading branch information
yuhldr committed Apr 15, 2025
commit 92733d5a4fa447ec65ce004daf1d56efdbdba588
4 changes: 3 additions & 1 deletion playground/src/locales/langs/en-US/examples.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
"api": "Api",
"merge": "Merge Form",
"upload-error": "Partial file upload failed",
"upload-urls": "Urls after file upload"
"upload-urls": "Urls after file upload",
"file": "file",
"upload-image": "Click to upload image"
},
"vxeTable": {
"title": "Vxe Table",
Expand Down
4 changes: 3 additions & 1 deletion playground/src/locales/langs/zh-CN/examples.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
"api": "Api",
"merge": "合并表单",
"upload-error": "部分文件上传失败",
"upload-urls": "文件上传后的网址"
"upload-urls": "文件上传后的网址",
"file": "文件",
"upload-image": "点击上传图片"
},
"vxeTable": {
"title": "Vxe 表格",
Expand Down
6 changes: 3 additions & 3 deletions playground/src/views/examples/form/basic.vue
Original file line number Diff line number Diff line change
Expand Up @@ -333,18 +333,18 @@ const [BaseForm, baseFormApi] = useVbenForm({
{
component: 'Upload',
componentProps: {
accept: '.png,.jpg,jpeg',
accept: '.png,.jpg,.jpeg',
customRequest: upload_file,
disabled: false,
maxCount: 1,
multiple: false,
showUploadList: true,
},
fieldName: 'files',
label: '文件',
label: $t('examples.form.file'),
renderComponentContent: () => {
return {
default: () => '点击上传图片',
default: () => $t('examples.form.upload-image'),
};
},
rules: 'required',
Expand Down