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,123 @@
|
|
|
1
|
+
{
|
|
2
|
+
"entry": {
|
|
3
|
+
"category": "basic",
|
|
4
|
+
"events": [],
|
|
5
|
+
"exampleOmittedReason": null,
|
|
6
|
+
"examples": [
|
|
7
|
+
{
|
|
8
|
+
"code": "<script setup lang=\"ts\">\nimport { EpButton, EpButtonGroup } from 'ep-craft'\n</script>\n\n<template>\n <ep-button-group>\n <ep-button>上一页</ep-button>\n <ep-button>下一页</ep-button>\n </ep-button-group>\n</template>",
|
|
9
|
+
"id": "button-group-1",
|
|
10
|
+
"language": "vue",
|
|
11
|
+
"title": "按钮组"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"exposes": [],
|
|
15
|
+
"hot": false,
|
|
16
|
+
"id": "component:button-group",
|
|
17
|
+
"keywords": {
|
|
18
|
+
"en": [
|
|
19
|
+
"button-group",
|
|
20
|
+
"button",
|
|
21
|
+
"group",
|
|
22
|
+
"basic"
|
|
23
|
+
],
|
|
24
|
+
"zh": [
|
|
25
|
+
"按钮组",
|
|
26
|
+
"基础"
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
"kind": "component",
|
|
30
|
+
"name": "EpButtonGroup",
|
|
31
|
+
"nonUseCases": [
|
|
32
|
+
"需要完全自定义原生行为或视觉时"
|
|
33
|
+
],
|
|
34
|
+
"props": [
|
|
35
|
+
{
|
|
36
|
+
"alias": null,
|
|
37
|
+
"defaultText": null,
|
|
38
|
+
"description": "用于控制该按钮组内按钮的大小",
|
|
39
|
+
"hasDefault": false,
|
|
40
|
+
"name": "size",
|
|
41
|
+
"required": false,
|
|
42
|
+
"type": "'large' | 'default' | 'small'"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"alias": null,
|
|
46
|
+
"defaultText": null,
|
|
47
|
+
"description": "用于控制该按钮组内按钮的类型",
|
|
48
|
+
"hasDefault": true,
|
|
49
|
+
"name": "type",
|
|
50
|
+
"required": false,
|
|
51
|
+
"type": "'primary' | 'success' | 'warning' | 'danger' | 'info'"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"alias": null,
|
|
55
|
+
"defaultText": null,
|
|
56
|
+
"description": "",
|
|
57
|
+
"hasDefault": true,
|
|
58
|
+
"name": "direction",
|
|
59
|
+
"required": false,
|
|
60
|
+
"type": "unknown"
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
"related": [
|
|
64
|
+
"EpButton"
|
|
65
|
+
],
|
|
66
|
+
"relations": {
|
|
67
|
+
"children": [],
|
|
68
|
+
"combos": [],
|
|
69
|
+
"parents": [],
|
|
70
|
+
"requiredChildren": []
|
|
71
|
+
},
|
|
72
|
+
"slots": [
|
|
73
|
+
{
|
|
74
|
+
"description": "自定义按钮组内容",
|
|
75
|
+
"name": "default"
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
"slug": "button-group",
|
|
79
|
+
"summary": "按钮组,基础交互与展示元素",
|
|
80
|
+
"tag": "ep-button-group",
|
|
81
|
+
"useCases": [
|
|
82
|
+
"页面中的按钮组展示与交互",
|
|
83
|
+
"为按钮组提供统一视觉与状态"
|
|
84
|
+
],
|
|
85
|
+
"variants": [
|
|
86
|
+
{
|
|
87
|
+
"dimension": "type",
|
|
88
|
+
"values": [
|
|
89
|
+
"primary",
|
|
90
|
+
"success",
|
|
91
|
+
"warning",
|
|
92
|
+
"danger",
|
|
93
|
+
"info"
|
|
94
|
+
],
|
|
95
|
+
"when": "通过 type 选择用于控制该按钮组内按钮的类型"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"dimension": "size",
|
|
99
|
+
"values": [
|
|
100
|
+
"large",
|
|
101
|
+
"default",
|
|
102
|
+
"small"
|
|
103
|
+
],
|
|
104
|
+
"when": "按容器空间与信息密度选择尺寸"
|
|
105
|
+
}
|
|
106
|
+
],
|
|
107
|
+
"visual": {
|
|
108
|
+
"cssVars": [
|
|
109
|
+
"--el-color-primary",
|
|
110
|
+
"--el-border-radius-base",
|
|
111
|
+
"--el-font-size-base"
|
|
112
|
+
],
|
|
113
|
+
"density": "中等",
|
|
114
|
+
"shape": "圆角矩形",
|
|
115
|
+
"slotContent": [
|
|
116
|
+
"default:自定义按钮组内容"
|
|
117
|
+
]
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"generatedAt": "2026-11-03T03:09:12.050Z",
|
|
121
|
+
"libraryVersion": "0.2.0",
|
|
122
|
+
"schemaVersion": 1
|
|
123
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# EpButtonGroup
|
|
2
|
+
|
|
3
|
+
`ep-button-group` · basic(基础) · `component:button-group`
|
|
4
|
+
|
|
5
|
+
## 摘要
|
|
6
|
+
|
|
7
|
+
按钮组,基础交互与展示元素
|
|
8
|
+
|
|
9
|
+
## 适用场景
|
|
10
|
+
|
|
11
|
+
- 适用:页面中的按钮组展示与交互
|
|
12
|
+
- 适用:为按钮组提供统一视觉与状态
|
|
13
|
+
- 不适用:需要完全自定义原生行为或视觉时
|
|
14
|
+
|
|
15
|
+
## 关键词
|
|
16
|
+
|
|
17
|
+
- 中文:按钮组、基础
|
|
18
|
+
- English: button-group, button, group, basic
|
|
19
|
+
|
|
20
|
+
## 变体
|
|
21
|
+
|
|
22
|
+
- type: primary/success/warning/danger/info(通过 type 选择用于控制该按钮组内按钮的类型)
|
|
23
|
+
- size: large/default/small(按容器空间与信息密度选择尺寸)
|
|
24
|
+
|
|
25
|
+
## Props
|
|
26
|
+
|
|
27
|
+
- size ('large' | 'default' | 'small'):用于控制该按钮组内按钮的大小
|
|
28
|
+
- type ('primary' | 'success' | 'warning' | 'danger' | 'info',默认 见文档):用于控制该按钮组内按钮的类型
|
|
29
|
+
- direction (unknown,默认 见文档)
|
|
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 { EpButton, EpButtonGroup } from 'ep-craft'
|
|
49
|
+
</script>
|
|
50
|
+
|
|
51
|
+
<template>
|
|
52
|
+
<ep-button-group>
|
|
53
|
+
<ep-button>上一页</ep-button>
|
|
54
|
+
<ep-button>下一页</ep-button>
|
|
55
|
+
</ep-button-group>
|
|
56
|
+
</template>
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## 相关条目
|
|
60
|
+
|
|
61
|
+
- EpButton
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
ep-craft 0.2.0
|
|
@@ -0,0 +1,349 @@
|
|
|
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 { EpButton } from 'ep-craft'\n</script>\n\n<template>\n <ep-button>默认</ep-button>\n <ep-button type=\"primary\">主要</ep-button>\n <ep-button type=\"danger\" plain>危险</ep-button>\n <ep-button type=\"primary\" text>文字</ep-button>\n</template>",
|
|
15
|
+
"id": "button-1",
|
|
16
|
+
"language": "vue",
|
|
17
|
+
"title": "按钮类型"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"code": "<script setup lang=\"ts\">\nimport { EpButton } from 'ep-craft'\n</script>\n\n<template>\n <ep-button type=\"primary\" loading>提交中</ep-button>\n <ep-button disabled>不可用</ep-button>\n</template>",
|
|
21
|
+
"id": "button-2",
|
|
22
|
+
"language": "vue",
|
|
23
|
+
"title": "禁用与加载"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"code": "<script setup lang=\"ts\">\nimport { EpButton } from 'ep-craft'\nimport { Search } from 'ep-craft/icons'\n</script>\n\n<template>\n <ep-button type=\"primary\" :icon=\"Search\">搜索</ep-button>\n</template>",
|
|
27
|
+
"id": "button-3",
|
|
28
|
+
"language": "vue",
|
|
29
|
+
"title": "带图标按钮"
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"exposes": [
|
|
33
|
+
{
|
|
34
|
+
"description": "按钮 HTML 元素",
|
|
35
|
+
"name": "ref",
|
|
36
|
+
"type": "Ref<HTMLButtonElement>"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"description": "按钮尺寸",
|
|
40
|
+
"name": "size",
|
|
41
|
+
"type": "ComputedRef<'' | 'large' | 'default' | 'small' | 'mini'>"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"description": "按钮类型",
|
|
45
|
+
"name": "type",
|
|
46
|
+
"type": "ComputedRef<'' | 'default' | 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text'>"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"description": "按钮禁用状态",
|
|
50
|
+
"name": "disabled",
|
|
51
|
+
"type": "ComputedRef<boolean>"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"description": "是否在两个中文字符间插入空格",
|
|
55
|
+
"name": "shouldAddSpace",
|
|
56
|
+
"type": "ComputedRef<boolean>"
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
"hot": true,
|
|
60
|
+
"id": "component:button",
|
|
61
|
+
"keywords": {
|
|
62
|
+
"en": [
|
|
63
|
+
"button",
|
|
64
|
+
"btn",
|
|
65
|
+
"action",
|
|
66
|
+
"basic"
|
|
67
|
+
],
|
|
68
|
+
"zh": [
|
|
69
|
+
"按钮",
|
|
70
|
+
"操作",
|
|
71
|
+
"提交",
|
|
72
|
+
"取消",
|
|
73
|
+
"基础"
|
|
74
|
+
]
|
|
75
|
+
},
|
|
76
|
+
"kind": "component",
|
|
77
|
+
"name": "EpButton",
|
|
78
|
+
"nonUseCases": [
|
|
79
|
+
"仅用于页面跳转时优先使用 Link"
|
|
80
|
+
],
|
|
81
|
+
"props": [
|
|
82
|
+
{
|
|
83
|
+
"alias": null,
|
|
84
|
+
"defaultText": null,
|
|
85
|
+
"description": "尺寸",
|
|
86
|
+
"hasDefault": false,
|
|
87
|
+
"name": "size",
|
|
88
|
+
"required": false,
|
|
89
|
+
"type": "'' | 'large' | 'default' | 'small' | 'mini'"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"alias": null,
|
|
93
|
+
"defaultText": "false",
|
|
94
|
+
"description": "按钮是否为禁用状态",
|
|
95
|
+
"hasDefault": true,
|
|
96
|
+
"name": "disabled",
|
|
97
|
+
"required": false,
|
|
98
|
+
"type": "boolean"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"alias": null,
|
|
102
|
+
"defaultText": "''",
|
|
103
|
+
"description": "类型",
|
|
104
|
+
"hasDefault": true,
|
|
105
|
+
"name": "type",
|
|
106
|
+
"required": false,
|
|
107
|
+
"type": "'' | 'default' | 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text'"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"alias": null,
|
|
111
|
+
"defaultText": null,
|
|
112
|
+
"description": "图标组件",
|
|
113
|
+
"hasDefault": false,
|
|
114
|
+
"name": "icon",
|
|
115
|
+
"required": false,
|
|
116
|
+
"type": "string | Component"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"alias": null,
|
|
120
|
+
"defaultText": "button",
|
|
121
|
+
"description": "原生 type 属性",
|
|
122
|
+
"hasDefault": true,
|
|
123
|
+
"name": "nativeType",
|
|
124
|
+
"required": false,
|
|
125
|
+
"type": "'button' | 'submit' | 'reset'"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"alias": null,
|
|
129
|
+
"defaultText": "false",
|
|
130
|
+
"description": "是否为加载中状态",
|
|
131
|
+
"hasDefault": false,
|
|
132
|
+
"name": "loading",
|
|
133
|
+
"required": false,
|
|
134
|
+
"type": "boolean"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"alias": null,
|
|
138
|
+
"defaultText": "Loading",
|
|
139
|
+
"description": "自定义加载中状态图标组件",
|
|
140
|
+
"hasDefault": true,
|
|
141
|
+
"name": "loadingIcon",
|
|
142
|
+
"required": false,
|
|
143
|
+
"type": "string | Component"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"alias": null,
|
|
147
|
+
"defaultText": "false",
|
|
148
|
+
"description": "是否为朴素按钮",
|
|
149
|
+
"hasDefault": true,
|
|
150
|
+
"name": "plain",
|
|
151
|
+
"required": false,
|
|
152
|
+
"type": "boolean"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"alias": null,
|
|
156
|
+
"defaultText": "false",
|
|
157
|
+
"description": "是否为文字按钮",
|
|
158
|
+
"hasDefault": true,
|
|
159
|
+
"name": "text",
|
|
160
|
+
"required": false,
|
|
161
|
+
"type": "boolean"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"alias": null,
|
|
165
|
+
"defaultText": "false",
|
|
166
|
+
"description": "是否为链接按钮",
|
|
167
|
+
"hasDefault": false,
|
|
168
|
+
"name": "link",
|
|
169
|
+
"required": false,
|
|
170
|
+
"type": "boolean"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"alias": null,
|
|
174
|
+
"defaultText": "false",
|
|
175
|
+
"description": "是否显示文字按钮背景颜色",
|
|
176
|
+
"hasDefault": false,
|
|
177
|
+
"name": "bg",
|
|
178
|
+
"required": false,
|
|
179
|
+
"type": "boolean"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"alias": null,
|
|
183
|
+
"defaultText": "false",
|
|
184
|
+
"description": "原生 autofocus 属性",
|
|
185
|
+
"hasDefault": false,
|
|
186
|
+
"name": "autofocus",
|
|
187
|
+
"required": false,
|
|
188
|
+
"type": "boolean"
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"alias": null,
|
|
192
|
+
"defaultText": "false",
|
|
193
|
+
"description": "是否为圆角按钮",
|
|
194
|
+
"hasDefault": true,
|
|
195
|
+
"name": "round",
|
|
196
|
+
"required": false,
|
|
197
|
+
"type": "boolean"
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"alias": null,
|
|
201
|
+
"defaultText": "false",
|
|
202
|
+
"description": "是否为圆形按钮",
|
|
203
|
+
"hasDefault": false,
|
|
204
|
+
"name": "circle",
|
|
205
|
+
"required": false,
|
|
206
|
+
"type": "boolean"
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"alias": null,
|
|
210
|
+
"defaultText": "false",
|
|
211
|
+
"description": "是否为虚线按钮",
|
|
212
|
+
"hasDefault": true,
|
|
213
|
+
"name": "dashed",
|
|
214
|
+
"required": false,
|
|
215
|
+
"type": "boolean"
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"alias": null,
|
|
219
|
+
"defaultText": null,
|
|
220
|
+
"description": "自定义按钮颜色,自动计算 hover 和 active 颜色",
|
|
221
|
+
"hasDefault": false,
|
|
222
|
+
"name": "color",
|
|
223
|
+
"required": false,
|
|
224
|
+
"type": "string"
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"alias": null,
|
|
228
|
+
"defaultText": "false",
|
|
229
|
+
"description": "暗色模式",
|
|
230
|
+
"hasDefault": false,
|
|
231
|
+
"name": "dark",
|
|
232
|
+
"required": false,
|
|
233
|
+
"type": "boolean"
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
"alias": null,
|
|
237
|
+
"defaultText": null,
|
|
238
|
+
"description": "自动在两个中文字符之间插入空格",
|
|
239
|
+
"hasDefault": true,
|
|
240
|
+
"name": "autoInsertSpace",
|
|
241
|
+
"required": false,
|
|
242
|
+
"type": "boolean"
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
"alias": null,
|
|
246
|
+
"defaultText": "button",
|
|
247
|
+
"description": "自定义元素标签",
|
|
248
|
+
"hasDefault": true,
|
|
249
|
+
"name": "tag",
|
|
250
|
+
"required": false,
|
|
251
|
+
"type": "string | Component"
|
|
252
|
+
}
|
|
253
|
+
],
|
|
254
|
+
"related": [
|
|
255
|
+
"EpButtonGroup",
|
|
256
|
+
"EpLink"
|
|
257
|
+
],
|
|
258
|
+
"relations": {
|
|
259
|
+
"children": [],
|
|
260
|
+
"combos": [],
|
|
261
|
+
"parents": [],
|
|
262
|
+
"requiredChildren": []
|
|
263
|
+
},
|
|
264
|
+
"slots": [
|
|
265
|
+
{
|
|
266
|
+
"description": "自定义默认内容",
|
|
267
|
+
"name": "default"
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
"description": "自定义加载中组件",
|
|
271
|
+
"name": "loading"
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"description": "自定义图标组件",
|
|
275
|
+
"name": "icon"
|
|
276
|
+
}
|
|
277
|
+
],
|
|
278
|
+
"slug": "button",
|
|
279
|
+
"summary": "通用操作按钮,支持类型、尺寸与状态",
|
|
280
|
+
"tag": "ep-button",
|
|
281
|
+
"useCases": [
|
|
282
|
+
"提交、取消、确认等操作触发",
|
|
283
|
+
"工具栏与表单操作区"
|
|
284
|
+
],
|
|
285
|
+
"variants": [
|
|
286
|
+
{
|
|
287
|
+
"dimension": "type",
|
|
288
|
+
"values": [
|
|
289
|
+
"default",
|
|
290
|
+
"primary",
|
|
291
|
+
"success",
|
|
292
|
+
"warning",
|
|
293
|
+
"danger",
|
|
294
|
+
"info",
|
|
295
|
+
"text"
|
|
296
|
+
],
|
|
297
|
+
"when": "通过 type 选择类型"
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
"dimension": "size",
|
|
301
|
+
"values": [
|
|
302
|
+
"large",
|
|
303
|
+
"default",
|
|
304
|
+
"small",
|
|
305
|
+
"mini"
|
|
306
|
+
],
|
|
307
|
+
"when": "按容器空间与信息密度选择尺寸"
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"dimension": "state",
|
|
311
|
+
"values": [
|
|
312
|
+
"disabled",
|
|
313
|
+
"loading"
|
|
314
|
+
],
|
|
315
|
+
"when": "通过布尔属性切换禁用、加载或选中状态"
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
"dimension": "effect",
|
|
319
|
+
"values": [
|
|
320
|
+
"plain",
|
|
321
|
+
"text",
|
|
322
|
+
"link",
|
|
323
|
+
"dark",
|
|
324
|
+
"round",
|
|
325
|
+
"circle",
|
|
326
|
+
"dashed"
|
|
327
|
+
],
|
|
328
|
+
"when": "通过视觉修饰属性调整外观效果"
|
|
329
|
+
}
|
|
330
|
+
],
|
|
331
|
+
"visual": {
|
|
332
|
+
"cssVars": [
|
|
333
|
+
"--el-color-primary",
|
|
334
|
+
"--el-border-radius-base",
|
|
335
|
+
"--el-font-size-base"
|
|
336
|
+
],
|
|
337
|
+
"density": "中等",
|
|
338
|
+
"shape": "圆角矩形",
|
|
339
|
+
"slotContent": [
|
|
340
|
+
"default:自定义默认内容",
|
|
341
|
+
"loading:自定义加载中组件",
|
|
342
|
+
"icon:自定义图标组件"
|
|
343
|
+
]
|
|
344
|
+
}
|
|
345
|
+
},
|
|
346
|
+
"generatedAt": "2026-11-03T03:09:12.050Z",
|
|
347
|
+
"libraryVersion": "0.2.0",
|
|
348
|
+
"schemaVersion": 1
|
|
349
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# EpButton
|
|
2
|
+
|
|
3
|
+
`ep-button` · basic(基础) · `component:button`
|
|
4
|
+
|
|
5
|
+
## 摘要
|
|
6
|
+
|
|
7
|
+
通用操作按钮,支持类型、尺寸与状态
|
|
8
|
+
|
|
9
|
+
## 适用场景
|
|
10
|
+
|
|
11
|
+
- 适用:提交、取消、确认等操作触发
|
|
12
|
+
- 适用:工具栏与表单操作区
|
|
13
|
+
- 不适用:仅用于页面跳转时优先使用 Link
|
|
14
|
+
|
|
15
|
+
## 关键词
|
|
16
|
+
|
|
17
|
+
- 中文:按钮、操作、提交、取消、基础
|
|
18
|
+
- English: button, btn, action, basic
|
|
19
|
+
|
|
20
|
+
## 变体
|
|
21
|
+
|
|
22
|
+
- type: default/primary/success/warning/danger/info/text(通过 type 选择类型)
|
|
23
|
+
- size: large/default/small/mini(按容器空间与信息密度选择尺寸)
|
|
24
|
+
- state: disabled/loading(通过布尔属性切换禁用、加载或选中状态)
|
|
25
|
+
- effect: plain/text/link/dark/round/circle/dashed(通过视觉修饰属性调整外观效果)
|
|
26
|
+
|
|
27
|
+
## Props
|
|
28
|
+
|
|
29
|
+
- size ('' | 'large' | 'default' | 'small' | 'mini'):尺寸
|
|
30
|
+
- disabled (boolean,默认 false):按钮是否为禁用状态
|
|
31
|
+
- type ('' | 'default' | 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text',默认 ''):类型
|
|
32
|
+
- icon (string | Component):图标组件
|
|
33
|
+
- nativeType ('button' | 'submit' | 'reset',默认 button):原生 type 属性
|
|
34
|
+
- loading (boolean):是否为加载中状态
|
|
35
|
+
- loadingIcon (string | Component,默认 Loading):自定义加载中状态图标组件
|
|
36
|
+
- plain (boolean,默认 false):是否为朴素按钮
|
|
37
|
+
- text (boolean,默认 false):是否为文字按钮
|
|
38
|
+
- link (boolean):是否为链接按钮
|
|
39
|
+
- bg (boolean):是否显示文字按钮背景颜色
|
|
40
|
+
- autofocus (boolean):原生 autofocus 属性
|
|
41
|
+
- round (boolean,默认 false):是否为圆角按钮
|
|
42
|
+
- circle (boolean):是否为圆形按钮
|
|
43
|
+
- dashed (boolean,默认 false):是否为虚线按钮
|
|
44
|
+
- color (string):自定义按钮颜色,自动计算 hover 和 active 颜色
|
|
45
|
+
- dark (boolean):暗色模式
|
|
46
|
+
- autoInsertSpace (boolean,默认 见文档):自动在两个中文字符之间插入空格
|
|
47
|
+
- tag (string | Component,默认 button):自定义元素标签
|
|
48
|
+
|
|
49
|
+
## Events
|
|
50
|
+
|
|
51
|
+
- click((event: MouseEvent)):点击按钮时触发
|
|
52
|
+
|
|
53
|
+
## Slots
|
|
54
|
+
|
|
55
|
+
- default:自定义默认内容
|
|
56
|
+
- loading:自定义加载中组件
|
|
57
|
+
- icon:自定义图标组件
|
|
58
|
+
|
|
59
|
+
## Exposes
|
|
60
|
+
|
|
61
|
+
- ref(Ref<HTMLButtonElement>):按钮 HTML 元素
|
|
62
|
+
- size(ComputedRef<'' | 'large' | 'default' | 'small' | 'mini'>):按钮尺寸
|
|
63
|
+
- type(ComputedRef<'' | 'default' | 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text'>):按钮类型
|
|
64
|
+
- disabled(ComputedRef<boolean>):按钮禁用状态
|
|
65
|
+
- shouldAddSpace(ComputedRef<boolean>):是否在两个中文字符间插入空格
|
|
66
|
+
|
|
67
|
+
## 视觉提示
|
|
68
|
+
|
|
69
|
+
- 形状:圆角矩形
|
|
70
|
+
- 密度:中等
|
|
71
|
+
- 插槽内容:default:自定义默认内容;loading:自定义加载中组件;icon:自定义图标组件
|
|
72
|
+
- CSS 变量:--el-color-primary、--el-border-radius-base、--el-font-size-base
|
|
73
|
+
|
|
74
|
+
## 示例
|
|
75
|
+
|
|
76
|
+
### 按钮类型
|
|
77
|
+
|
|
78
|
+
```vue
|
|
79
|
+
<script setup lang="ts">
|
|
80
|
+
import { EpButton } from 'ep-craft'
|
|
81
|
+
</script>
|
|
82
|
+
|
|
83
|
+
<template>
|
|
84
|
+
<ep-button>默认</ep-button>
|
|
85
|
+
<ep-button type="primary">主要</ep-button>
|
|
86
|
+
<ep-button type="danger" plain>危险</ep-button>
|
|
87
|
+
<ep-button type="primary" text>文字</ep-button>
|
|
88
|
+
</template>
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### 禁用与加载
|
|
92
|
+
|
|
93
|
+
```vue
|
|
94
|
+
<script setup lang="ts">
|
|
95
|
+
import { EpButton } from 'ep-craft'
|
|
96
|
+
</script>
|
|
97
|
+
|
|
98
|
+
<template>
|
|
99
|
+
<ep-button type="primary" loading>提交中</ep-button>
|
|
100
|
+
<ep-button disabled>不可用</ep-button>
|
|
101
|
+
</template>
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### 带图标按钮
|
|
105
|
+
|
|
106
|
+
```vue
|
|
107
|
+
<script setup lang="ts">
|
|
108
|
+
import { EpButton } from 'ep-craft'
|
|
109
|
+
import { Search } from 'ep-craft/icons'
|
|
110
|
+
</script>
|
|
111
|
+
|
|
112
|
+
<template>
|
|
113
|
+
<ep-button type="primary" :icon="Search">搜索</ep-button>
|
|
114
|
+
</template>
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## 相关条目
|
|
118
|
+
|
|
119
|
+
- EpButtonGroup
|
|
120
|
+
- EpLink
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
ep-craft 0.2.0
|