jianghu-ui 1.0.6 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/dist/jianghu-ui.css +195 -132
  2. package/dist/jianghu-ui.js +1 -1
  3. package/package.json +1 -1
  4. package/src/components/JhDrawer/JhDrawer.stories.js +6 -6
  5. package/src/components/JhDrawer/JhDrawer.vue +7 -1
  6. package/src/components/JhDrawerForm/JhDrawerForm.stories.js +161 -0
  7. package/src/components/JhDrawerForm/JhDrawerForm.vue +1 -1
  8. package/src/components/JhForm/JhForm.stories.js +114 -95
  9. package/src/components/JhForm/JhForm.vue +896 -205
  10. package/src/components/JhFormFields/JhFormFields.vue +42 -16
  11. package/src/components/JhModal/JhModal.stories.js +6 -6
  12. package/src/components/JhModal/JhModal.vue +1 -1
  13. package/src/components/JhModalForm/JhModalForm.vue +1 -1
  14. package/src/components/JhTable/JhTable.stories.js +134 -167
  15. package/src/components/JhTable/JhTable.vue +83 -23
  16. package/src/style/globalCSSVuetifyV4.css +1 -2
  17. package/src/components/JhAddressSelect/JhAddressSelect.md +0 -267
  18. package/src/components/JhCard/JhCard.md +0 -246
  19. package/src/components/JhCheckCard/JhCheckCard.md +0 -245
  20. package/src/components/JhConfirmDialog/JhConfirmDialog.md +0 -70
  21. package/src/components/JhDateRangePicker/JhDateRangePicker.md +0 -56
  22. package/src/components/JhDescriptions/JhDescriptions.md +0 -724
  23. package/src/components/JhDraggable/JhDraggable.md +0 -66
  24. package/src/components/JhDrawer/JhDrawer.md +0 -68
  25. package/src/components/JhDrawerForm/JhDrawerForm.md +0 -69
  26. package/src/components/JhEditableTable/JhEditableTable.md +0 -507
  27. package/src/components/JhFileInput/JhFileInput.md +0 -56
  28. package/src/components/JhForm/JhForm.md +0 -676
  29. package/src/components/JhFormFields/JhFormFields.md +0 -647
  30. package/src/components/JhFormList/JhFormList.md +0 -303
  31. package/src/components/JhJsonEditor/JhJsonEditor.md +0 -54
  32. package/src/components/JhLayout/JhLayout.md +0 -580
  33. package/src/components/JhList/JhList.md +0 -441
  34. package/src/components/JhMarkdownEditor/JhMarkdownEditor.md +0 -56
  35. package/src/components/JhMask/JhMask.md +0 -62
  36. package/src/components/JhMenu/JhMenu.md +0 -85
  37. package/src/components/JhModal/JhModal.md +0 -68
  38. package/src/components/JhModalForm/JhModalForm.md +0 -69
  39. package/src/components/JhPageContainer/JhPageContainer.md +0 -409
  40. package/src/components/JhQueryFilter/JhQueryFilter.md +0 -77
  41. package/src/components/JhScene/JhScene.md +0 -64
  42. package/src/components/JhStatisticCard/JhStatisticCard.md +0 -363
  43. package/src/components/JhStepsForm/JhStepsForm.md +0 -666
  44. package/src/components/JhTable/JhTable.md +0 -730
  45. package/src/components/JhTableAttachment/JhTableAttachment.md +0 -70
  46. package/src/components/JhToast/JhToast.md +0 -67
  47. package/src/components/JhTreeSelect/JhTreeSelect.md +0 -82
  48. package/src/components/JhWaterMark/JhWaterMark.md +0 -190
  49. package/src/components/README.md +0 -52
@@ -1,56 +0,0 @@
1
- # JhFileInput - 文件上传输入框
2
-
3
- JhFileInput 封装常见图片/附件上传场景,支持单选、多选、预览、删除、数量限制等能力。
4
-
5
- ## 功能特性
6
-
7
- - 🖼️ **实时预览**:自动识别图片并展示缩略图,非图片显示图标
8
- - ♻️ **多源值支持**:兼容字符串路径、字符串数组、File 对象数组
9
- - 🚦 **数量/类型限制**:`maxFiles`、`accept` 控制上传数量与格式
10
- - 📤 **校验规则**:通过 `rules` 注入函数即可实现自定义校验
11
- - 🚫 **只读模式**:设置 `readonly` 即可禁止上传与删除
12
-
13
- ## 基础用法
14
-
15
- ```vue
16
- <template>
17
- <jh-file-input
18
- v-model="files"
19
- multiple
20
- :max-files="5"
21
- accept="image/*"
22
- :rules="[(val) => val.length > 0 || '请至少上传一张图片']"
23
- />
24
- </template>
25
- ```
26
-
27
- ## API
28
-
29
- ### Props
30
-
31
- | 参数 | 说明 | 类型 | 默认值 |
32
- | --- | --- | --- | --- |
33
- | value | `v-model`,可为字符串或 File 数组 | string \| Array | [] |
34
- | maxFiles | 最大上传数量,0 表示不限制 | number | 0 |
35
- | accept | input accept 属性 | string | `*/*` |
36
- | multiple | 是否多选 | boolean | false |
37
- | rules | 额外验证函数数组,返回 `true` 或错误消息 | Function[] | [] |
38
- | readonly | 是否只读 | boolean | false |
39
- | uploadPrefix | 拼接在字符串路径前的前缀 | string | `/upload/` |
40
-
41
- ### Events
42
-
43
- | 事件名 | 说明 | 回调参数 |
44
- | --- | --- | --- |
45
- | input | `v-model` 更新 | (files: Array \| string) |
46
- | change | 同步触发,便于监听 | (files: Array \| string) |
47
-
48
- ### Slots
49
-
50
- 组件无自定义插槽。
51
-
52
- ## 使用建议
53
-
54
- - 需要与后端路径解耦时,可以在回显时传入字符串数组,上传时转换为 `FormData`
55
- - 对于大文件建议结合外部上传接口,`rules` 中可校验文件大小/类型
56
- - 读写 File 对象时注意浏览器无法直接序列化,必要时把 meta 信息保存到其他字段