iter(g82): 文件选择补类型体积数量校验

This commit is contained in:
HIsheR
2026-10-26 13:00:20 +08:00
parent 9dfe9cfac5
commit 37412b31ef
8 changed files with 83 additions and 27 deletions
+2 -2
View File
@@ -730,10 +730,10 @@ const content = h(
h(
'div',
{ class: 'row' },
upload({ multiple: true, hint: '点击或拖拽多个文件到此处', onChange: (fs2) => pickedFiles(fs2.map((f) => f.name).join('、')) }),
upload({ multiple: true, maxCount: 3, maxSize: 2 * 1024 * 1024, hint: '多选(上限 3 个 / 单个 2 MB)', onChange: (fs2) => pickedFiles(fs2.map((f) => f.name).join('、')) }),
h('span', { class: 'out' }, () => (pickedFiles() ? `已选:${pickedFiles()}` : '未选择文件')),
),
h('div', { class: 'row' }, upload({ accept: 'image/*', hint: '仅图片(accept: image/*)' }), upload({ disabled: true, hint: '禁用态' })),
h('div', { class: 'row' }, upload({ accept: 'image/*', hint: '仅图片(accept: image/*,拖拽同样拦)' }), upload({ disabled: true, hint: '禁用态' })),
),
section(
'sec-notification',