ep-craft 0.1.42 → 0.2.0
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-ai/components/affix.json +152 -0
- package/dist-ai/components/affix.md +73 -0
- package/dist-ai/components/alert.json +186 -0
- package/dist-ai/components/alert.md +89 -0
- package/dist-ai/components/anchor-link.json +102 -0
- package/dist-ai/components/anchor-link.md +67 -0
- package/dist-ai/components/anchor.json +179 -0
- package/dist-ai/components/anchor.md +87 -0
- package/dist-ai/components/aside.json +87 -0
- package/dist-ai/components/aside.md +63 -0
- package/dist-ai/components/autocomplete.json +613 -0
- package/dist-ai/components/autocomplete.md +140 -0
- package/dist-ai/components/avatar.json +163 -0
- package/dist-ai/components/avatar.md +83 -0
- package/dist-ai/components/backtop.json +118 -0
- package/dist-ai/components/backtop.md +66 -0
- package/dist-ai/components/badge.json +186 -0
- package/dist-ai/components/badge.md +85 -0
- package/dist-ai/components/breadcrumb-item.json +97 -0
- package/dist-ai/components/breadcrumb-item.md +65 -0
- package/dist-ai/components/breadcrumb.json +100 -0
- package/dist-ai/components/breadcrumb.md +68 -0
- package/dist-ai/components/button-group.json +123 -0
- package/dist-ai/components/button-group.md +65 -0
- package/dist-ai/components/button.json +349 -0
- package/dist-ai/components/button.md +124 -0
- package/dist-ai/components/calendar.json +148 -0
- package/dist-ai/components/calendar.md +74 -0
- package/dist-ai/components/card.json +168 -0
- package/dist-ai/components/card.md +87 -0
- package/dist-ai/components/carousel-item.json +99 -0
- package/dist-ai/components/carousel-item.md +68 -0
- package/dist-ai/components/carousel.json +245 -0
- package/dist-ai/components/carousel.md +97 -0
- package/dist-ai/components/cascader-panel.json +242 -0
- package/dist-ai/components/cascader-panel.md +108 -0
- package/dist-ai/components/cascader.json +531 -0
- package/dist-ai/components/cascader.md +146 -0
- package/dist-ai/components/check-tag.json +133 -0
- package/dist-ai/components/check-tag.md +72 -0
- package/dist-ai/components/checkbox-button.json +279 -0
- package/dist-ai/components/checkbox-button.md +94 -0
- package/dist-ai/components/checkbox-group.json +236 -0
- package/dist-ai/components/checkbox-group.md +90 -0
- package/dist-ai/components/checkbox.json +278 -0
- package/dist-ai/components/checkbox.md +91 -0
- package/dist-ai/components/col.json +168 -0
- package/dist-ai/components/col.md +72 -0
- package/dist-ai/components/collapse-item.json +133 -0
- package/dist-ai/components/collapse-item.md +75 -0
- package/dist-ai/components/collapse-transition.json +75 -0
- package/dist-ai/components/collapse-transition.md +59 -0
- package/dist-ai/components/collapse.json +129 -0
- package/dist-ai/components/collapse.md +76 -0
- package/dist-ai/components/color-picker.json +280 -0
- package/dist-ai/components/color-picker.md +85 -0
- package/dist-ai/components/config-provider.json +222 -0
- package/dist-ai/components/config-provider.md +76 -0
- package/dist-ai/components/container.json +95 -0
- package/dist-ai/components/container.md +70 -0
- package/dist-ai/components/countdown.json +155 -0
- package/dist-ai/components/countdown.md +73 -0
- package/dist-ai/components/date-picker-panel.json +346 -0
- package/dist-ai/components/date-picker-panel.md +91 -0
- package/dist-ai/components/date-picker.json +574 -0
- package/dist-ai/components/date-picker.md +153 -0
- package/dist-ai/components/descriptions-item.json +175 -0
- package/dist-ai/components/descriptions-item.md +73 -0
- package/dist-ai/components/descriptions.json +171 -0
- package/dist-ai/components/descriptions.md +78 -0
- package/dist-ai/components/dialog.json +403 -0
- package/dist-ai/components/dialog.md +108 -0
- package/dist-ai/components/divider.json +102 -0
- package/dist-ai/components/divider.md +59 -0
- package/dist-ai/components/drawer.json +468 -0
- package/dist-ai/components/drawer.md +115 -0
- package/dist-ai/components/dropdown-item.json +156 -0
- package/dist-ai/components/dropdown-item.md +84 -0
- package/dist-ai/components/dropdown-menu.json +92 -0
- package/dist-ai/components/dropdown-menu.md +70 -0
- package/dist-ai/components/dropdown.json +374 -0
- package/dist-ai/components/dropdown.md +108 -0
- package/dist-ai/components/empty.json +116 -0
- package/dist-ai/components/empty.md +62 -0
- package/dist-ai/components/footer.json +86 -0
- package/dist-ai/components/footer.md +63 -0
- package/dist-ai/components/form-item.json +242 -0
- package/dist-ai/components/form-item.md +93 -0
- package/dist-ai/components/form.json +277 -0
- package/dist-ai/components/form.md +117 -0
- package/dist-ai/components/header.json +86 -0
- package/dist-ai/components/header.md +63 -0
- package/dist-ai/components/icon.json +95 -0
- package/dist-ai/components/icon.md +61 -0
- package/dist-ai/components/image-viewer.json +235 -0
- package/dist-ai/components/image-viewer.md +88 -0
- package/dist-ai/components/image.json +299 -0
- package/dist-ai/components/image.md +96 -0
- package/dist-ai/components/input-number.json +370 -0
- package/dist-ai/components/input-number.md +127 -0
- package/dist-ai/components/input.json +545 -0
- package/dist-ai/components/input.md +166 -0
- package/dist-ai/components/link.json +162 -0
- package/dist-ai/components/link.md +72 -0
- package/dist-ai/components/main.json +77 -0
- package/dist-ai/components/main.md +58 -0
- package/dist-ai/components/mention.json +598 -0
- package/dist-ai/components/mention.md +136 -0
- package/dist-ai/components/menu-item-group.json +101 -0
- package/dist-ai/components/menu-item-group.md +69 -0
- package/dist-ai/components/menu-item.json +131 -0
- package/dist-ai/components/menu-item.md +76 -0
- package/dist-ai/components/menu.json +314 -0
- package/dist-ai/components/menu.md +104 -0
- package/dist-ai/components/option-group.json +113 -0
- package/dist-ai/components/option-group.md +79 -0
- package/dist-ai/components/option.json +122 -0
- package/dist-ai/components/option.md +70 -0
- package/dist-ai/components/page-header.json +131 -0
- package/dist-ai/components/page-header.md +70 -0
- package/dist-ai/components/pagination.json +325 -0
- package/dist-ai/components/pagination.md +115 -0
- package/dist-ai/components/popconfirm.json +240 -0
- package/dist-ai/components/popconfirm.md +89 -0
- package/dist-ai/components/popover.json +351 -0
- package/dist-ai/components/popover.md +99 -0
- package/dist-ai/components/popper.json +93 -0
- package/dist-ai/components/popper.md +66 -0
- package/dist-ai/components/progress.json +219 -0
- package/dist-ai/components/progress.md +74 -0
- package/dist-ai/components/radio-button.json +142 -0
- package/dist-ai/components/radio-button.md +76 -0
- package/dist-ai/components/radio-group.json +219 -0
- package/dist-ai/components/radio-group.md +88 -0
- package/dist-ai/components/radio.json +177 -0
- package/dist-ai/components/radio.md +83 -0
- package/dist-ai/components/rate.json +286 -0
- package/dist-ai/components/rate.md +83 -0
- package/dist-ai/components/result.json +118 -0
- package/dist-ai/components/result.md +66 -0
- package/dist-ai/components/row.json +115 -0
- package/dist-ai/components/row.md +68 -0
- package/dist-ai/components/scrollbar.json +280 -0
- package/dist-ai/components/scrollbar.md +89 -0
- package/dist-ai/components/segmented.json +204 -0
- package/dist-ai/components/segmented.md +81 -0
- package/dist-ai/components/select-v2.json +729 -0
- package/dist-ai/components/select-v2.md +193 -0
- package/dist-ai/components/select.json +697 -0
- package/dist-ai/components/select.md +188 -0
- package/dist-ai/components/skeleton-item.json +80 -0
- package/dist-ai/components/skeleton-item.md +57 -0
- package/dist-ai/components/skeleton.json +134 -0
- package/dist-ai/components/skeleton.md +65 -0
- package/dist-ai/components/slider.json +326 -0
- package/dist-ai/components/slider.md +88 -0
- package/dist-ai/components/space.json +178 -0
- package/dist-ai/components/space.md +73 -0
- package/dist-ai/components/statistic.json +167 -0
- package/dist-ai/components/statistic.md +66 -0
- package/dist-ai/components/step.json +124 -0
- package/dist-ai/components/step.md +69 -0
- package/dist-ai/components/steps.json +157 -0
- package/dist-ai/components/steps.md +79 -0
- package/dist-ai/components/sub-menu.json +211 -0
- package/dist-ai/components/sub-menu.md +88 -0
- package/dist-ai/components/switch.json +292 -0
- package/dist-ai/components/switch.md +88 -0
- package/dist-ai/components/tab-pane.json +137 -0
- package/dist-ai/components/tab-pane.md +72 -0
- package/dist-ai/components/table-column.json +368 -0
- package/dist-ai/components/table-column.md +103 -0
- package/dist-ai/components/table-v2.json +486 -0
- package/dist-ai/components/table-v2.md +123 -0
- package/dist-ai/components/table.json +734 -0
- package/dist-ai/components/table.md +205 -0
- package/dist-ai/components/tabs.json +231 -0
- package/dist-ai/components/tabs.md +127 -0
- package/dist-ai/components/tag.json +205 -0
- package/dist-ai/components/tag.md +105 -0
- package/dist-ai/components/text.json +143 -0
- package/dist-ai/components/text.md +66 -0
- package/dist-ai/components/time-picker.json +555 -0
- package/dist-ai/components/time-picker.md +123 -0
- package/dist-ai/components/time-select.json +321 -0
- package/dist-ai/components/time-select.md +93 -0
- package/dist-ai/components/timeline-item.json +186 -0
- package/dist-ai/components/timeline-item.md +78 -0
- package/dist-ai/components/timeline.json +99 -0
- package/dist-ai/components/timeline.md +65 -0
- package/dist-ai/components/tooltip.json +599 -0
- package/dist-ai/components/tooltip.md +137 -0
- package/dist-ai/components/tour-step.json +219 -0
- package/dist-ai/components/tour-step.md +88 -0
- package/dist-ai/components/tour.json +258 -0
- package/dist-ai/components/tour.md +96 -0
- package/dist-ai/components/transfer.json +275 -0
- package/dist-ai/components/transfer.md +95 -0
- package/dist-ai/components/tree-select.json +945 -0
- package/dist-ai/components/tree-select.md +181 -0
- package/dist-ai/components/tree-v2.json +395 -0
- package/dist-ai/components/tree-v2.md +113 -0
- package/dist-ai/components/tree.json +485 -0
- package/dist-ai/components/tree.md +131 -0
- package/dist-ai/components/upload.json +382 -0
- package/dist-ai/components/upload.md +130 -0
- package/dist-ai/components/watermark.json +157 -0
- package/dist-ai/components/watermark.md +66 -0
- package/dist-ai/directives/click-outside.json +61 -0
- package/dist-ai/directives/click-outside.md +50 -0
- package/dist-ai/directives/infinite-scroll.json +83 -0
- package/dist-ai/directives/infinite-scroll.md +62 -0
- package/dist-ai/directives/loading.json +89 -0
- package/dist-ai/directives/loading.md +69 -0
- package/dist-ai/directives/mousewheel.json +54 -0
- package/dist-ai/directives/mousewheel.md +48 -0
- package/dist-ai/directives/repeat-click.json +68 -0
- package/dist-ai/directives/repeat-click.md +49 -0
- package/dist-ai/directives/trap-focus.json +46 -0
- package/dist-ai/directives/trap-focus.md +46 -0
- package/dist-ai/icons.json +1 -0
- package/dist-ai/index.json +1 -0
- package/dist-ai/llms.txt +170 -0
- package/dist-ai/manifest.json +26590 -0
- package/dist-ai/schema/manifest.schema.json +793 -0
- package/dist-ai/services/infinite-scroll.json +80 -0
- package/dist-ai/services/infinite-scroll.md +71 -0
- package/dist-ai/services/loading.json +108 -0
- package/dist-ai/services/loading.md +58 -0
- package/dist-ai/services/message-box.json +159 -0
- package/dist-ai/services/message-box.md +78 -0
- package/dist-ai/services/message.json +137 -0
- package/dist-ai/services/message.md +72 -0
- package/dist-ai/services/notification.json +136 -0
- package/dist-ai/services/notification.md +73 -0
- package/package.json +12 -2
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
# EpAutocomplete
|
|
2
|
+
|
|
3
|
+
`ep-autocomplete` · form(表单) · `component:autocomplete`
|
|
4
|
+
|
|
5
|
+
## 摘要
|
|
6
|
+
|
|
7
|
+
自动补全输入框,表单数据录入控件
|
|
8
|
+
|
|
9
|
+
## 适用场景
|
|
10
|
+
|
|
11
|
+
- 适用:表单中收集或编辑自动补全输入框数据
|
|
12
|
+
- 适用:与 EpForm、EpFormItem 组合完成校验
|
|
13
|
+
- 不适用:仅展示静态文本或只读数据时
|
|
14
|
+
|
|
15
|
+
## 关键词
|
|
16
|
+
|
|
17
|
+
- 中文:自动补全输入框、表单
|
|
18
|
+
- English: autocomplete, suggest, form
|
|
19
|
+
|
|
20
|
+
## Props
|
|
21
|
+
|
|
22
|
+
- id (unknown,默认 见文档)
|
|
23
|
+
- size (unknown)
|
|
24
|
+
- disabled (unknown,默认 见文档)
|
|
25
|
+
- modelValue(别名 v-model) (string | number,默认 ''):绑定值
|
|
26
|
+
- modelModifiers (unknown,默认 见文档)
|
|
27
|
+
- maxlength (unknown)
|
|
28
|
+
- minlength (unknown)
|
|
29
|
+
- type (unknown,默认 见文档)
|
|
30
|
+
- resize (unknown)
|
|
31
|
+
- autosize (unknown,默认 见文档)
|
|
32
|
+
- autocomplete (unknown,默认 见文档)
|
|
33
|
+
- formatter (unknown)
|
|
34
|
+
- parser (unknown)
|
|
35
|
+
- placeholder (unknown)
|
|
36
|
+
- form (unknown)
|
|
37
|
+
- readonly (unknown)
|
|
38
|
+
- clearable (unknown)
|
|
39
|
+
- clearIcon (unknown,默认 见文档)
|
|
40
|
+
- showPassword (unknown)
|
|
41
|
+
- showWordLimit (unknown)
|
|
42
|
+
- wordLimitPosition (unknown,默认 见文档)
|
|
43
|
+
- suffixIcon (unknown)
|
|
44
|
+
- prefixIcon (unknown)
|
|
45
|
+
- containerRole (unknown,默认 见文档)
|
|
46
|
+
- tabindex (unknown,默认 见文档)
|
|
47
|
+
- validateEvent (unknown,默认 见文档)
|
|
48
|
+
- inputStyle (unknown,默认 见文档)
|
|
49
|
+
- countGraphemes (unknown)
|
|
50
|
+
- autofocus (unknown)
|
|
51
|
+
- rows (unknown,默认 见文档)
|
|
52
|
+
- ariaLabel (unknown)
|
|
53
|
+
- inputmode (unknown,默认 见文档)
|
|
54
|
+
- name (unknown)
|
|
55
|
+
- floatLabel (unknown,默认 见文档)
|
|
56
|
+
- valueKey (string,默认 value):建议项中用于展示的键名
|
|
57
|
+
- debounce (number,默认 300):输入防抖延迟,单位 ms
|
|
58
|
+
- placement ('top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end',默认 bottom-start):弹出菜单位置
|
|
59
|
+
- fetchSuggestions ((queryString, cb) => Awaitable<Data[] | void> | Data[],默认 见文档):获取建议项的方法,可用 callback 回传数据,也可直接返回数据
|
|
60
|
+
- popperClass (string):下拉菜单自定义类名
|
|
61
|
+
- popperStyle (string | object,默认 见文档):下拉菜单自定义样式
|
|
62
|
+
- popperOptions (Partial<Options>,默认 见文档):popper.js 配置项
|
|
63
|
+
- showArrow (boolean,默认 true):是否显示箭头
|
|
64
|
+
- triggerOnFocus (boolean,默认 true):聚焦时是否显示建议
|
|
65
|
+
- selectWhenUnmatched (boolean):无匹配项时回车是否触发 select 事件
|
|
66
|
+
- hideLoading (boolean):远程搜索时是否隐藏加载图标
|
|
67
|
+
- teleported (boolean,默认 见文档):是否将下拉菜单 teleport 到 body
|
|
68
|
+
- appendTo (string | HTMLElement):下拉菜单挂载的容器
|
|
69
|
+
- highlightFirstItem (boolean):远程搜索时是否默认高亮第一项
|
|
70
|
+
- fitInputWidth (boolean):下拉菜单宽度是否与输入框一致
|
|
71
|
+
- loopNavigation (boolean,默认 true):键盘导航是否从末尾循环到开头
|
|
72
|
+
|
|
73
|
+
## Events
|
|
74
|
+
|
|
75
|
+
- update:modelValue((value: string | number)):绑定值变化时触发
|
|
76
|
+
- input((value: string | number)):输入时触发
|
|
77
|
+
- change((value: string | number)):值变化时触发
|
|
78
|
+
- focus((evt: FocusEvent)):聚焦时触发
|
|
79
|
+
- blur((evt: FocusEvent)):失焦时触发
|
|
80
|
+
- clear(—):清空时触发
|
|
81
|
+
- select((item: Record<string, any>)):选中建议项时触发
|
|
82
|
+
|
|
83
|
+
## Slots
|
|
84
|
+
|
|
85
|
+
- default:自定义建议项内容,参数为 `{ item }`
|
|
86
|
+
- prefix:输入框前缀内容
|
|
87
|
+
- suffix:输入框后缀内容
|
|
88
|
+
- prepend:输入框前置内容
|
|
89
|
+
- append:输入框后置内容
|
|
90
|
+
- loading:自定义加载中内容
|
|
91
|
+
- header:下拉菜单头部
|
|
92
|
+
- footer:下拉菜单底部
|
|
93
|
+
|
|
94
|
+
## Exposes
|
|
95
|
+
|
|
96
|
+
- highlightedIndex(Ref<number>):当前高亮建议项的索引
|
|
97
|
+
- activated(Ref<boolean>):自动补全是否激活
|
|
98
|
+
- loading(Ref<boolean>):远程搜索加载状态
|
|
99
|
+
- inputRef(Ref<InputInstance | undefined>):内部 ep-input 实例
|
|
100
|
+
|
|
101
|
+
## 视觉提示
|
|
102
|
+
|
|
103
|
+
- 形状:矩形输入框
|
|
104
|
+
- 密度:中等
|
|
105
|
+
- 插槽内容:default:自定义建议项内容,参数为 `{ item }`;prefix:输入框前缀内容;suffix:输入框后缀内容
|
|
106
|
+
- CSS 变量:--el-border-color、--el-border-radius-base、--el-color-primary、--el-font-size-base
|
|
107
|
+
|
|
108
|
+
## 示例
|
|
109
|
+
|
|
110
|
+
### 输入建议
|
|
111
|
+
|
|
112
|
+
```vue
|
|
113
|
+
<script setup lang="ts">
|
|
114
|
+
import { ref } from 'vue'
|
|
115
|
+
import { EpAutocomplete } from 'ep-craft'
|
|
116
|
+
|
|
117
|
+
const value = ref('')
|
|
118
|
+
const options = ['Vue', 'React', 'Svelte', 'Solid']
|
|
119
|
+
|
|
120
|
+
const fetchSuggestions = (query: string) =>
|
|
121
|
+
options.filter((item) => item.toLowerCase().includes(query.toLowerCase())).map((item) => ({ value: item }))
|
|
122
|
+
</script>
|
|
123
|
+
|
|
124
|
+
<template>
|
|
125
|
+
<ep-autocomplete
|
|
126
|
+
v-model="value"
|
|
127
|
+
:fetch-suggestions="fetchSuggestions"
|
|
128
|
+
placeholder="输入前端框架"
|
|
129
|
+
/>
|
|
130
|
+
</template>
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## 相关条目
|
|
134
|
+
|
|
135
|
+
- EpInput
|
|
136
|
+
- EpSelect
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
ep-craft 0.2.0
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
{
|
|
2
|
+
"entry": {
|
|
3
|
+
"category": "basic",
|
|
4
|
+
"events": [
|
|
5
|
+
{
|
|
6
|
+
"description": "图片加载失败时触发",
|
|
7
|
+
"name": "error",
|
|
8
|
+
"params": "(e: Event)"
|
|
9
|
+
}
|
|
10
|
+
],
|
|
11
|
+
"exampleOmittedReason": null,
|
|
12
|
+
"examples": [
|
|
13
|
+
{
|
|
14
|
+
"code": "<script setup lang=\"ts\">\nimport { EpAvatar } from 'ep-craft'\n</script>\n\n<template>\n <ep-avatar :size=\"48\">张</ep-avatar>\n</template>",
|
|
15
|
+
"id": "avatar-1",
|
|
16
|
+
"language": "vue",
|
|
17
|
+
"title": "文字头像"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"code": "<script setup lang=\"ts\">\nimport { EpAvatar } from 'ep-craft'\n</script>\n\n<template>\n <ep-avatar :size=\"48\" shape=\"square\">李</ep-avatar>\n <ep-avatar :size=\"32\">王</ep-avatar>\n</template>",
|
|
21
|
+
"id": "avatar-2",
|
|
22
|
+
"language": "vue",
|
|
23
|
+
"title": "形状与尺寸"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"exposes": [],
|
|
27
|
+
"hot": true,
|
|
28
|
+
"id": "component:avatar",
|
|
29
|
+
"keywords": {
|
|
30
|
+
"en": [
|
|
31
|
+
"avatar",
|
|
32
|
+
"user",
|
|
33
|
+
"profile",
|
|
34
|
+
"basic"
|
|
35
|
+
],
|
|
36
|
+
"zh": [
|
|
37
|
+
"头像",
|
|
38
|
+
"用户",
|
|
39
|
+
"标识",
|
|
40
|
+
"基础"
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
"kind": "component",
|
|
44
|
+
"name": "EpAvatar",
|
|
45
|
+
"nonUseCases": [
|
|
46
|
+
"需要完全自定义原生行为或视觉时"
|
|
47
|
+
],
|
|
48
|
+
"props": [
|
|
49
|
+
{
|
|
50
|
+
"alias": null,
|
|
51
|
+
"defaultText": "default",
|
|
52
|
+
"description": "Avatar 大小",
|
|
53
|
+
"hasDefault": false,
|
|
54
|
+
"name": "size",
|
|
55
|
+
"required": false,
|
|
56
|
+
"type": "number | \"large\" | \"default\" | \"small\""
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"alias": null,
|
|
60
|
+
"defaultText": "circle",
|
|
61
|
+
"description": "Avatar 形状",
|
|
62
|
+
"hasDefault": false,
|
|
63
|
+
"name": "shape",
|
|
64
|
+
"required": false,
|
|
65
|
+
"type": "'circle' | 'square'"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"alias": null,
|
|
69
|
+
"defaultText": null,
|
|
70
|
+
"description": "设置 Avatar 的图标类型",
|
|
71
|
+
"hasDefault": false,
|
|
72
|
+
"name": "icon",
|
|
73
|
+
"required": false,
|
|
74
|
+
"type": "string | Component"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"alias": null,
|
|
78
|
+
"defaultText": null,
|
|
79
|
+
"description": "Avatar 图片的源地址",
|
|
80
|
+
"hasDefault": true,
|
|
81
|
+
"name": "src",
|
|
82
|
+
"required": false,
|
|
83
|
+
"type": "string"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"alias": null,
|
|
87
|
+
"defaultText": null,
|
|
88
|
+
"description": "图片 alt",
|
|
89
|
+
"hasDefault": false,
|
|
90
|
+
"name": "alt",
|
|
91
|
+
"required": false,
|
|
92
|
+
"type": "string"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"alias": null,
|
|
96
|
+
"defaultText": null,
|
|
97
|
+
"description": "图片 srcSet",
|
|
98
|
+
"hasDefault": false,
|
|
99
|
+
"name": "srcSet",
|
|
100
|
+
"required": false,
|
|
101
|
+
"type": "string"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"alias": null,
|
|
105
|
+
"defaultText": "cover",
|
|
106
|
+
"description": "当展示类型为图片时,设置图片如何适应容器",
|
|
107
|
+
"hasDefault": true,
|
|
108
|
+
"name": "fit",
|
|
109
|
+
"required": false,
|
|
110
|
+
"type": "'fill' | 'contain' | 'cover' | 'none' | 'scale-down'"
|
|
111
|
+
}
|
|
112
|
+
],
|
|
113
|
+
"related": [
|
|
114
|
+
"EpBadge",
|
|
115
|
+
"EpTag"
|
|
116
|
+
],
|
|
117
|
+
"relations": {
|
|
118
|
+
"children": [],
|
|
119
|
+
"combos": [],
|
|
120
|
+
"parents": [],
|
|
121
|
+
"requiredChildren": []
|
|
122
|
+
},
|
|
123
|
+
"slots": [
|
|
124
|
+
{
|
|
125
|
+
"description": "自定义头像展示内容",
|
|
126
|
+
"name": "default"
|
|
127
|
+
}
|
|
128
|
+
],
|
|
129
|
+
"slug": "avatar",
|
|
130
|
+
"summary": "头像,展示用户或对象标识图像",
|
|
131
|
+
"tag": "ep-avatar",
|
|
132
|
+
"useCases": [
|
|
133
|
+
"用户信息展示",
|
|
134
|
+
"列表与评论中的身份标识"
|
|
135
|
+
],
|
|
136
|
+
"variants": [
|
|
137
|
+
{
|
|
138
|
+
"dimension": "size",
|
|
139
|
+
"values": [
|
|
140
|
+
"large",
|
|
141
|
+
"default",
|
|
142
|
+
"small"
|
|
143
|
+
],
|
|
144
|
+
"when": "按容器空间与信息密度选择尺寸"
|
|
145
|
+
}
|
|
146
|
+
],
|
|
147
|
+
"visual": {
|
|
148
|
+
"cssVars": [
|
|
149
|
+
"--el-color-primary",
|
|
150
|
+
"--el-border-radius-base",
|
|
151
|
+
"--el-font-size-base"
|
|
152
|
+
],
|
|
153
|
+
"density": "中等",
|
|
154
|
+
"shape": "圆形或圆角矩形",
|
|
155
|
+
"slotContent": [
|
|
156
|
+
"default:自定义头像展示内容"
|
|
157
|
+
]
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
"generatedAt": "2026-11-03T03:09:12.050Z",
|
|
161
|
+
"libraryVersion": "0.2.0",
|
|
162
|
+
"schemaVersion": 1
|
|
163
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# EpAvatar
|
|
2
|
+
|
|
3
|
+
`ep-avatar` · basic(基础) · `component:avatar`
|
|
4
|
+
|
|
5
|
+
## 摘要
|
|
6
|
+
|
|
7
|
+
头像,展示用户或对象标识图像
|
|
8
|
+
|
|
9
|
+
## 适用场景
|
|
10
|
+
|
|
11
|
+
- 适用:用户信息展示
|
|
12
|
+
- 适用:列表与评论中的身份标识
|
|
13
|
+
- 不适用:需要完全自定义原生行为或视觉时
|
|
14
|
+
|
|
15
|
+
## 关键词
|
|
16
|
+
|
|
17
|
+
- 中文:头像、用户、标识、基础
|
|
18
|
+
- English: avatar, user, profile, basic
|
|
19
|
+
|
|
20
|
+
## 变体
|
|
21
|
+
|
|
22
|
+
- size: large/default/small(按容器空间与信息密度选择尺寸)
|
|
23
|
+
|
|
24
|
+
## Props
|
|
25
|
+
|
|
26
|
+
- size (number | "large" | "default" | "small"):Avatar 大小
|
|
27
|
+
- shape ('circle' | 'square'):Avatar 形状
|
|
28
|
+
- icon (string | Component):设置 Avatar 的图标类型
|
|
29
|
+
- src (string,默认 见文档):Avatar 图片的源地址
|
|
30
|
+
- alt (string):图片 alt
|
|
31
|
+
- srcSet (string):图片 srcSet
|
|
32
|
+
- fit ('fill' | 'contain' | 'cover' | 'none' | 'scale-down',默认 cover):当展示类型为图片时,设置图片如何适应容器
|
|
33
|
+
|
|
34
|
+
## Events
|
|
35
|
+
|
|
36
|
+
- error((e: Event)):图片加载失败时触发
|
|
37
|
+
|
|
38
|
+
## Slots
|
|
39
|
+
|
|
40
|
+
- default:自定义头像展示内容
|
|
41
|
+
|
|
42
|
+
## 视觉提示
|
|
43
|
+
|
|
44
|
+
- 形状:圆形或圆角矩形
|
|
45
|
+
- 密度:中等
|
|
46
|
+
- 插槽内容:default:自定义头像展示内容
|
|
47
|
+
- CSS 变量:--el-color-primary、--el-border-radius-base、--el-font-size-base
|
|
48
|
+
|
|
49
|
+
## 示例
|
|
50
|
+
|
|
51
|
+
### 文字头像
|
|
52
|
+
|
|
53
|
+
```vue
|
|
54
|
+
<script setup lang="ts">
|
|
55
|
+
import { EpAvatar } from 'ep-craft'
|
|
56
|
+
</script>
|
|
57
|
+
|
|
58
|
+
<template>
|
|
59
|
+
<ep-avatar :size="48">张</ep-avatar>
|
|
60
|
+
</template>
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### 形状与尺寸
|
|
64
|
+
|
|
65
|
+
```vue
|
|
66
|
+
<script setup lang="ts">
|
|
67
|
+
import { EpAvatar } from 'ep-craft'
|
|
68
|
+
</script>
|
|
69
|
+
|
|
70
|
+
<template>
|
|
71
|
+
<ep-avatar :size="48" shape="square">李</ep-avatar>
|
|
72
|
+
<ep-avatar :size="32">王</ep-avatar>
|
|
73
|
+
</template>
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## 相关条目
|
|
77
|
+
|
|
78
|
+
- EpBadge
|
|
79
|
+
- EpTag
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
ep-craft 0.2.0
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
{
|
|
2
|
+
"entry": {
|
|
3
|
+
"category": "basic",
|
|
4
|
+
"events": [
|
|
5
|
+
{
|
|
6
|
+
"description": "点击按钮时触发",
|
|
7
|
+
"name": "click",
|
|
8
|
+
"params": "(event: MouseEvent)"
|
|
9
|
+
}
|
|
10
|
+
],
|
|
11
|
+
"exampleOmittedReason": null,
|
|
12
|
+
"examples": [
|
|
13
|
+
{
|
|
14
|
+
"code": "<script setup lang=\"ts\">\nimport { EpBacktop } from 'ep-craft'\n</script>\n\n<template>\n <div id=\"backtop-demo\" style=\"height: 200px; overflow: auto\">\n <div style=\"height: 700px\">向下滚动后,右下角出现回到顶部按钮</div>\n </div>\n <ep-backtop target=\"#backtop-demo\" :right=\"20\" :bottom=\"20\" />\n</template>",
|
|
15
|
+
"id": "backtop-1",
|
|
16
|
+
"language": "vue",
|
|
17
|
+
"title": "回到顶部"
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
"exposes": [],
|
|
21
|
+
"hot": false,
|
|
22
|
+
"id": "component:backtop",
|
|
23
|
+
"keywords": {
|
|
24
|
+
"en": [
|
|
25
|
+
"backtop",
|
|
26
|
+
"back-to-top",
|
|
27
|
+
"scroll-top",
|
|
28
|
+
"basic"
|
|
29
|
+
],
|
|
30
|
+
"zh": [
|
|
31
|
+
"回到顶部",
|
|
32
|
+
"基础"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
"kind": "component",
|
|
36
|
+
"name": "EpBacktop",
|
|
37
|
+
"nonUseCases": [
|
|
38
|
+
"需要完全自定义原生行为或视觉时"
|
|
39
|
+
],
|
|
40
|
+
"props": [
|
|
41
|
+
{
|
|
42
|
+
"alias": null,
|
|
43
|
+
"defaultText": "200",
|
|
44
|
+
"description": "滚动高度达到该值后才显示回到顶部按钮",
|
|
45
|
+
"hasDefault": true,
|
|
46
|
+
"name": "visibilityHeight",
|
|
47
|
+
"required": false,
|
|
48
|
+
"type": "number"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"alias": null,
|
|
52
|
+
"defaultText": "''",
|
|
53
|
+
"description": "触发滚动的目标元素选择器",
|
|
54
|
+
"hasDefault": true,
|
|
55
|
+
"name": "target",
|
|
56
|
+
"required": false,
|
|
57
|
+
"type": "string"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"alias": null,
|
|
61
|
+
"defaultText": "40",
|
|
62
|
+
"description": "按钮距离页面右侧的距离,单位 px",
|
|
63
|
+
"hasDefault": true,
|
|
64
|
+
"name": "right",
|
|
65
|
+
"required": false,
|
|
66
|
+
"type": "number"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"alias": null,
|
|
70
|
+
"defaultText": "40",
|
|
71
|
+
"description": "按钮距离页面底部的距离,单位 px",
|
|
72
|
+
"hasDefault": true,
|
|
73
|
+
"name": "bottom",
|
|
74
|
+
"required": false,
|
|
75
|
+
"type": "number"
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
"related": [
|
|
79
|
+
"EpScrollbar",
|
|
80
|
+
"EpAffix"
|
|
81
|
+
],
|
|
82
|
+
"relations": {
|
|
83
|
+
"children": [],
|
|
84
|
+
"combos": [],
|
|
85
|
+
"parents": [],
|
|
86
|
+
"requiredChildren": []
|
|
87
|
+
},
|
|
88
|
+
"slots": [
|
|
89
|
+
{
|
|
90
|
+
"description": "自定义按钮内容",
|
|
91
|
+
"name": "default"
|
|
92
|
+
}
|
|
93
|
+
],
|
|
94
|
+
"slug": "backtop",
|
|
95
|
+
"summary": "回到顶部,基础交互与展示元素",
|
|
96
|
+
"tag": "ep-backtop",
|
|
97
|
+
"useCases": [
|
|
98
|
+
"页面中的回到顶部展示与交互",
|
|
99
|
+
"为回到顶部提供统一视觉与状态"
|
|
100
|
+
],
|
|
101
|
+
"variants": [],
|
|
102
|
+
"visual": {
|
|
103
|
+
"cssVars": [
|
|
104
|
+
"--el-color-primary",
|
|
105
|
+
"--el-border-radius-base",
|
|
106
|
+
"--el-font-size-base"
|
|
107
|
+
],
|
|
108
|
+
"density": "中等",
|
|
109
|
+
"shape": "圆角矩形",
|
|
110
|
+
"slotContent": [
|
|
111
|
+
"default:自定义按钮内容"
|
|
112
|
+
]
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"generatedAt": "2026-11-03T03:09:12.050Z",
|
|
116
|
+
"libraryVersion": "0.2.0",
|
|
117
|
+
"schemaVersion": 1
|
|
118
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# EpBacktop
|
|
2
|
+
|
|
3
|
+
`ep-backtop` · basic(基础) · `component:backtop`
|
|
4
|
+
|
|
5
|
+
## 摘要
|
|
6
|
+
|
|
7
|
+
回到顶部,基础交互与展示元素
|
|
8
|
+
|
|
9
|
+
## 适用场景
|
|
10
|
+
|
|
11
|
+
- 适用:页面中的回到顶部展示与交互
|
|
12
|
+
- 适用:为回到顶部提供统一视觉与状态
|
|
13
|
+
- 不适用:需要完全自定义原生行为或视觉时
|
|
14
|
+
|
|
15
|
+
## 关键词
|
|
16
|
+
|
|
17
|
+
- 中文:回到顶部、基础
|
|
18
|
+
- English: backtop, back-to-top, scroll-top, basic
|
|
19
|
+
|
|
20
|
+
## Props
|
|
21
|
+
|
|
22
|
+
- visibilityHeight (number,默认 200):滚动高度达到该值后才显示回到顶部按钮
|
|
23
|
+
- target (string,默认 ''):触发滚动的目标元素选择器
|
|
24
|
+
- right (number,默认 40):按钮距离页面右侧的距离,单位 px
|
|
25
|
+
- bottom (number,默认 40):按钮距离页面底部的距离,单位 px
|
|
26
|
+
|
|
27
|
+
## Events
|
|
28
|
+
|
|
29
|
+
- click((event: MouseEvent)):点击按钮时触发
|
|
30
|
+
|
|
31
|
+
## Slots
|
|
32
|
+
|
|
33
|
+
- default:自定义按钮内容
|
|
34
|
+
|
|
35
|
+
## 视觉提示
|
|
36
|
+
|
|
37
|
+
- 形状:圆角矩形
|
|
38
|
+
- 密度:中等
|
|
39
|
+
- 插槽内容:default:自定义按钮内容
|
|
40
|
+
- CSS 变量:--el-color-primary、--el-border-radius-base、--el-font-size-base
|
|
41
|
+
|
|
42
|
+
## 示例
|
|
43
|
+
|
|
44
|
+
### 回到顶部
|
|
45
|
+
|
|
46
|
+
```vue
|
|
47
|
+
<script setup lang="ts">
|
|
48
|
+
import { EpBacktop } from 'ep-craft'
|
|
49
|
+
</script>
|
|
50
|
+
|
|
51
|
+
<template>
|
|
52
|
+
<div id="backtop-demo" style="height: 200px; overflow: auto">
|
|
53
|
+
<div style="height: 700px">向下滚动后,右下角出现回到顶部按钮</div>
|
|
54
|
+
</div>
|
|
55
|
+
<ep-backtop target="#backtop-demo" :right="20" :bottom="20" />
|
|
56
|
+
</template>
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## 相关条目
|
|
60
|
+
|
|
61
|
+
- EpScrollbar
|
|
62
|
+
- EpAffix
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
ep-craft 0.2.0
|