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,219 @@
|
|
|
1
|
+
{
|
|
2
|
+
"entry": {
|
|
3
|
+
"category": "form",
|
|
4
|
+
"events": [
|
|
5
|
+
{
|
|
6
|
+
"description": "绑定值变化时触发",
|
|
7
|
+
"name": "update:modelValue",
|
|
8
|
+
"params": "(value: string | number | boolean | undefined)"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"description": "绑定值变化时触发",
|
|
12
|
+
"name": "change",
|
|
13
|
+
"params": "(value: string | number | boolean)"
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
"exampleOmittedReason": null,
|
|
17
|
+
"examples": [
|
|
18
|
+
{
|
|
19
|
+
"code": "<script setup lang=\"ts\">\nimport { ref } from 'vue'\nimport { EpRadio, EpRadioGroup } from 'ep-craft'\n\nconst value = ref('primary')\n</script>\n\n<template>\n <ep-radio-group v-model=\"value\">\n <ep-radio value=\"primary\">主要</ep-radio>\n <ep-radio value=\"success\">成功</ep-radio>\n </ep-radio-group>\n</template>",
|
|
20
|
+
"id": "radio-group-1",
|
|
21
|
+
"language": "vue",
|
|
22
|
+
"title": "单选框组"
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"exposes": [],
|
|
26
|
+
"hot": false,
|
|
27
|
+
"id": "component:radio-group",
|
|
28
|
+
"keywords": {
|
|
29
|
+
"en": [
|
|
30
|
+
"radio-group",
|
|
31
|
+
"radio",
|
|
32
|
+
"group",
|
|
33
|
+
"form"
|
|
34
|
+
],
|
|
35
|
+
"zh": [
|
|
36
|
+
"单选框组",
|
|
37
|
+
"表单"
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
"kind": "component",
|
|
41
|
+
"name": "EpRadioGroup",
|
|
42
|
+
"nonUseCases": [
|
|
43
|
+
"仅展示静态文本或只读数据时"
|
|
44
|
+
],
|
|
45
|
+
"props": [
|
|
46
|
+
{
|
|
47
|
+
"alias": null,
|
|
48
|
+
"defaultText": null,
|
|
49
|
+
"description": "原生 id 属性",
|
|
50
|
+
"hasDefault": true,
|
|
51
|
+
"name": "id",
|
|
52
|
+
"required": false,
|
|
53
|
+
"type": "string"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"alias": null,
|
|
57
|
+
"defaultText": "default",
|
|
58
|
+
"description": "单选框组尺寸",
|
|
59
|
+
"hasDefault": false,
|
|
60
|
+
"name": "size",
|
|
61
|
+
"required": false,
|
|
62
|
+
"type": "'large' | 'default' | 'small'"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"alias": null,
|
|
66
|
+
"defaultText": "false",
|
|
67
|
+
"description": "是否禁用",
|
|
68
|
+
"hasDefault": true,
|
|
69
|
+
"name": "disabled",
|
|
70
|
+
"required": false,
|
|
71
|
+
"type": "boolean"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"alias": "v-model",
|
|
75
|
+
"defaultText": null,
|
|
76
|
+
"description": "绑定值",
|
|
77
|
+
"hasDefault": true,
|
|
78
|
+
"name": "modelValue",
|
|
79
|
+
"required": false,
|
|
80
|
+
"type": "string | number | boolean"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"alias": null,
|
|
84
|
+
"defaultText": "#409EFF",
|
|
85
|
+
"description": "按钮形式的 Radio 激活时的填充色和边框色",
|
|
86
|
+
"hasDefault": true,
|
|
87
|
+
"name": "fill",
|
|
88
|
+
"required": false,
|
|
89
|
+
"type": "string"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"alias": null,
|
|
93
|
+
"defaultText": "#ffffff",
|
|
94
|
+
"description": "按钮形式的 Radio 激活时的文本颜色",
|
|
95
|
+
"hasDefault": true,
|
|
96
|
+
"name": "textColor",
|
|
97
|
+
"required": false,
|
|
98
|
+
"type": "string"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"alias": null,
|
|
102
|
+
"defaultText": null,
|
|
103
|
+
"description": "原生 name 属性",
|
|
104
|
+
"hasDefault": true,
|
|
105
|
+
"name": "name",
|
|
106
|
+
"required": false,
|
|
107
|
+
"type": "string"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"alias": null,
|
|
111
|
+
"defaultText": "true",
|
|
112
|
+
"description": "是否触发表单验证",
|
|
113
|
+
"hasDefault": true,
|
|
114
|
+
"name": "validateEvent",
|
|
115
|
+
"required": false,
|
|
116
|
+
"type": "boolean"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"alias": null,
|
|
120
|
+
"defaultText": null,
|
|
121
|
+
"description": "",
|
|
122
|
+
"hasDefault": false,
|
|
123
|
+
"name": "options",
|
|
124
|
+
"required": false,
|
|
125
|
+
"type": "unknown"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"alias": null,
|
|
129
|
+
"defaultText": null,
|
|
130
|
+
"description": "",
|
|
131
|
+
"hasDefault": true,
|
|
132
|
+
"name": "props",
|
|
133
|
+
"required": false,
|
|
134
|
+
"type": "unknown"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"alias": null,
|
|
138
|
+
"defaultText": null,
|
|
139
|
+
"description": "",
|
|
140
|
+
"hasDefault": true,
|
|
141
|
+
"name": "type",
|
|
142
|
+
"required": false,
|
|
143
|
+
"type": "unknown"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"alias": null,
|
|
147
|
+
"defaultText": null,
|
|
148
|
+
"description": "",
|
|
149
|
+
"hasDefault": false,
|
|
150
|
+
"name": "ariaLabel",
|
|
151
|
+
"required": false,
|
|
152
|
+
"type": "unknown"
|
|
153
|
+
}
|
|
154
|
+
],
|
|
155
|
+
"related": [
|
|
156
|
+
"EpRadio",
|
|
157
|
+
"EpRadioButton"
|
|
158
|
+
],
|
|
159
|
+
"relations": {
|
|
160
|
+
"children": [
|
|
161
|
+
"EpRadio",
|
|
162
|
+
"EpRadioButton"
|
|
163
|
+
],
|
|
164
|
+
"combos": [
|
|
165
|
+
"EpRadioGroup + EpRadio",
|
|
166
|
+
"EpRadioGroup + EpRadioButton"
|
|
167
|
+
],
|
|
168
|
+
"parents": [],
|
|
169
|
+
"requiredChildren": []
|
|
170
|
+
},
|
|
171
|
+
"slots": [
|
|
172
|
+
{
|
|
173
|
+
"description": "自定义默认内容",
|
|
174
|
+
"name": "default"
|
|
175
|
+
}
|
|
176
|
+
],
|
|
177
|
+
"slug": "radio-group",
|
|
178
|
+
"summary": "单选框组,表单数据录入控件",
|
|
179
|
+
"tag": "ep-radio-group",
|
|
180
|
+
"useCases": [
|
|
181
|
+
"表单中收集或编辑单选框组数据",
|
|
182
|
+
"与 EpForm、EpFormItem 组合完成校验"
|
|
183
|
+
],
|
|
184
|
+
"variants": [
|
|
185
|
+
{
|
|
186
|
+
"dimension": "size",
|
|
187
|
+
"values": [
|
|
188
|
+
"large",
|
|
189
|
+
"default",
|
|
190
|
+
"small"
|
|
191
|
+
],
|
|
192
|
+
"when": "按容器空间与信息密度选择尺寸"
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"dimension": "state",
|
|
196
|
+
"values": [
|
|
197
|
+
"disabled"
|
|
198
|
+
],
|
|
199
|
+
"when": "通过布尔属性切换禁用、加载或选中状态"
|
|
200
|
+
}
|
|
201
|
+
],
|
|
202
|
+
"visual": {
|
|
203
|
+
"cssVars": [
|
|
204
|
+
"--el-border-color",
|
|
205
|
+
"--el-border-radius-base",
|
|
206
|
+
"--el-color-primary",
|
|
207
|
+
"--el-font-size-base"
|
|
208
|
+
],
|
|
209
|
+
"density": "中等",
|
|
210
|
+
"shape": "矩形输入框",
|
|
211
|
+
"slotContent": [
|
|
212
|
+
"default:自定义默认内容"
|
|
213
|
+
]
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
"generatedAt": "2026-11-03T03:09:12.050Z",
|
|
217
|
+
"libraryVersion": "0.2.0",
|
|
218
|
+
"schemaVersion": 1
|
|
219
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# EpRadioGroup
|
|
2
|
+
|
|
3
|
+
`ep-radio-group` · form(表单) · `component:radio-group`
|
|
4
|
+
|
|
5
|
+
## 摘要
|
|
6
|
+
|
|
7
|
+
单选框组,表单数据录入控件
|
|
8
|
+
|
|
9
|
+
## 适用场景
|
|
10
|
+
|
|
11
|
+
- 适用:表单中收集或编辑单选框组数据
|
|
12
|
+
- 适用:与 EpForm、EpFormItem 组合完成校验
|
|
13
|
+
- 不适用:仅展示静态文本或只读数据时
|
|
14
|
+
|
|
15
|
+
## 关键词
|
|
16
|
+
|
|
17
|
+
- 中文:单选框组、表单
|
|
18
|
+
- English: radio-group, radio, group, form
|
|
19
|
+
|
|
20
|
+
## 变体
|
|
21
|
+
|
|
22
|
+
- size: large/default/small(按容器空间与信息密度选择尺寸)
|
|
23
|
+
- state: disabled(通过布尔属性切换禁用、加载或选中状态)
|
|
24
|
+
|
|
25
|
+
## Props
|
|
26
|
+
|
|
27
|
+
- id (string,默认 见文档):原生 id 属性
|
|
28
|
+
- size ('large' | 'default' | 'small'):单选框组尺寸
|
|
29
|
+
- disabled (boolean,默认 false):是否禁用
|
|
30
|
+
- modelValue(别名 v-model) (string | number | boolean,默认 见文档):绑定值
|
|
31
|
+
- fill (string,默认 #409EFF):按钮形式的 Radio 激活时的填充色和边框色
|
|
32
|
+
- textColor (string,默认 #ffffff):按钮形式的 Radio 激活时的文本颜色
|
|
33
|
+
- name (string,默认 见文档):原生 name 属性
|
|
34
|
+
- validateEvent (boolean,默认 true):是否触发表单验证
|
|
35
|
+
- options (unknown)
|
|
36
|
+
- props (unknown,默认 见文档)
|
|
37
|
+
- type (unknown,默认 见文档)
|
|
38
|
+
- ariaLabel (unknown)
|
|
39
|
+
|
|
40
|
+
## Events
|
|
41
|
+
|
|
42
|
+
- update:modelValue((value: string | number | boolean | undefined)):绑定值变化时触发
|
|
43
|
+
- change((value: string | number | boolean)):绑定值变化时触发
|
|
44
|
+
|
|
45
|
+
## Slots
|
|
46
|
+
|
|
47
|
+
- default:自定义默认内容
|
|
48
|
+
|
|
49
|
+
## 关系
|
|
50
|
+
|
|
51
|
+
- 子级:EpRadio、EpRadioButton
|
|
52
|
+
- 常用组合:EpRadioGroup + EpRadio、EpRadioGroup + EpRadioButton
|
|
53
|
+
|
|
54
|
+
## 视觉提示
|
|
55
|
+
|
|
56
|
+
- 形状:矩形输入框
|
|
57
|
+
- 密度:中等
|
|
58
|
+
- 插槽内容:default:自定义默认内容
|
|
59
|
+
- CSS 变量:--el-border-color、--el-border-radius-base、--el-color-primary、--el-font-size-base
|
|
60
|
+
|
|
61
|
+
## 示例
|
|
62
|
+
|
|
63
|
+
### 单选框组
|
|
64
|
+
|
|
65
|
+
```vue
|
|
66
|
+
<script setup lang="ts">
|
|
67
|
+
import { ref } from 'vue'
|
|
68
|
+
import { EpRadio, EpRadioGroup } from 'ep-craft'
|
|
69
|
+
|
|
70
|
+
const value = ref('primary')
|
|
71
|
+
</script>
|
|
72
|
+
|
|
73
|
+
<template>
|
|
74
|
+
<ep-radio-group v-model="value">
|
|
75
|
+
<ep-radio value="primary">主要</ep-radio>
|
|
76
|
+
<ep-radio value="success">成功</ep-radio>
|
|
77
|
+
</ep-radio-group>
|
|
78
|
+
</template>
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## 相关条目
|
|
82
|
+
|
|
83
|
+
- EpRadio
|
|
84
|
+
- EpRadioButton
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
ep-craft 0.2.0
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
{
|
|
2
|
+
"entry": {
|
|
3
|
+
"category": "form",
|
|
4
|
+
"events": [
|
|
5
|
+
{
|
|
6
|
+
"description": "绑定值变化时触发",
|
|
7
|
+
"name": "update:modelValue",
|
|
8
|
+
"params": "(value: string | number | boolean | undefined)"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"description": "绑定值变化时触发",
|
|
12
|
+
"name": "change",
|
|
13
|
+
"params": "(value: string | number | boolean)"
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
"exampleOmittedReason": null,
|
|
17
|
+
"examples": [
|
|
18
|
+
{
|
|
19
|
+
"code": "<script setup lang=\"ts\">\nimport { ref } from 'vue'\nimport { EpRadio, EpRadioGroup } from 'ep-craft'\n\nconst value = ref('a')\n</script>\n\n<template>\n <ep-radio-group v-model=\"value\">\n <ep-radio value=\"a\">选项 A</ep-radio>\n <ep-radio value=\"b\">选项 B</ep-radio>\n </ep-radio-group>\n</template>",
|
|
20
|
+
"id": "radio-1",
|
|
21
|
+
"language": "vue",
|
|
22
|
+
"title": "单选框"
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"exposes": [],
|
|
26
|
+
"hot": false,
|
|
27
|
+
"id": "component:radio",
|
|
28
|
+
"keywords": {
|
|
29
|
+
"en": [
|
|
30
|
+
"radio",
|
|
31
|
+
"option",
|
|
32
|
+
"form"
|
|
33
|
+
],
|
|
34
|
+
"zh": [
|
|
35
|
+
"单选框",
|
|
36
|
+
"表单"
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
"kind": "component",
|
|
40
|
+
"name": "EpRadio",
|
|
41
|
+
"nonUseCases": [
|
|
42
|
+
"仅展示静态文本或只读数据时"
|
|
43
|
+
],
|
|
44
|
+
"props": [
|
|
45
|
+
{
|
|
46
|
+
"alias": "v-model",
|
|
47
|
+
"defaultText": null,
|
|
48
|
+
"description": "绑定值",
|
|
49
|
+
"hasDefault": true,
|
|
50
|
+
"name": "modelValue",
|
|
51
|
+
"required": false,
|
|
52
|
+
"type": "string | number | boolean"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"alias": null,
|
|
56
|
+
"defaultText": null,
|
|
57
|
+
"description": "Radio 的尺寸",
|
|
58
|
+
"hasDefault": false,
|
|
59
|
+
"name": "size",
|
|
60
|
+
"required": false,
|
|
61
|
+
"type": "'large' | 'default' | 'small'"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"alias": null,
|
|
65
|
+
"defaultText": "false",
|
|
66
|
+
"description": "是否禁用",
|
|
67
|
+
"hasDefault": true,
|
|
68
|
+
"name": "disabled",
|
|
69
|
+
"required": false,
|
|
70
|
+
"type": "boolean"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"alias": null,
|
|
74
|
+
"defaultText": null,
|
|
75
|
+
"description": "单选框的值(已废弃,建议使用 value)",
|
|
76
|
+
"hasDefault": true,
|
|
77
|
+
"name": "label",
|
|
78
|
+
"required": false,
|
|
79
|
+
"type": "string | number | boolean"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"alias": null,
|
|
83
|
+
"defaultText": null,
|
|
84
|
+
"description": "单选框的值",
|
|
85
|
+
"hasDefault": true,
|
|
86
|
+
"name": "value",
|
|
87
|
+
"required": false,
|
|
88
|
+
"type": "string | number | boolean"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"alias": null,
|
|
92
|
+
"defaultText": null,
|
|
93
|
+
"description": "原生 name 属性",
|
|
94
|
+
"hasDefault": true,
|
|
95
|
+
"name": "name",
|
|
96
|
+
"required": false,
|
|
97
|
+
"type": "string"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"alias": null,
|
|
101
|
+
"defaultText": "false",
|
|
102
|
+
"description": "是否显示边框",
|
|
103
|
+
"hasDefault": false,
|
|
104
|
+
"name": "border",
|
|
105
|
+
"required": false,
|
|
106
|
+
"type": "boolean"
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
"related": [
|
|
110
|
+
"EpRadioGroup"
|
|
111
|
+
],
|
|
112
|
+
"relations": {
|
|
113
|
+
"children": [],
|
|
114
|
+
"combos": [
|
|
115
|
+
"EpRadioGroup + EpRadio"
|
|
116
|
+
],
|
|
117
|
+
"parents": [
|
|
118
|
+
"EpRadioGroup"
|
|
119
|
+
],
|
|
120
|
+
"requiredChildren": []
|
|
121
|
+
},
|
|
122
|
+
"slots": [
|
|
123
|
+
{
|
|
124
|
+
"description": "自定义默认内容",
|
|
125
|
+
"name": "default"
|
|
126
|
+
}
|
|
127
|
+
],
|
|
128
|
+
"slug": "radio",
|
|
129
|
+
"summary": "单选框,表单数据录入控件",
|
|
130
|
+
"tag": "ep-radio",
|
|
131
|
+
"useCases": [
|
|
132
|
+
"表单中收集或编辑单选框数据",
|
|
133
|
+
"与 EpForm、EpFormItem 组合完成校验"
|
|
134
|
+
],
|
|
135
|
+
"variants": [
|
|
136
|
+
{
|
|
137
|
+
"dimension": "size",
|
|
138
|
+
"values": [
|
|
139
|
+
"large",
|
|
140
|
+
"default",
|
|
141
|
+
"small"
|
|
142
|
+
],
|
|
143
|
+
"when": "按容器空间与信息密度选择尺寸"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"dimension": "state",
|
|
147
|
+
"values": [
|
|
148
|
+
"disabled"
|
|
149
|
+
],
|
|
150
|
+
"when": "通过布尔属性切换禁用、加载或选中状态"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"dimension": "effect",
|
|
154
|
+
"values": [
|
|
155
|
+
"border"
|
|
156
|
+
],
|
|
157
|
+
"when": "通过视觉修饰属性调整外观效果"
|
|
158
|
+
}
|
|
159
|
+
],
|
|
160
|
+
"visual": {
|
|
161
|
+
"cssVars": [
|
|
162
|
+
"--el-border-color",
|
|
163
|
+
"--el-border-radius-base",
|
|
164
|
+
"--el-color-primary",
|
|
165
|
+
"--el-font-size-base"
|
|
166
|
+
],
|
|
167
|
+
"density": "中等",
|
|
168
|
+
"shape": "矩形输入框",
|
|
169
|
+
"slotContent": [
|
|
170
|
+
"default:自定义默认内容"
|
|
171
|
+
]
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
"generatedAt": "2026-11-03T03:09:12.050Z",
|
|
175
|
+
"libraryVersion": "0.2.0",
|
|
176
|
+
"schemaVersion": 1
|
|
177
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# EpRadio
|
|
2
|
+
|
|
3
|
+
`ep-radio` · form(表单) · `component:radio`
|
|
4
|
+
|
|
5
|
+
## 摘要
|
|
6
|
+
|
|
7
|
+
单选框,表单数据录入控件
|
|
8
|
+
|
|
9
|
+
## 适用场景
|
|
10
|
+
|
|
11
|
+
- 适用:表单中收集或编辑单选框数据
|
|
12
|
+
- 适用:与 EpForm、EpFormItem 组合完成校验
|
|
13
|
+
- 不适用:仅展示静态文本或只读数据时
|
|
14
|
+
|
|
15
|
+
## 关键词
|
|
16
|
+
|
|
17
|
+
- 中文:单选框、表单
|
|
18
|
+
- English: radio, option, form
|
|
19
|
+
|
|
20
|
+
## 变体
|
|
21
|
+
|
|
22
|
+
- size: large/default/small(按容器空间与信息密度选择尺寸)
|
|
23
|
+
- state: disabled(通过布尔属性切换禁用、加载或选中状态)
|
|
24
|
+
- effect: border(通过视觉修饰属性调整外观效果)
|
|
25
|
+
|
|
26
|
+
## Props
|
|
27
|
+
|
|
28
|
+
- modelValue(别名 v-model) (string | number | boolean,默认 见文档):绑定值
|
|
29
|
+
- size ('large' | 'default' | 'small'):Radio 的尺寸
|
|
30
|
+
- disabled (boolean,默认 false):是否禁用
|
|
31
|
+
- label (string | number | boolean,默认 见文档):单选框的值(已废弃,建议使用 value)
|
|
32
|
+
- value (string | number | boolean,默认 见文档):单选框的值
|
|
33
|
+
- name (string,默认 见文档):原生 name 属性
|
|
34
|
+
- border (boolean):是否显示边框
|
|
35
|
+
|
|
36
|
+
## Events
|
|
37
|
+
|
|
38
|
+
- update:modelValue((value: string | number | boolean | undefined)):绑定值变化时触发
|
|
39
|
+
- change((value: string | number | boolean)):绑定值变化时触发
|
|
40
|
+
|
|
41
|
+
## Slots
|
|
42
|
+
|
|
43
|
+
- default:自定义默认内容
|
|
44
|
+
|
|
45
|
+
## 关系
|
|
46
|
+
|
|
47
|
+
- 父级:EpRadioGroup
|
|
48
|
+
- 常用组合:EpRadioGroup + EpRadio
|
|
49
|
+
|
|
50
|
+
## 视觉提示
|
|
51
|
+
|
|
52
|
+
- 形状:矩形输入框
|
|
53
|
+
- 密度:中等
|
|
54
|
+
- 插槽内容:default:自定义默认内容
|
|
55
|
+
- CSS 变量:--el-border-color、--el-border-radius-base、--el-color-primary、--el-font-size-base
|
|
56
|
+
|
|
57
|
+
## 示例
|
|
58
|
+
|
|
59
|
+
### 单选框
|
|
60
|
+
|
|
61
|
+
```vue
|
|
62
|
+
<script setup lang="ts">
|
|
63
|
+
import { ref } from 'vue'
|
|
64
|
+
import { EpRadio, EpRadioGroup } from 'ep-craft'
|
|
65
|
+
|
|
66
|
+
const value = ref('a')
|
|
67
|
+
</script>
|
|
68
|
+
|
|
69
|
+
<template>
|
|
70
|
+
<ep-radio-group v-model="value">
|
|
71
|
+
<ep-radio value="a">选项 A</ep-radio>
|
|
72
|
+
<ep-radio value="b">选项 B</ep-radio>
|
|
73
|
+
</ep-radio-group>
|
|
74
|
+
</template>
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## 相关条目
|
|
78
|
+
|
|
79
|
+
- EpRadioGroup
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
ep-craft 0.2.0
|