@icc-grow/web-components 1.0.0 → 1.1.1

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 (74) hide show
  1. package/README.md +15 -0
  2. package/dist/es/components/i-avatar-group/src/avatar-group.mjs +1 -1
  3. package/dist/es/components/i-form-item/src/form-item.mjs +1 -1
  4. package/dist/es/components/i-form-item/src/form-item.vue_vue_type_script_setup_true_lang.mjs +2 -1
  5. package/dist/es/components/i-image/src/image.vue_vue_type_script_setup_true_lang.mjs +20 -20
  6. package/dist/es/components/i-tooltip/src/tooltip-content.mjs +1 -1
  7. package/dist/es/style.css +1 -1
  8. package/dist/es/utils/use-intersection-observer.mjs +31 -0
  9. package/dist/lib/components/i-avatar-group/src/avatar-group.cjs +1 -1
  10. package/dist/lib/components/i-form-item/src/form-item.cjs +1 -1
  11. package/dist/lib/components/i-form-item/src/form-item.vue_vue_type_script_setup_true_lang.cjs +1 -1
  12. package/dist/lib/components/i-image/src/image.vue_vue_type_script_setup_true_lang.cjs +1 -1
  13. package/dist/lib/components/i-tooltip/src/tooltip-content.cjs +1 -1
  14. package/dist/lib/style.css +1 -1
  15. package/dist/lib/utils/use-intersection-observer.cjs +1 -0
  16. package/dist/types/components/i-form/index.d.ts +3 -3
  17. package/dist/types/components/i-form/index.d.ts.map +1 -1
  18. package/dist/types/components/i-form/src/form.vue.d.ts +1 -1
  19. package/dist/types/components/i-form/src/form.vue.d.ts.map +1 -1
  20. package/dist/types/components/i-form/src/types.d.ts +16 -4
  21. package/dist/types/components/i-form/src/types.d.ts.map +1 -1
  22. package/dist/types/components/i-form-item/index.d.ts +3 -3
  23. package/dist/types/components/i-form-item/index.d.ts.map +1 -1
  24. package/dist/types/components/i-form-item/src/form-item.vue.d.ts +2 -2
  25. package/dist/types/components/i-form-item/src/form-item.vue.d.ts.map +1 -1
  26. package/dist/types/components/i-form-item/src/types.d.ts +2 -2
  27. package/dist/types/components/i-form-item/src/types.d.ts.map +1 -1
  28. package/dist/types/components/i-tooltip/index.d.ts +9 -2
  29. package/dist/types/components/i-tooltip/index.d.ts.map +1 -1
  30. package/dist/types/components/i-tooltip/src/tooltip-content.vue.d.ts +15 -2
  31. package/dist/types/components/i-tooltip/src/tooltip-content.vue.d.ts.map +1 -1
  32. package/dist/types/components/i-tooltip/src/tooltip.vue.d.ts +18 -4
  33. package/dist/types/components/i-tooltip/src/tooltip.vue.d.ts.map +1 -1
  34. package/dist/types/utils/use-intersection-observer.d.ts +19 -0
  35. package/dist/types/utils/use-intersection-observer.d.ts.map +1 -0
  36. package/package.json +3 -4
  37. package/skills/icc-web-components/SKILL.md +0 -191
  38. package/skills/icc-web-components/patterns/crud-list.md +0 -195
  39. package/skills/icc-web-components/patterns/dialog-form.md +0 -180
  40. package/skills/icc-web-components/patterns/form-page.md +0 -139
  41. package/skills/icc-web-components/patterns/tabs-page.md +0 -164
  42. package/skills/icc-web-components/patterns/tree-manage.md +0 -169
  43. package/skills/icc-web-components/references/i-avatar.md +0 -29
  44. package/skills/icc-web-components/references/i-badge.md +0 -19
  45. package/skills/icc-web-components/references/i-card.md +0 -12
  46. package/skills/icc-web-components/references/i-color-picker.md +0 -17
  47. package/skills/icc-web-components/references/i-crud-page.md +0 -204
  48. package/skills/icc-web-components/references/i-dialog.md +0 -36
  49. package/skills/icc-web-components/references/i-draggable.md +0 -46
  50. package/skills/icc-web-components/references/i-dropdown.md +0 -21
  51. package/skills/icc-web-components/references/i-empty.md +0 -15
  52. package/skills/icc-web-components/references/i-feedback.md +0 -50
  53. package/skills/icc-web-components/references/i-form.md +0 -223
  54. package/skills/icc-web-components/references/i-icon.md +0 -21
  55. package/skills/icc-web-components/references/i-image.md +0 -34
  56. package/skills/icc-web-components/references/i-loading.md +0 -25
  57. package/skills/icc-web-components/references/i-menu.md +0 -22
  58. package/skills/icc-web-components/references/i-popover.md +0 -51
  59. package/skills/icc-web-components/references/i-progress.md +0 -14
  60. package/skills/icc-web-components/references/i-scrollbar.md +0 -20
  61. package/skills/icc-web-components/references/i-space.md +0 -15
  62. package/skills/icc-web-components/references/i-steps.md +0 -12
  63. package/skills/icc-web-components/references/i-tabs.md +0 -16
  64. package/skills/icc-web-components/references/i-tag.md +0 -35
  65. package/skills/icc-web-components/references/i-time-picker.md +0 -19
  66. package/skills/icc-web-components/references/i-transition.md +0 -17
  67. package/skills/icc-web-components/references/i-tree-select.md +0 -26
  68. package/skills/icc-web-components/references/i-tree.md +0 -34
  69. package/skills/icc-web-components/references/i-upload.md +0 -25
  70. package/skills/icc-web-components/references/i-virtual-list.md +0 -24
  71. package/skills/icc-web-components/references/i-virtual-table.md +0 -20
  72. package/skills/icc-web-components/rules/composition.md +0 -28
  73. package/skills/icc-web-components/rules/forms.md +0 -28
  74. package/skills/icc-web-components/rules/styling.md +0 -45
@@ -1,12 +0,0 @@
1
- # ICard
2
-
3
- 卡片容器。
4
-
5
- **Props**
6
-
7
- | Prop | Type | Default | Description |
8
- |------|------|---------|-------------|
9
- | title | `string` | — | 卡片标题 |
10
- | size | `'small' \| 'large'` | — | 尺寸变体 |
11
-
12
- **Slots**: `header`(优先级高于 title)、`default`、`footer`
@@ -1,17 +0,0 @@
1
- # IColorPicker
2
-
3
- 颜色选择器(弹层触发器模式)。
4
-
5
- **Props**
6
-
7
- | Prop | Type | Default | Description |
8
- |------|------|---------|-------------|
9
- | format | `'hex' \| 'rgb' \| 'hsl'` | `'hex'` | 输出格式 |
10
- | showAlpha | `boolean` | `false` | 透明度滑条 |
11
- | swatches | `string[]` | — | 预设颜色色板 |
12
- | disabled | `boolean` | `false` | 禁用 |
13
- | panelWidth | `number` | `300` | 面板宽度 |
14
-
15
- **Events**: `change` `clear`
16
-
17
- > 也可使用 `IColorPickerPanel`(无弹层,独立面板)。
@@ -1,204 +0,0 @@
1
- # CRUD 列表页组合 API
2
-
3
- > 本文件覆盖 CRUD 列表页最常见的组件组合,一次读取即可完成整个页面开发。
4
-
5
- ---
6
-
7
- ## IPageLayout
8
-
9
- 页面骨架,Header / Search / Body / Footer 四区域。
10
-
11
- **Props**
12
-
13
- | Prop | Type | Default | Description |
14
- |------|------|---------|-------------|
15
- | title | `string` | — | 页面主标题 |
16
- | subtitle | `string` | — | 页面副标题 |
17
- | isAuth | `boolean` | `true` | 是否有权限,`false` 时展示无权限状态 |
18
-
19
- **Slots**
20
-
21
- | Slot | Description |
22
- |------|-------------|
23
- | header-action | 标题栏右侧操作区 |
24
- | search | 搜索条件区(放 IPageSearch) |
25
- | default | 页面主体内容 |
26
- | footer | 页面底部(放 IPagination) |
27
-
28
- ---
29
-
30
- ## IPageSearch
31
-
32
- 搜索区组件,搭配 IPageLayout 的 `#search` 插槽。
33
-
34
- **Slots**
35
-
36
- | Slot | Description |
37
- |------|-------------|
38
- | default | 搜索控件(IInput, ISelect 等) |
39
- | action | 操作按钮区(查询、重置) |
40
-
41
- ---
42
-
43
- ## IButton
44
-
45
- **Props**
46
-
47
- | Prop | Type | Default | Description |
48
- |------|------|---------|-------------|
49
- | type | `'primary' \| 'danger' \| 'black'` | — | 按钮类型 |
50
- | size | `'large' \| 'medium' \| 'small'` | `'medium'` | 尺寸 |
51
- | disabled | `boolean` | `false` | 禁用 |
52
- | loading | `boolean` | `false` | 加载中 |
53
- | icon | `string` | — | 图标名称 |
54
- | text | `boolean` | `false` | 文字按钮(无背景) |
55
- | plain | `boolean` | `false` | 朴素按钮(描边) |
56
-
57
- **Events**: `click`
58
-
59
- ---
60
-
61
- ## IInput
62
-
63
- **Props**
64
-
65
- | Prop | Type | Default | Description |
66
- |------|------|---------|-------------|
67
- | type | `'text' \| 'password'` | `'text'` | 类型 |
68
- | placeholder | `string` | — | 占位文本 |
69
- | clearable | `boolean` | `false` | 一键清空 |
70
- | showPassword | `boolean` | `false` | 密码切换 |
71
- | disabled | `boolean` | `false` | 禁用 |
72
- | readonly | `boolean` | `false` | 只读 |
73
- | maxlength | `number` | — | 最大长度 |
74
- | showWordLimit | `boolean` | `false` | 字数统计 |
75
-
76
- **Events**: `focus` `blur` `clear` `input` `change`
77
-
78
- **Slots**: `prefix` `suffix`
79
-
80
- **Expose**: `focus()` `blur()` `select()`
81
-
82
- ---
83
-
84
- ## ISelect
85
-
86
- 选择器,数据驱动。
87
-
88
- **Props**
89
-
90
- | Prop | Type | Default | Description |
91
- |------|------|---------|-------------|
92
- | options | `Record<string, unknown>[]` | `[]` | 选项数据 |
93
- | props | `{ label?: string; value?: string; disabled?: string }` | — | 字段映射 |
94
- | multiple | `boolean` | `false` | 多选 |
95
- | disabled | `boolean` | `false` | 禁用 |
96
- | clearable | `boolean` | `false` | 可清空 |
97
- | placeholder | `string` | — | 占位文本 |
98
- | filterable | `boolean` | `false` | 可搜索 |
99
- | remote | `boolean` | `false` | 远程搜索 |
100
- | tagLimit | `number` | — | 多选 Tag 最多展示数 |
101
-
102
- **Events**: `change` `search` `clear` `visible-change`
103
-
104
- **Expose**: `show()` `hide()` `focus()` `blur()`
105
-
106
- ---
107
-
108
- ## IDatePicker
109
-
110
- **Props**
111
-
112
- | Prop | Type | Default | Description |
113
- |------|------|---------|-------------|
114
- | type | `'date' \| 'dateTime' \| 'week' \| 'month' \| 'year'` | `'date'` | 类型 |
115
- | range | `boolean` | `false` | 范围选择 |
116
- | multiple | `boolean` | `false` | 多选 |
117
- | format | `string` | — | 显示格式(dayjs) |
118
- | valueFormat | `string` | — | v-model 输出格式 |
119
- | placeholder | `string` | — | 占位文本 |
120
- | endPlaceholder | `string` | — | 范围结束占位文本 |
121
- | rangeSeparator | `string` | `'~'` | 范围分隔符 |
122
- | disabled | `boolean` | `false` | 禁用 |
123
- | clearable | `boolean` | `false` | 可清空 |
124
- | disabledDate | `(date: Dayjs) => boolean` | — | 禁用日期 |
125
-
126
- **Events**: `change` `clear` `visible-change`
127
-
128
- **Expose**: `show()` `hide()` `focus()` `blur()`
129
-
130
- ---
131
-
132
- ## ITable
133
-
134
- 列配置驱动表格。
135
-
136
- **Props**
137
-
138
- | Prop | Type | Default | Description |
139
- |------|------|---------|-------------|
140
- | data | `any[]` | `[]` | 数据源 |
141
- | columns | `TableColumn[]` | `[]` | 列配置 |
142
- | height | `string \| number` | — | 固定高度(触发固定表头) |
143
- | maxHeight | `string \| number` | — | 最大高度 |
144
- | showSummary | `boolean` | `false` | 显示合计行 |
145
- | summaryMethod | `(param) => any[]` | — | 自定义合计 |
146
- | rowKey | `string \| ((row) => string)` | — | 行唯一标识 |
147
-
148
- **TableColumn 配置**
149
-
150
- | Field | Type | Description |
151
- |-------|------|-------------|
152
- | type | `'default' \| 'selection' \| 'index' \| 'radio' \| 'expand'` | 列类型 |
153
- | label | `string` | 列标题 |
154
- | prop | `string` | 数据字段名(支持 `'a.b.c'`) |
155
- | width | `string \| number` | 列宽 |
156
- | minWidth | `string \| number` | 最小列宽 |
157
- | align | `'left' \| 'center' \| 'right'` | 对齐 |
158
- | fixed | `'left' \| 'right'` | 固定列 |
159
- | formatter | `(row, column, cellValue, index) => any` | 格式化 |
160
- | sortable | `boolean \| 'custom'` | 排序,`'custom'` 为服务端 |
161
- | selectable | `(row, index) => boolean` | selection 列禁选 |
162
-
163
- **Events**
164
-
165
- | Event | Payload | Description |
166
- |-------|---------|-------------|
167
- | selection-change | `(selection)` | 多选变更 |
168
- | select | `(selection, row, selected?)` | 单行勾选 |
169
- | select-all | `(selection)` | 全选 |
170
- | sort-change | `({ column, prop, order })` | 排序变化 |
171
- | row-click | `(row, column, event)` | 行点击 |
172
- | radio-change | `(row)` | 单选行变更 |
173
-
174
- **Slots**: `#[prop]` — `{ row, column, $index }`(slot 名 = column.prop)
175
-
176
- **Expose**
177
-
178
- | Method | Description |
179
- |--------|-------------|
180
- | clearSelection() | 清空多选 |
181
- | getSelection() | 获取多选数据 |
182
- | setSelection(keys) | 按 rowKey 设置选中 |
183
- | toggleRowSelection(row, selected?) | 切换行选中 |
184
- | clearSort() | 清除排序 |
185
- | clearSelected() | 清除单选 |
186
- | getSelected() | 获取单选数据 |
187
- | setSelected(key) | 设置单选 |
188
-
189
- ---
190
-
191
- ## IPagination
192
-
193
- **Props**
194
-
195
- | Prop | Type | Default | Description |
196
- |------|------|---------|-------------|
197
- | total | `number` | `0` | 总条目数 |
198
- | currentPage | `number` | `1` | 当前页(**v-model:currentPage**) |
199
- | pageSize | `number` | `10` | 每页条目(**v-model:pageSize**) |
200
- | pageSizes | `number[]` | `[10, 20, 50, 100]` | 每页条目选项 |
201
- | pagerCount | `number` | `5` | 页码按钮数 |
202
- | hideOnSinglePage | `boolean` | `false` | 单页时隐藏 |
203
-
204
- **Events**: `change` — `({ currentPage, pageSize })`
@@ -1,36 +0,0 @@
1
- # IDialog / IDrawer
2
-
3
- ## IDialog
4
-
5
- **Props**
6
-
7
- | Prop | Type | Default | Description |
8
- |------|------|---------|-------------|
9
- | visible | `boolean` | — | **v-model:visible** |
10
- | title | `string` | — | 标题 |
11
- | width | `string \| number` | — | 面板宽度 |
12
- | showHeader | `boolean` | `true` | 显示 header |
13
- | closable | `boolean` | `true` | 关闭按钮 |
14
- | showOverlay | `boolean` | `true` | 显示遮罩 |
15
- | closeOnClickOverlay | `boolean` | `true` | 点击遮罩关闭 |
16
- | closeOnPressEscape | `boolean` | `true` | Esc 关闭 |
17
- | lockScroll | `boolean` | `true` | 锁定滚动 |
18
-
19
- **Events**: `open` `opened` `close` `closed`
20
-
21
- **Slots**: `header` `default` `footer`
22
-
23
- ---
24
-
25
- ## IDrawer
26
-
27
- API 几乎与 IDialog 一致,额外支持方向和尺寸。
28
-
29
- **额外/不同 Props**
30
-
31
- | Prop | Type | Default | Description |
32
- |------|------|---------|-------------|
33
- | placement | `'left' \| 'right' \| 'top' \| 'bottom'` | `'right'` | 弹出方向 |
34
- | size | `string \| number` | — | 尺寸(左右=宽度,上下=高度) |
35
-
36
- > 其余 Props/Events/Slots 与 IDialog 相同。
@@ -1,46 +0,0 @@
1
- # IDraggable / ISortable
2
-
3
- ## IDraggable
4
-
5
- 自由拖拽移动 + 调整大小。
6
-
7
- **Props**
8
-
9
- | Prop | Type | Default | Description |
10
- |------|------|---------|-------------|
11
- | draggable | `boolean` | `true` | 可拖拽移动 |
12
- | handle | `string` | — | 拖拽手柄选择器 |
13
- | axis | `'x' \| 'y' \| 'both'` | `'both'` | 轴向约束 |
14
- | boundary | `'parent' \| 'none' \| HTMLElement` | `'none'` | 边界约束 |
15
- | resizable | `boolean` | `false` | 可调整大小 |
16
- | handles | `ResizeHandle[]` | — | resize 方向 |
17
- | minWidth / maxWidth | `number` | — | 宽度限制 |
18
- | minHeight / maxHeight | `number` | — | 高度限制 |
19
- | disabled | `boolean` | `false` | 禁用 |
20
- | grid | `[number, number]` | — | 网格吸附 |
21
- | strategy | `'transform' \| 'position'` | `'transform'` | 定位策略 |
22
-
23
- **Events**: `dragstart` `drag` `dragend` `resizestart` `resize` `resizeend`
24
-
25
- ---
26
-
27
- ## ISortable
28
-
29
- 拖拽排序列表,FLIP 动画。
30
-
31
- **Props**
32
-
33
- | Prop | Type | Default | Description |
34
- |------|------|---------|-------------|
35
- | modelValue | `unknown[]` | — | 列表数据(**v-model**) |
36
- | itemKey | `string \| ((item) => string \| number)` | — | 唯一标识(**必填**) |
37
- | handle | `string` | — | 拖拽手柄选择器 |
38
- | direction | `'vertical' \| 'horizontal'` | `'vertical'` | 排列方向 |
39
- | disabled | `boolean` | `false` | 禁用 |
40
- | ghostClass | `string` | — | ghost 类名 |
41
- | animationDuration | `number` | — | 动画时长(ms) |
42
- | threshold | `number` | — | 触发阈值(px) |
43
-
44
- **Events**: `sort-start` — `{ item, index }` · `sort-end` — `{ item, oldIndex, newIndex }`
45
-
46
- **Slots**: `default` — `{ item, index, isDragging }`
@@ -1,21 +0,0 @@
1
- # IDropdown
2
-
3
- 下拉操作菜单。
4
-
5
- **Props**
6
-
7
- | Prop | Type | Default | Description |
8
- |------|------|---------|-------------|
9
- | items | `DropdownItem[]` | `[]` | 菜单项数据 |
10
- | disabled | `boolean` | `false` | 禁用 |
11
- | placement | `Placement` | `'bottom-start'` | 弹出位置 |
12
- | offset | `number` | — | 偏移量 |
13
- | width | `number \| string` | — | 宽度 |
14
-
15
- **DropdownItem**: `{ label, value, disabled?, type?: 'default' | 'danger' }`
16
-
17
- **Events**: `command` — `(item)` · `visible-change` — `(visible)`
18
-
19
- **Slots**: `default`(触发器)、`item` — `{ item, index, disabled }`
20
-
21
- **Expose**: `show()` `hide()`
@@ -1,15 +0,0 @@
1
- # IEmpty
2
-
3
- 空状态占位。
4
-
5
- **Props**
6
-
7
- | Prop | Type | Default | Description |
8
- |------|------|---------|-------------|
9
- | url | `string` | — | 自定义图片 URL |
10
- | icon | `string` | — | 图标名称 |
11
- | iconSize | `number \| string` | `48` | 图标尺寸 |
12
- | desc | `string` | `'暂无数据'` | 描述文本 |
13
- | height | `number \| string` | `200` | 容器高度 |
14
-
15
- **Slots**: `image`(自定义图标区)、`default`(自定义描述区)
@@ -1,50 +0,0 @@
1
- # IConfirm / IMessage / INotification
2
-
3
- > 三个服务调用组件,**不是 Vue 组件**,纯函数式调用。
4
-
5
- ## IConfirm
6
-
7
- ```typescript
8
- import { IConfirm } from '@icc-grow/web-components'
9
-
10
- // type: 'primary' | 'warning' | 'error'
11
- IConfirm({
12
- type: 'warning',
13
- title: '确认删除',
14
- content: '删除后不可恢复',
15
- confirmText: '确定', // 可选
16
- cancelText: '取消', // 可选
17
- showCancelButton: true, // 可选
18
- closable: true, // 可选
19
- }).then(() => { /* 确认 */ }).catch(() => { /* 取消 */ })
20
-
21
- // 简写
22
- IConfirm('确定删除吗?').then(...)
23
- ```
24
-
25
- ## IMessage
26
-
27
- ```typescript
28
- import { IMessage } from '@icc-grow/web-components'
29
-
30
- IMessage.success('操作成功')
31
- IMessage.warning('请注意')
32
- IMessage.error('操作失败')
33
-
34
- // 完整配置
35
- IMessage.success({ content: '保存成功', duration: 3000, closable: true, onClose: () => {} })
36
-
37
- IMessage.closeAll()
38
- ```
39
-
40
- ## INotification
41
-
42
- ```typescript
43
- import { INotification } from '@icc-grow/web-components'
44
-
45
- // type: 'primary' | 'error'
46
- INotification({ title: '系统通知', content: '您有一条新消息', duration: 5000 })
47
- INotification.error({ title: '错误', content: '网络请求失败' })
48
-
49
- INotification.closeAll()
50
- ```
@@ -1,223 +0,0 @@
1
- # 表单组合 API
2
-
3
- > 本文件覆盖表单页最常见的组件组合,一次读取即可完成表单开发。
4
-
5
- ---
6
-
7
- ## IForm
8
-
9
- 表单容器,提供校验、重置。
10
-
11
- **Props**
12
-
13
- | Prop | Type | Default | Description |
14
- |------|------|---------|-------------|
15
- | model | `Record<string, unknown>` | — | 表单数据对象(**必填**) |
16
- | rules | `Rules` (async-validator) | — | 校验规则 |
17
- | scrollToError | `boolean` | `false` | 校验失败时滚动到第一个错误 |
18
-
19
- **Expose**
20
-
21
- | Method | Signature | Description |
22
- |--------|-----------|-------------|
23
- | validate | `(callback?) => Promise<void>` | 全量校验 |
24
- | clearValidate | `(props?) => void` | 清除校验结果 |
25
- | resetFields | `(props?) => void` | 重置字段并清除校验 |
26
-
27
- ---
28
-
29
- ## IFormItem
30
-
31
- **Props**
32
-
33
- | Prop | Type | Default | Description |
34
- |------|------|---------|-------------|
35
- | prop | `string` | — | model 中的字段路径(支持 `'a.b.c'`) |
36
- | label | `string` | — | 标签文本 |
37
- | subLabel | `string` | — | 补充描述 |
38
- | count | `number` | — | 数量提示 |
39
- | showAction | `boolean` | `false` | 标题右侧操作按钮 |
40
- | actionText | `string` | — | 操作按钮文字 |
41
- | required | `boolean` | `false` | 必填(* 号 + 自动注入 required 规则) |
42
- | rules | `RuleItem \| RuleItem[]` | — | 字段校验规则 |
43
-
44
- **Events**: `action`
45
-
46
- **Slots**: `default`
47
-
48
- ---
49
-
50
- ## IInput
51
-
52
- **Props**
53
-
54
- | Prop | Type | Default | Description |
55
- |------|------|---------|-------------|
56
- | type | `'text' \| 'password'` | `'text'` | 类型 |
57
- | placeholder | `string` | — | 占位文本 |
58
- | clearable | `boolean` | `false` | 一键清空 |
59
- | showPassword | `boolean` | `false` | 密码切换 |
60
- | disabled | `boolean` | `false` | 禁用 |
61
- | readonly | `boolean` | `false` | 只读 |
62
- | maxlength | `number` | — | 最大长度 |
63
- | showWordLimit | `boolean` | `false` | 字数统计 |
64
- | validateEvent | `boolean` | `true` | 触发表单校验 |
65
-
66
- **Events**: `focus` `blur` `clear` `input` `change`
67
-
68
- **Slots**: `prefix` `suffix`
69
-
70
- **Expose**: `focus()` `blur()` `select()`
71
-
72
- ---
73
-
74
- ## IInputNumber
75
-
76
- **Props**
77
-
78
- | Prop | Type | Default | Description |
79
- |------|------|---------|-------------|
80
- | min | `number` | — | 最小值 |
81
- | max | `number` | — | 最大值 |
82
- | step | `number` | — | 步长 |
83
- | precision | `number` | — | 精度 |
84
- | placeholder | `string` | — | 占位文本 |
85
- | clearable | `boolean` | `false` | 清空按钮 |
86
- | controls | `boolean` | `false` | 步进按钮 |
87
- | disabled | `boolean` | `false` | 禁用 |
88
- | readonly | `boolean` | `false` | 只读 |
89
- | validateEvent | `boolean` | `true` | 触发表单校验 |
90
-
91
- **Events**: `focus` `blur` `input` `change` `clear`
92
-
93
- **Expose**: `focus()` `blur()` `select()`
94
-
95
- ---
96
-
97
- ## ITextarea
98
-
99
- **Props**
100
-
101
- | Prop | Type | Default | Description |
102
- |------|------|---------|-------------|
103
- | placeholder | `string` | — | 占位文本 |
104
- | clearable | `boolean` | `false` | 一键清空 |
105
- | disabled | `boolean` | `false` | 禁用 |
106
- | readonly | `boolean` | `false` | 只读 |
107
- | maxlength | `number` | — | 最大长度 |
108
- | showWordLimit | `boolean` | `false` | 字数统计 |
109
- | validateEvent | `boolean` | `true` | 触发表单校验 |
110
- | autosize | `boolean \| { minRows?: number; maxRows?: number }` | `false` | 自适应高度 |
111
-
112
- **Events**: `focus` `blur` `clear` `input` `change`
113
-
114
- **Expose**: `focus()` `blur()` `select()`
115
-
116
- ---
117
-
118
- ## ISelect
119
-
120
- 选择器,数据驱动。
121
-
122
- **Props**
123
-
124
- | Prop | Type | Default | Description |
125
- |------|------|---------|-------------|
126
- | options | `Record<string, unknown>[]` | `[]` | 选项数据 |
127
- | props | `{ label?: string; value?: string; disabled?: string }` | — | 字段映射 |
128
- | multiple | `boolean` | `false` | 多选 |
129
- | disabled | `boolean` | `false` | 禁用 |
130
- | clearable | `boolean` | `false` | 可清空 |
131
- | placeholder | `string` | — | 占位文本 |
132
- | filterable | `boolean` | `false` | 可搜索 |
133
- | remote | `boolean` | `false` | 远程搜索 |
134
- | tagLimit | `number` | — | 多选 Tag 最多展示数 |
135
- | validateEvent | `boolean` | `true` | 触发表单校验 |
136
-
137
- **Events**: `change` `search` `clear` `visible-change`
138
-
139
- **Expose**: `show()` `hide()` `focus()` `blur()`
140
-
141
- ---
142
-
143
- ## IDatePicker
144
-
145
- **Props**
146
-
147
- | Prop | Type | Default | Description |
148
- |------|------|---------|-------------|
149
- | type | `'date' \| 'dateTime' \| 'week' \| 'month' \| 'year'` | `'date'` | 类型 |
150
- | range | `boolean` | `false` | 范围选择 |
151
- | multiple | `boolean` | `false` | 多选 |
152
- | format | `string` | — | 显示格式(dayjs) |
153
- | valueFormat | `string` | — | v-model 输出格式 |
154
- | placeholder | `string` | — | 占位文本 |
155
- | endPlaceholder | `string` | — | 范围结束占位文本 |
156
- | disabled | `boolean` | `false` | 禁用 |
157
- | clearable | `boolean` | `false` | 可清空 |
158
- | disabledDate | `(date: Dayjs) => boolean` | — | 禁用日期 |
159
- | validateEvent | `boolean` | `true` | 触发表单校验 |
160
-
161
- **Events**: `change` `clear` `visible-change`
162
-
163
- **Expose**: `show()` `hide()` `focus()` `blur()`
164
-
165
- ---
166
-
167
- ## ISwitch
168
-
169
- **Props**
170
-
171
- | Prop | Type | Default | Description |
172
- |------|------|---------|-------------|
173
- | trueValue | `string \| number \| boolean` | `true` | 开启时的值 |
174
- | falseValue | `string \| number \| boolean` | `false` | 关闭时的值 |
175
- | disabled | `boolean` | `false` | 禁用 |
176
- | validateEvent | `boolean` | `true` | 触发表单校验 |
177
-
178
- **Events**: `change`
179
-
180
- ---
181
-
182
- ## ICheckbox / ICheckboxGroup
183
-
184
- **ICheckbox Props**
185
-
186
- | Prop | Type | Default | Description |
187
- |------|------|---------|-------------|
188
- | value | `string \| number \| boolean` | — | 复选框的值 |
189
- | trueValue | `string \| number \| boolean` | `true` | 选中时的值(单独使用) |
190
- | falseValue | `string \| number \| boolean` | `false` | 未选中时的值 |
191
- | disabled | `boolean` | `false` | 禁用 |
192
- | indeterminate | `boolean` | `false` | 半选 |
193
-
194
- **ICheckboxGroup Props**
195
-
196
- | Prop | Type | Default | Description |
197
- |------|------|---------|-------------|
198
- | disabled | `boolean` | `false` | 整组禁用 |
199
- | min | `number` | — | 最少选中数 |
200
- | max | `number` | — | 最多选中数 |
201
-
202
- **Events**: `change`
203
-
204
- ---
205
-
206
- ## IRadio / IRadioGroup
207
-
208
- **IRadio Props**
209
-
210
- | Prop | Type | Default | Description |
211
- |------|------|---------|-------------|
212
- | value | `string \| number \| boolean` | — | 单选框的值 |
213
- | disabled | `boolean` | `false` | 禁用 |
214
-
215
- **IRadioGroup Props**
216
-
217
- | Prop | Type | Default | Description |
218
- |------|------|---------|-------------|
219
- | disabled | `boolean` | `false` | 整组禁用 |
220
- | size | `number` | — | 间隔(px) |
221
- | name | `string` | — | 原生 name |
222
-
223
- **Events**: `change`
@@ -1,21 +0,0 @@
1
- # IIcon
2
-
3
- iconfont 图标组件。
4
-
5
- **Props**
6
-
7
- | Prop | Type | Default | Description |
8
- |------|------|---------|-------------|
9
- | name | `string` | — | iconfont class 名,如 `'icon-add'` |
10
- | size | `number \| string` | — | 图标大小(px) |
11
- | width | `number \| string` | — | 容器宽度(扩大点击区域) |
12
- | height | `number \| string` | — | 容器高度 |
13
-
14
- **Events**: `click`
15
-
16
- **Slots**: `default`(自定义 SVG 图标)
17
-
18
- ```vue
19
- <IIcon name="icon-search" :size="16" />
20
- <IIcon :width="32" :height="32"><MySvgIcon /></IIcon>
21
- ```
@@ -1,34 +0,0 @@
1
- # IImage / IImageGroup
2
-
3
- ## IImage
4
-
5
- **Props**
6
-
7
- | Prop | Type | Default | Description |
8
- |------|------|---------|-------------|
9
- | src | `string` | — | 图片 URL |
10
- | width | `string \| number` | — | 宽度 |
11
- | height | `string \| number` | — | 高度 |
12
- | round | `boolean` | `false` | 圆形裁切 |
13
- | alt | `string` | — | alt 属性 |
14
- | fit | `'fill' \| 'contain' \| 'cover' \| 'none' \| 'scale-down'` | — | object-fit |
15
- | lazy | `boolean` | `false` | 懒加载 |
16
- | previewSrcList | `string[]` | — | 大图预览列表 |
17
- | initialIndex | `number` | — | 预览初始索引 |
18
-
19
- **Events**: `load` `error` `show`
20
-
21
- ---
22
-
23
- ## IImageGroup
24
-
25
- 批量平铺展示 + 统一画廊预览。
26
-
27
- **Props**
28
-
29
- | Prop | Type | Default | Description |
30
- |------|------|---------|-------------|
31
- | urlList | `string[]` | — | 图片 URL 列表 |
32
- | limit | `number \| string` | — | 最大展示数 |
33
- | gap | `number \| string` | — | 图片间距 |
34
- | width / height / round / fit / lazy | — | — | 继承 IImage 属性 |