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.
- package/dist/jianghu-ui.css +195 -132
- package/dist/jianghu-ui.js +1 -1
- package/package.json +1 -1
- package/src/components/JhDrawer/JhDrawer.stories.js +6 -6
- package/src/components/JhDrawer/JhDrawer.vue +7 -1
- package/src/components/JhDrawerForm/JhDrawerForm.stories.js +161 -0
- package/src/components/JhDrawerForm/JhDrawerForm.vue +1 -1
- package/src/components/JhForm/JhForm.stories.js +114 -95
- package/src/components/JhForm/JhForm.vue +896 -205
- package/src/components/JhFormFields/JhFormFields.vue +42 -16
- package/src/components/JhModal/JhModal.stories.js +6 -6
- package/src/components/JhModal/JhModal.vue +1 -1
- package/src/components/JhModalForm/JhModalForm.vue +1 -1
- package/src/components/JhTable/JhTable.stories.js +134 -167
- package/src/components/JhTable/JhTable.vue +83 -23
- package/src/style/globalCSSVuetifyV4.css +1 -2
- package/src/components/JhAddressSelect/JhAddressSelect.md +0 -267
- package/src/components/JhCard/JhCard.md +0 -246
- package/src/components/JhCheckCard/JhCheckCard.md +0 -245
- package/src/components/JhConfirmDialog/JhConfirmDialog.md +0 -70
- package/src/components/JhDateRangePicker/JhDateRangePicker.md +0 -56
- package/src/components/JhDescriptions/JhDescriptions.md +0 -724
- package/src/components/JhDraggable/JhDraggable.md +0 -66
- package/src/components/JhDrawer/JhDrawer.md +0 -68
- package/src/components/JhDrawerForm/JhDrawerForm.md +0 -69
- package/src/components/JhEditableTable/JhEditableTable.md +0 -507
- package/src/components/JhFileInput/JhFileInput.md +0 -56
- package/src/components/JhForm/JhForm.md +0 -676
- package/src/components/JhFormFields/JhFormFields.md +0 -647
- package/src/components/JhFormList/JhFormList.md +0 -303
- package/src/components/JhJsonEditor/JhJsonEditor.md +0 -54
- package/src/components/JhLayout/JhLayout.md +0 -580
- package/src/components/JhList/JhList.md +0 -441
- package/src/components/JhMarkdownEditor/JhMarkdownEditor.md +0 -56
- package/src/components/JhMask/JhMask.md +0 -62
- package/src/components/JhMenu/JhMenu.md +0 -85
- package/src/components/JhModal/JhModal.md +0 -68
- package/src/components/JhModalForm/JhModalForm.md +0 -69
- package/src/components/JhPageContainer/JhPageContainer.md +0 -409
- package/src/components/JhQueryFilter/JhQueryFilter.md +0 -77
- package/src/components/JhScene/JhScene.md +0 -64
- package/src/components/JhStatisticCard/JhStatisticCard.md +0 -363
- package/src/components/JhStepsForm/JhStepsForm.md +0 -666
- package/src/components/JhTable/JhTable.md +0 -730
- package/src/components/JhTableAttachment/JhTableAttachment.md +0 -70
- package/src/components/JhToast/JhToast.md +0 -67
- package/src/components/JhTreeSelect/JhTreeSelect.md +0 -82
- package/src/components/JhWaterMark/JhWaterMark.md +0 -190
- package/src/components/README.md +0 -52
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
# JhTableAttachment - 附件分组面板
|
|
2
|
-
|
|
3
|
-
JhTableAttachment 专注于以卡片方式呈现附件列表,内置分组、搜索、预览、下载、删除等能力,可作为表格附件详情的补充。
|
|
4
|
-
|
|
5
|
-
## 功能特性
|
|
6
|
-
|
|
7
|
-
- 🗂️ **分组展示**:按 `groupBy` 字段将附件划分多个卡片区域
|
|
8
|
-
- 🔍 **内置搜索**:顶部输入框可实时过滤文件名/类型
|
|
9
|
-
- 👀 **预览能力**:图片类附件支持放大预览,其他类型显示文件图标
|
|
10
|
-
- 📥 **下载/删除事件**:提供 download/delete 事件,方便接入后台接口
|
|
11
|
-
- ➕ **新增入口**:可展示“新增附件”按钮,自定义上传流程
|
|
12
|
-
|
|
13
|
-
## 基础用法
|
|
14
|
-
|
|
15
|
-
```vue
|
|
16
|
-
<template>
|
|
17
|
-
<jh-table-attachment
|
|
18
|
-
:attachments="attachmentList"
|
|
19
|
-
group-by="category"
|
|
20
|
-
:show-create-button="canEdit"
|
|
21
|
-
@create-click="openUploader"
|
|
22
|
-
@delete="removeAttachment"
|
|
23
|
-
@download="downloadAttachment"
|
|
24
|
-
/>
|
|
25
|
-
</template>
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
## API
|
|
29
|
-
|
|
30
|
-
### Props
|
|
31
|
-
|
|
32
|
-
| 参数 | 说明 | 类型 | 默认值 |
|
|
33
|
-
| --- | --- | --- | --- |
|
|
34
|
-
| attachments | 附件数组 | Array | [] |
|
|
35
|
-
| showCreateButton | 是否显示“新增附件”按钮 | boolean | true |
|
|
36
|
-
| readonly | 是否只读(隐藏删除按钮) | boolean | false |
|
|
37
|
-
| groupBy | 分组字段名 | string | `fileType` |
|
|
38
|
-
| previewPrefix | 预览地址前缀,拼接 `downloadPath` | string | `/upload/` |
|
|
39
|
-
| loading | 是否展示 loading 遮罩 | boolean | false |
|
|
40
|
-
|
|
41
|
-
附件对象推荐结构:
|
|
42
|
-
|
|
43
|
-
```js
|
|
44
|
-
{
|
|
45
|
-
id: 1,
|
|
46
|
-
filename: '合同.pdf',
|
|
47
|
-
downloadPath: '2023/contract.pdf',
|
|
48
|
-
fileType: '合同',
|
|
49
|
-
fileSubtype: 'pdf'
|
|
50
|
-
}
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
### Events
|
|
54
|
-
|
|
55
|
-
| 事件名 | 说明 | 回调参数 |
|
|
56
|
-
| --- | --- | --- |
|
|
57
|
-
| create-click | 点击新增附件按钮 | - |
|
|
58
|
-
| preview | 点击预览按钮 | (item) |
|
|
59
|
-
| download | 点击下载按钮 | (item) |
|
|
60
|
-
| delete | 点击删除按钮 | (item) |
|
|
61
|
-
|
|
62
|
-
### Slots
|
|
63
|
-
|
|
64
|
-
组件暂未开放插槽,如需扩展可 fork 组件进行定制。
|
|
65
|
-
|
|
66
|
-
## 使用建议
|
|
67
|
-
|
|
68
|
-
- 需要与上传接口联动时,可在 `create-click` 中打开上传抽屉,完成后刷新 `attachments`
|
|
69
|
-
- 若后端已返回文件完整 URL,可把 `previewPrefix` 设为空字符串
|
|
70
|
-
- 通过 `readonly` 控制权限,避免无权限用户看到删除按钮
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
# JhToast - 全局提示组件
|
|
2
|
-
|
|
3
|
-
JhToast 基于 `v-snackbar` 封装,提供成功/错误/警告/信息/加载等多种提示效果,可用于全局消息通知。
|
|
4
|
-
|
|
5
|
-
## 功能特性
|
|
6
|
-
|
|
7
|
-
- ⚡ **多状态**:内置 success、error、warning、info、loading 五种风格
|
|
8
|
-
- 📍 **自由定位**:通过 `position` 控制四角/上下等位置
|
|
9
|
-
- 🧭 **按钮扩展**:可同时显示关闭按钮和自定义操作按钮
|
|
10
|
-
- ⏱️ **超时控制**:不同类型可以设置不同的超时时间,loading 默认不自动关闭
|
|
11
|
-
- ✨ **图标自定义**:可传入 icon/iconColor,也可完全隐藏
|
|
12
|
-
|
|
13
|
-
## 基础用法
|
|
14
|
-
|
|
15
|
-
```vue
|
|
16
|
-
<template>
|
|
17
|
-
<jh-toast
|
|
18
|
-
v-model="toast.visible"
|
|
19
|
-
:message="toast.message"
|
|
20
|
-
:type="toast.type"
|
|
21
|
-
position="bottom-right"
|
|
22
|
-
action-text="撤销"
|
|
23
|
-
@action="undo"
|
|
24
|
-
/>
|
|
25
|
-
</template>
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
## API
|
|
29
|
-
|
|
30
|
-
### Props
|
|
31
|
-
|
|
32
|
-
| 参数 | 说明 | 类型 | 默认值 |
|
|
33
|
-
| --- | --- | --- | --- |
|
|
34
|
-
| value | `v-model`,控制显隐 | boolean | false |
|
|
35
|
-
| message | 提示文案 | string | `''` |
|
|
36
|
-
| type | 提示类型 `success/error/warning/info/loading` | string | `success` |
|
|
37
|
-
| position | 显示位置 | string | `top` |
|
|
38
|
-
| timeout | 自动关闭时间(ms),-1 表示常驻 | number | 3000 |
|
|
39
|
-
| color | 自定义背景色 | string | `''` |
|
|
40
|
-
| icon | 自定义图标 | string | `''` |
|
|
41
|
-
| iconColor | 图标颜色 | string | `white` |
|
|
42
|
-
| showCloseButton | 是否显示关闭按钮 | boolean | true |
|
|
43
|
-
| closeButtonText | 关闭按钮文案 | string | `关闭` |
|
|
44
|
-
| closeButtonColor | 关闭按钮颜色 | string | `white` |
|
|
45
|
-
| actionText | 操作按钮文本 | string | `''` |
|
|
46
|
-
| actionButtonColor | 操作按钮颜色 | string | `white` |
|
|
47
|
-
| vertical | 是否垂直布局 | boolean | false |
|
|
48
|
-
| elevation | 阴影高度 | number \| string | 24 |
|
|
49
|
-
| maxLength | 文案裁剪长度 | number | 100 |
|
|
50
|
-
|
|
51
|
-
### Events
|
|
52
|
-
|
|
53
|
-
| 事件名 | 说明 | 回调参数 |
|
|
54
|
-
| --- | --- | --- |
|
|
55
|
-
| input | `v-model` 更新 | (visible: boolean) |
|
|
56
|
-
| close | Toast 消失时触发 | - |
|
|
57
|
-
| action | 点击操作按钮时触发 | - |
|
|
58
|
-
|
|
59
|
-
### Slots
|
|
60
|
-
|
|
61
|
-
组件不提供插槽。
|
|
62
|
-
|
|
63
|
-
## 使用建议
|
|
64
|
-
|
|
65
|
-
- 业务中可封装 store 或 composable,集中管理 `message/type/visible`
|
|
66
|
-
- 加载状态时 `timeout` 会自动变为 `-1`,需手动关闭
|
|
67
|
-
- 若需多实例并存,可在父组件中渲染多个 JhToast 或改用队列
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
# JhTreeSelect - 树形选择器
|
|
2
|
-
|
|
3
|
-
JhTreeSelect 提供多选/单选树对话框,集成搜索、全选、移动端适配和已选列表,适用于组织、权限、分类等层级数据的选择。
|
|
4
|
-
|
|
5
|
-
## 功能特性
|
|
6
|
-
|
|
7
|
-
- 🌳 **多模式**:支持 `multiple`/`single` 两种模式,可选择节点或仅选择叶子
|
|
8
|
-
- 🔍 **即时搜索**:关键字过滤树节点,并支持“全选当前搜索结果”
|
|
9
|
-
- 📱 **响应式**:小屏自动切换全屏弹窗,已选区域在移动端折叠展示
|
|
10
|
-
- 🧺 **批量操作**:内置全选、清除、批量删除已选项
|
|
11
|
-
- 🔁 **受控对话框**:`visible` + `v-model` 统一控制,确认再回传
|
|
12
|
-
|
|
13
|
-
## 基础用法
|
|
14
|
-
|
|
15
|
-
```vue
|
|
16
|
-
<template>
|
|
17
|
-
<jh-tree-select
|
|
18
|
-
v-model="selectedNodes"
|
|
19
|
-
:visible.sync="dialogVisible"
|
|
20
|
-
:data="treeData"
|
|
21
|
-
mode="multiple"
|
|
22
|
-
:allow-select-node="true"
|
|
23
|
-
title="选择部门"
|
|
24
|
-
@confirm="handleConfirm"
|
|
25
|
-
/>
|
|
26
|
-
</template>
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## API
|
|
30
|
-
|
|
31
|
-
### Props
|
|
32
|
-
|
|
33
|
-
| 参数 | 说明 | 类型 | 默认值 |
|
|
34
|
-
| --- | --- | --- | --- |
|
|
35
|
-
| value | `v-model`,选中节点数组 | Array | [] |
|
|
36
|
-
| visible | 弹窗是否显示 | boolean | false |
|
|
37
|
-
| mode | 选择模式 `multiple/single` | string | `multiple` |
|
|
38
|
-
| title | 对话框标题 | string | `选择节点` |
|
|
39
|
-
| placeholder | 搜索框占位符 | string | `搜索节点` |
|
|
40
|
-
| maxWidth | 弹窗最大宽度 | string | `1000px` |
|
|
41
|
-
| data | 树形数据源 | Array | [] |
|
|
42
|
-
| nodeKey | 节点唯一 key 字段名 | string | `id` |
|
|
43
|
-
| nodeLabel | 节点显示字段名 | string | `label` |
|
|
44
|
-
| nodeChildren | 子节点字段名 | string | `children` |
|
|
45
|
-
| allowSelectNode | 是否允许点击节点本身选择 | boolean | false |
|
|
46
|
-
| showSearch | 是否展示搜索框 | boolean | true |
|
|
47
|
-
| showSelectAll | 是否展示全选按钮(仅 multiple) | boolean | true |
|
|
48
|
-
| loading | 数据加载状态 | boolean | false |
|
|
49
|
-
|
|
50
|
-
### Events
|
|
51
|
-
|
|
52
|
-
| 事件名 | 说明 | 回调参数 |
|
|
53
|
-
| --- | --- | --- |
|
|
54
|
-
| input | `v-model` 更新,返回选中节点数组 | (nodes: Array) |
|
|
55
|
-
| update:visible | 同步弹窗开关 | (visible: boolean) |
|
|
56
|
-
| confirm | 点击“确定”后触发 | (nodes: Array) |
|
|
57
|
-
| cancel | 点击“取消”或关闭图标后触发 | - |
|
|
58
|
-
|
|
59
|
-
### Slots
|
|
60
|
-
|
|
61
|
-
组件暂未开放插槽。
|
|
62
|
-
|
|
63
|
-
## 数据结构示例
|
|
64
|
-
|
|
65
|
-
```js
|
|
66
|
-
const treeData = [
|
|
67
|
-
{
|
|
68
|
-
id: 'dept-1',
|
|
69
|
-
label: '总部',
|
|
70
|
-
children: [
|
|
71
|
-
{ id: 'dept-1-1', label: '技术部' },
|
|
72
|
-
{ id: 'dept-1-2', label: '运营部' }
|
|
73
|
-
]
|
|
74
|
-
}
|
|
75
|
-
];
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
## 使用建议
|
|
79
|
-
|
|
80
|
-
- 如果只允许选择叶子节点,可将 `allowSelectNode` 设为 false,并在 `toggleNode` 中自定义策略
|
|
81
|
-
- 需要默认展开其他层级时,可修改组件数据或 fork 组件以暴露更多控制属性
|
|
82
|
-
- 回传的数据为节点对象,包含原始字段,可直接提交给后端或提取 ID
|
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
# JhWaterMark 水印
|
|
2
|
-
|
|
3
|
-
水印组件,参考 Ant Design WaterMark 设计规范。给页面的某个区域加上水印,适用于防止信息盗用。
|
|
4
|
-
|
|
5
|
-
## 何时使用
|
|
6
|
-
|
|
7
|
-
- 页面需要添加水印标识版权时
|
|
8
|
-
- 适用于防止信息盗用的场景
|
|
9
|
-
- 保护敏感数据和机密文档
|
|
10
|
-
|
|
11
|
-
## 基本用法
|
|
12
|
-
|
|
13
|
-
```vue
|
|
14
|
-
<template>
|
|
15
|
-
<jh-water-mark content="江湖 JiangHu">
|
|
16
|
-
<div style="height: 400px;">
|
|
17
|
-
<!-- 你的内容 -->
|
|
18
|
-
</div>
|
|
19
|
-
</jh-water-mark>
|
|
20
|
-
</template>
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## 多行文本
|
|
24
|
-
|
|
25
|
-
```vue
|
|
26
|
-
<template>
|
|
27
|
-
<jh-water-mark :content="['江湖 JiangHu', 'Watermark Demo']">
|
|
28
|
-
<div style="height: 400px;">
|
|
29
|
-
<!-- 你的内容 -->
|
|
30
|
-
</div>
|
|
31
|
-
</jh-water-mark>
|
|
32
|
-
</template>
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
## 图片水印
|
|
36
|
-
|
|
37
|
-
```vue
|
|
38
|
-
<template>
|
|
39
|
-
<jh-water-mark
|
|
40
|
-
:width="130"
|
|
41
|
-
:height="30"
|
|
42
|
-
image="https://example.com/logo.png"
|
|
43
|
-
>
|
|
44
|
-
<div style="height: 400px;">
|
|
45
|
-
<!-- 你的内容 -->
|
|
46
|
-
</div>
|
|
47
|
-
</jh-water-mark>
|
|
48
|
-
</template>
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
## 自定义配置
|
|
52
|
-
|
|
53
|
-
```vue
|
|
54
|
-
<template>
|
|
55
|
-
<jh-water-mark
|
|
56
|
-
content="江湖 JiangHu"
|
|
57
|
-
:width="150"
|
|
58
|
-
:height="80"
|
|
59
|
-
:rotate="-30"
|
|
60
|
-
:gap-x="100"
|
|
61
|
-
:gap-y="100"
|
|
62
|
-
:font="{
|
|
63
|
-
color: 'rgba(0, 0, 0, 0.25)',
|
|
64
|
-
fontSize: 20,
|
|
65
|
-
fontWeight: 'bold'
|
|
66
|
-
}"
|
|
67
|
-
>
|
|
68
|
-
<div style="height: 400px;">
|
|
69
|
-
<!-- 你的内容 -->
|
|
70
|
-
</div>
|
|
71
|
-
</jh-water-mark>
|
|
72
|
-
</template>
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
## API
|
|
76
|
-
|
|
77
|
-
### Props
|
|
78
|
-
|
|
79
|
-
| 参数 | 说明 | 类型 | 默认值 |
|
|
80
|
-
| --- | --- | --- | --- |
|
|
81
|
-
| content | 水印文字内容,支持字符串数组实现多行文本 | `string \| string[]` | `''` |
|
|
82
|
-
| image | 图片源,建议导出 2 倍或 3 倍图,优先级高于文字 | `string` | `''` |
|
|
83
|
-
| width | 水印整体宽度 | `number` | `120` |
|
|
84
|
-
| height | 水印整体高度 | `number` | `64` |
|
|
85
|
-
| rotate | 水印旋转角度 | `number` | `-22` |
|
|
86
|
-
| gapX | 水印之间的水平间距 | `number` | `212` |
|
|
87
|
-
| gapY | 水印之间的垂直间距 | `number` | `222` |
|
|
88
|
-
| offsetX | 水印在 canvas 画布上绘制的水平偏移量,正常情况下,水印绘制在中间位置,即 offsetX = gapX / 2 | `number` | `gapX / 2` |
|
|
89
|
-
| offsetY | 水印在 canvas 画布上绘制的垂直偏移量,正常情况下,水印绘制在中间位置,即 offsetY = gapY / 2 | `number` | `gapY / 2` |
|
|
90
|
-
| font | 字体配置,详见下方 Font 配置 | `object` | 见下方 |
|
|
91
|
-
| zIndex | 水印层的 z-index | `number` | `9` |
|
|
92
|
-
| getContainer | 追加的水印元素的根节点 | `() => HTMLElement` | `undefined` |
|
|
93
|
-
|
|
94
|
-
### Font 配置
|
|
95
|
-
|
|
96
|
-
| 参数 | 说明 | 类型 | 默认值 |
|
|
97
|
-
| --- | --- | --- | --- |
|
|
98
|
-
| color | 字体颜色 | `string` | `'rgba(0, 0, 0, 0.15)'` |
|
|
99
|
-
| fontSize | 字体大小 | `number` | `16` |
|
|
100
|
-
| fontWeight | 字体粗细 | `string \| number` | `'normal'` |
|
|
101
|
-
| fontFamily | 字体类型 | `string` | `'sans-serif'` |
|
|
102
|
-
| fontStyle | 字体样式 | `'none' \| 'normal' \| 'italic' \| 'oblique'` | `'normal'` |
|
|
103
|
-
| textAlign | 文字对齐 | `string` | `'center'` |
|
|
104
|
-
|
|
105
|
-
## 特性
|
|
106
|
-
|
|
107
|
-
### 防删除保护
|
|
108
|
-
|
|
109
|
-
水印组件内置了防删除和防修改机制,使用 `MutationObserver` 监听 DOM 变化:
|
|
110
|
-
|
|
111
|
-
- 即使通过开发者工具删除水印元素,也会自动恢复
|
|
112
|
-
- 即使修改水印元素的样式,也会自动恢复
|
|
113
|
-
- 保证水印始终存在,有效防止信息泄露
|
|
114
|
-
|
|
115
|
-
### Canvas 渲染
|
|
116
|
-
|
|
117
|
-
使用 Canvas 绘制水印,具有以下优势:
|
|
118
|
-
|
|
119
|
-
- 性能优秀,不影响页面渲染
|
|
120
|
-
- 支持文字和图片两种水印类型
|
|
121
|
-
- 支持自定义旋转角度和间距
|
|
122
|
-
- 生成 base64 图片作为背景,浏览器兼容性好
|
|
123
|
-
|
|
124
|
-
### 响应式
|
|
125
|
-
|
|
126
|
-
水印会自动填充整个容器区域,适应不同尺寸的容器。
|
|
127
|
-
|
|
128
|
-
## 使用场景
|
|
129
|
-
|
|
130
|
-
### 文档保护
|
|
131
|
-
|
|
132
|
-
```vue
|
|
133
|
-
<template>
|
|
134
|
-
<jh-water-mark content="机密文档">
|
|
135
|
-
<div class="document">
|
|
136
|
-
<h3>机密文档</h3>
|
|
137
|
-
<p>文档内容...</p>
|
|
138
|
-
</div>
|
|
139
|
-
</jh-water-mark>
|
|
140
|
-
</template>
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
### 数据表格
|
|
144
|
-
|
|
145
|
-
```vue
|
|
146
|
-
<template>
|
|
147
|
-
<jh-water-mark content="内部数据" :font="{ color: 'rgba(0, 0, 0, 0.1)' }">
|
|
148
|
-
<v-data-table :items="items" :headers="headers" />
|
|
149
|
-
</jh-water-mark>
|
|
150
|
-
</template>
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
### 图片预览
|
|
154
|
-
|
|
155
|
-
```vue
|
|
156
|
-
<template>
|
|
157
|
-
<jh-water-mark :content="['设计稿', '仅供预览']">
|
|
158
|
-
<img src="design.png" style="width: 100%;" />
|
|
159
|
-
</jh-water-mark>
|
|
160
|
-
</template>
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
## 注意事项
|
|
164
|
-
|
|
165
|
-
1. **图片水印**:建议使用 2 倍或 3 倍图以保证清晰度
|
|
166
|
-
2. **颜色选择**:建议使用半透明颜色,避免影响内容阅读
|
|
167
|
-
3. **尺寸调整**:较大的字体需要相应增加 width 和 height
|
|
168
|
-
4. **性能考虑**:水印使用 Canvas 渲染,性能优秀,但在极大容器中可能需要注意
|
|
169
|
-
5. **跨域图片**:使用图片水印时,如果图片跨域,需要服务器配置 CORS
|
|
170
|
-
|
|
171
|
-
## 设计规范
|
|
172
|
-
|
|
173
|
-
本组件完全参考 Ant Design WaterMark 设计规范:
|
|
174
|
-
|
|
175
|
-
- 默认旋转角度:-22°
|
|
176
|
-
- 默认水平间距:212px
|
|
177
|
-
- 默认垂直间距:222px
|
|
178
|
-
- 默认字体颜色:rgba(0, 0, 0, 0.15)
|
|
179
|
-
- 默认字体大小:16px
|
|
180
|
-
- 水印层级:z-index: 9
|
|
181
|
-
|
|
182
|
-
## 浏览器兼容性
|
|
183
|
-
|
|
184
|
-
- 现代浏览器(Chrome、Firefox、Safari、Edge)
|
|
185
|
-
- IE 11+(需要 MutationObserver polyfill)
|
|
186
|
-
|
|
187
|
-
## 相关链接
|
|
188
|
-
|
|
189
|
-
- [Ant Design WaterMark](https://ant.design/components/watermark/)
|
|
190
|
-
- [Ant Design ProComponents](https://procomponents.ant.design/)
|
package/src/components/README.md
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
# JianghuJS UI 组件
|
|
2
|
-
|
|
3
|
-
这里包含所有的 UI 组件。每个组件都有自己的文件夹,包含:
|
|
4
|
-
- `.vue` 文件:组件实现
|
|
5
|
-
- `.stories.js` 文件:Storybook 故事
|
|
6
|
-
- `.md` 文件:组件文档(可选)
|
|
7
|
-
|
|
8
|
-
## 组件列表
|
|
9
|
-
|
|
10
|
-
### 布局组件
|
|
11
|
-
- **JhLayout**: 页面布局组件 - 基于 Ant Design Pro 的 ProLayout,提供侧边、顶部、混合三种布局模式
|
|
12
|
-
- **JhPageContainer**: 页面容器组件 - 提供统一的页面头部和内容区域
|
|
13
|
-
- **JhMenu**: 菜单组件 - 支持多级菜单和响应式设计
|
|
14
|
-
- **JhCard**: 高级卡片组件 - 参考 Ant Design ProCard,支持标题、分栏、栅格、标签页等多种布局功能
|
|
15
|
-
|
|
16
|
-
### 基础组件
|
|
17
|
-
- **JhButton**: 按钮组件
|
|
18
|
-
|
|
19
|
-
### 数据展示
|
|
20
|
-
- **JhTable**: 表格组件
|
|
21
|
-
- **JhEditableTable**: 可编辑表格组件
|
|
22
|
-
- **JhTableAttachment**: 附件表格组件
|
|
23
|
-
- **JhDescriptions**: 描述列表组件 - 基于 Ant Design ProDescriptions,支持水平/垂直布局、可编辑、多种 ValueType
|
|
24
|
-
- **JhList**: 列表组件
|
|
25
|
-
- **JhStatisticCard**: 统计卡片组件
|
|
26
|
-
- **JhCheckCard**: 多选卡片组件
|
|
27
|
-
- **JhWaterMark**: 水印组件
|
|
28
|
-
|
|
29
|
-
### 表单组件
|
|
30
|
-
- **JhForm**: 表单组件
|
|
31
|
-
- **JhFormFields**: 表单字段集组件 - 基于 Ant Design ProComponents FieldSet,支持字段依赖和动态联动
|
|
32
|
-
- **JhFormList**: 表单列表组件
|
|
33
|
-
- **JhQueryFilter**: 查询过滤组件
|
|
34
|
-
- **JhStepsForm**: 分步表单组件
|
|
35
|
-
- **JhFileInput**: 文件上传组件
|
|
36
|
-
- **JhDateRangePicker**: 日期范围选择器
|
|
37
|
-
- **JhTreeSelect**: 树形选择器
|
|
38
|
-
- **JhJsonEditor**: JSON 编辑器
|
|
39
|
-
- **JhMarkdownEditor**: Markdown 编辑器
|
|
40
|
-
|
|
41
|
-
### 反馈组件
|
|
42
|
-
- **JhModal**: 模态框组件
|
|
43
|
-
- **JhModalForm**: 模态框表单组件
|
|
44
|
-
- **JhDrawer**: 抽屉组件
|
|
45
|
-
- **JhDrawerForm**: 抽屉表单组件
|
|
46
|
-
- **JhToast**: 提示组件
|
|
47
|
-
- **JhMask**: 遮罩组件
|
|
48
|
-
- **JhConfirmDialog**: 确认对话框组件
|
|
49
|
-
|
|
50
|
-
### 其他组件
|
|
51
|
-
- **JhDraggable**: 拖拽组件
|
|
52
|
-
- **JhScene**: 场景组件
|