ep-craft 0.1.41 → 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/components/input-number/EpInputNumber.vue.js +62 -63
- package/dist/components/input-number/input-number.d.ts +5 -0
- package/dist/components/input-number/input-number.js +6 -6
- package/dist/components/select/index.d.ts +6 -3
- package/dist/components/select/select.d.ts +1 -0
- package/dist/components/select/select.js +3 -3
- package/dist/components/select/select.vue.d.ts +3 -1
- package/dist/components/select/select.vue.js +9 -9
- package/dist/components/select/select2.vue.js +73 -75
- package/dist/components/select-v2/src/defaults.d.ts +1 -0
- package/dist/components/select-v2/src/defaults.js +1 -1
- package/dist/components/select-v2/src/select.vue.d.ts +3 -1
- package/dist/components/select-v2/src/select.vue.js +21 -21
- package/dist/components/select-v2/src/select2.vue.js +27 -29
- package/dist/components/tree-select/src/tree-select.vue.d.ts +2 -0
- 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,137 @@
|
|
|
1
|
+
# EpTooltip
|
|
2
|
+
|
|
3
|
+
`ep-tooltip` · layout(布局) · `component:tooltip`
|
|
4
|
+
|
|
5
|
+
## 摘要
|
|
6
|
+
|
|
7
|
+
文字提示,悬停展示简短说明
|
|
8
|
+
|
|
9
|
+
## 适用场景
|
|
10
|
+
|
|
11
|
+
- 适用:图标或截断文本的解释
|
|
12
|
+
- 适用:补充字段含义与操作说明
|
|
13
|
+
- 不适用:需要承载可交互内容时使用 Popover
|
|
14
|
+
|
|
15
|
+
## 关键词
|
|
16
|
+
|
|
17
|
+
- 中文:文字提示、悬停、气泡、布局
|
|
18
|
+
- English: tooltip, hint, hover, layout
|
|
19
|
+
|
|
20
|
+
## 变体
|
|
21
|
+
|
|
22
|
+
- state: disabled(通过布尔属性切换禁用、加载或选中状态)
|
|
23
|
+
- effect: dark/light(通过视觉修饰属性调整外观效果)
|
|
24
|
+
|
|
25
|
+
## Props
|
|
26
|
+
|
|
27
|
+
- showArrow (boolean,默认 true):是否显示箭头
|
|
28
|
+
- onUpdate:visible (unknown)
|
|
29
|
+
- role (unknown,默认 见文档)
|
|
30
|
+
- appendTo (unknown)
|
|
31
|
+
- content (string,默认 ''):显示的内容
|
|
32
|
+
- rawContent (boolean):content 中的内容是否作为 HTML 字符串处理
|
|
33
|
+
- persistent (boolean):当 tooltip 组件长时间不触发且 persistent 为 false 时销毁
|
|
34
|
+
- visible(别名 v-model:visible) (boolean,默认 见文档):Tooltip 组件可见性
|
|
35
|
+
- transition (string):动画名称
|
|
36
|
+
- teleported (boolean,默认 true):是否使用 teleport
|
|
37
|
+
- disabled (boolean):Tooltip 组件是否禁用
|
|
38
|
+
- ariaLabel (string):与 aria-label 属性保持一致
|
|
39
|
+
- showAfter (number,默认 0):在触发后多久显示内容
|
|
40
|
+
- hideAfter (number,默认 200):延迟关闭
|
|
41
|
+
- autoClose (number,默认 0):自动隐藏时长
|
|
42
|
+
- id (unknown)
|
|
43
|
+
- style (unknown,默认 见文档)
|
|
44
|
+
- className (unknown)
|
|
45
|
+
- effect ('dark' | 'light',默认 dark):Tooltip 主题
|
|
46
|
+
- enterable (boolean,默认 true):鼠标是否可进入到 tooltip 中
|
|
47
|
+
- pure (unknown,默认 见文档)
|
|
48
|
+
- focusOnShow (unknown,默认 见文档)
|
|
49
|
+
- trapping (unknown,默认 见文档)
|
|
50
|
+
- popperClass (string):为 Tooltip 的 popper 添加类名
|
|
51
|
+
- popperStyle (unknown,默认 见文档)
|
|
52
|
+
- referenceEl (unknown)
|
|
53
|
+
- triggerTargetEl (unknown)
|
|
54
|
+
- stopPopperMouseEvent (unknown,默认 见文档)
|
|
55
|
+
- virtualTriggering (boolean,默认 false):是否使用虚拟触发
|
|
56
|
+
- zIndex (unknown)
|
|
57
|
+
- loop (unknown,默认 见文档)
|
|
58
|
+
- boundariesPadding (unknown,默认 见文档)
|
|
59
|
+
- fallbackPlacements (unknown)
|
|
60
|
+
- gpuAcceleration (unknown,默认 见文档)
|
|
61
|
+
- offset (number,默认 12):出现位置的偏移量
|
|
62
|
+
- placement ('top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end',默认 bottom):Tooltip 组件出现的位置
|
|
63
|
+
- popperOptions (object,默认 {}):popper.js 的参数
|
|
64
|
+
- strategy (unknown,默认 见文档)
|
|
65
|
+
- arrowOffset (unknown,默认 见文档)
|
|
66
|
+
- trigger ('hover' | 'click' | 'focus' | 'contextmenu',默认 hover):如何触发 Tooltip
|
|
67
|
+
- triggerKeys (string[],默认 ['Enter', 'Space']):触发 tooltip 显示的按键
|
|
68
|
+
- focusOnTarget (unknown)
|
|
69
|
+
- virtualRef (HTMLElement):虚拟触发的引用
|
|
70
|
+
- onMouseenter (unknown)
|
|
71
|
+
- onMouseleave (unknown)
|
|
72
|
+
- onClick (unknown)
|
|
73
|
+
- onKeydown (unknown)
|
|
74
|
+
- onFocus (unknown)
|
|
75
|
+
- onBlur (unknown)
|
|
76
|
+
- onContextmenu (unknown)
|
|
77
|
+
- open (unknown)
|
|
78
|
+
|
|
79
|
+
## Events
|
|
80
|
+
|
|
81
|
+
- update:visible((visible: boolean)):Tooltip 可见性变化时触发
|
|
82
|
+
- beforeShow((event?: Event)):显示动画播放前触发
|
|
83
|
+
- beforeHide((event?: Event)):隐藏动画播放前触发
|
|
84
|
+
- show((event?: Event)):显示时触发
|
|
85
|
+
- hide((event?: Event)):隐藏时触发
|
|
86
|
+
- open((event?: Event)):显示时触发(兼容事件名,建议监听 show)
|
|
87
|
+
- close((event?: Event)):隐藏时触发(兼容事件名,建议监听 hide)
|
|
88
|
+
|
|
89
|
+
## Slots
|
|
90
|
+
|
|
91
|
+
- default:Tooltip 触发 & 引用的元素
|
|
92
|
+
- content:自定义内容
|
|
93
|
+
|
|
94
|
+
## 视觉提示
|
|
95
|
+
|
|
96
|
+
- 形状:区块容器
|
|
97
|
+
- 密度:宽松
|
|
98
|
+
- 插槽内容:default:Tooltip 触发 & 引用的元素;content:自定义内容
|
|
99
|
+
- CSS 变量:--el-bg-color、--el-border-color、--el-border-radius-base
|
|
100
|
+
|
|
101
|
+
## 示例
|
|
102
|
+
|
|
103
|
+
### 基础提示
|
|
104
|
+
|
|
105
|
+
```vue
|
|
106
|
+
<script setup lang="ts">
|
|
107
|
+
import { EpButton, EpTooltip } from 'ep-craft'
|
|
108
|
+
</script>
|
|
109
|
+
|
|
110
|
+
<template>
|
|
111
|
+
<ep-tooltip content="这里展示提示内容">
|
|
112
|
+
<ep-button>悬停查看</ep-button>
|
|
113
|
+
</ep-tooltip>
|
|
114
|
+
</template>
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### 深色提示
|
|
118
|
+
|
|
119
|
+
```vue
|
|
120
|
+
<script setup lang="ts">
|
|
121
|
+
import { EpButton, EpTooltip } from 'ep-craft'
|
|
122
|
+
</script>
|
|
123
|
+
|
|
124
|
+
<template>
|
|
125
|
+
<ep-tooltip content="右侧提示" placement="right" effect="dark">
|
|
126
|
+
<ep-button>右侧</ep-button>
|
|
127
|
+
</ep-tooltip>
|
|
128
|
+
</template>
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## 相关条目
|
|
132
|
+
|
|
133
|
+
- EpPopover
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
ep-craft 0.2.0
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
{
|
|
2
|
+
"entry": {
|
|
3
|
+
"category": "feedback",
|
|
4
|
+
"events": [
|
|
5
|
+
{
|
|
6
|
+
"description": "关闭当前步骤时触发",
|
|
7
|
+
"name": "close",
|
|
8
|
+
"params": "—"
|
|
9
|
+
}
|
|
10
|
+
],
|
|
11
|
+
"exampleOmittedReason": null,
|
|
12
|
+
"examples": [
|
|
13
|
+
{
|
|
14
|
+
"code": "<script setup lang=\"ts\">\nimport { ref } from 'vue'\nimport { EpButton, EpTour, EpTourStep } from 'ep-craft'\n\nconst open = ref(true)\n</script>\n\n<template>\n <ep-button id=\"tour-step-target\">目标按钮</ep-button>\n <ep-tour v-model=\"open\">\n <ep-tour-step target=\"#tour-step-target\" title=\"说明\" description=\"引导步骤内容\" />\n </ep-tour>\n</template>",
|
|
15
|
+
"id": "tour-step-1",
|
|
16
|
+
"language": "vue",
|
|
17
|
+
"title": "引导步骤"
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
"exposes": [],
|
|
21
|
+
"hot": false,
|
|
22
|
+
"id": "component:tour-step",
|
|
23
|
+
"keywords": {
|
|
24
|
+
"en": [
|
|
25
|
+
"tour-step",
|
|
26
|
+
"tour",
|
|
27
|
+
"step",
|
|
28
|
+
"guide",
|
|
29
|
+
"feedback"
|
|
30
|
+
],
|
|
31
|
+
"zh": [
|
|
32
|
+
"引导步骤",
|
|
33
|
+
"反馈"
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
"kind": "component",
|
|
37
|
+
"name": "EpTourStep",
|
|
38
|
+
"nonUseCases": [
|
|
39
|
+
"无需用户感知状态变化时",
|
|
40
|
+
"需要完整业务弹窗流程时优先使用 Dialog"
|
|
41
|
+
],
|
|
42
|
+
"props": [
|
|
43
|
+
{
|
|
44
|
+
"alias": null,
|
|
45
|
+
"defaultText": null,
|
|
46
|
+
"description": "引导卡片指向的元素,为空时显示在屏幕中央",
|
|
47
|
+
"hasDefault": false,
|
|
48
|
+
"name": "target",
|
|
49
|
+
"required": false,
|
|
50
|
+
"type": "string | HTMLElement | (() => HTMLElement | null) | null"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"alias": null,
|
|
54
|
+
"defaultText": null,
|
|
55
|
+
"description": "引导内容标题",
|
|
56
|
+
"hasDefault": false,
|
|
57
|
+
"name": "title",
|
|
58
|
+
"required": false,
|
|
59
|
+
"type": "string"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"alias": null,
|
|
63
|
+
"defaultText": null,
|
|
64
|
+
"description": "描述内容",
|
|
65
|
+
"hasDefault": false,
|
|
66
|
+
"name": "description",
|
|
67
|
+
"required": false,
|
|
68
|
+
"type": "string"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"alias": null,
|
|
72
|
+
"defaultText": null,
|
|
73
|
+
"description": "是否显示关闭按钮",
|
|
74
|
+
"hasDefault": true,
|
|
75
|
+
"name": "showClose",
|
|
76
|
+
"required": false,
|
|
77
|
+
"type": "boolean"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"alias": null,
|
|
81
|
+
"defaultText": null,
|
|
82
|
+
"description": "自定义关闭图标",
|
|
83
|
+
"hasDefault": false,
|
|
84
|
+
"name": "closeIcon",
|
|
85
|
+
"required": false,
|
|
86
|
+
"type": "string | Component"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"alias": null,
|
|
90
|
+
"defaultText": null,
|
|
91
|
+
"description": "是否显示箭头",
|
|
92
|
+
"hasDefault": true,
|
|
93
|
+
"name": "showArrow",
|
|
94
|
+
"required": false,
|
|
95
|
+
"type": "boolean"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"alias": null,
|
|
99
|
+
"defaultText": "bottom",
|
|
100
|
+
"description": "引导卡片相对目标元素的位置",
|
|
101
|
+
"hasDefault": true,
|
|
102
|
+
"name": "placement",
|
|
103
|
+
"required": false,
|
|
104
|
+
"type": "Placement"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"alias": null,
|
|
108
|
+
"defaultText": null,
|
|
109
|
+
"description": "是否启用遮罩,可传对象自定义样式与填充色",
|
|
110
|
+
"hasDefault": true,
|
|
111
|
+
"name": "mask",
|
|
112
|
+
"required": false,
|
|
113
|
+
"type": "boolean | TourMask"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"alias": null,
|
|
117
|
+
"defaultText": null,
|
|
118
|
+
"description": "内容自定义样式",
|
|
119
|
+
"hasDefault": false,
|
|
120
|
+
"name": "contentStyle",
|
|
121
|
+
"required": false,
|
|
122
|
+
"type": "CSSProperties"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"alias": null,
|
|
126
|
+
"defaultText": null,
|
|
127
|
+
"description": "上一步按钮的属性",
|
|
128
|
+
"hasDefault": false,
|
|
129
|
+
"name": "prevButtonProps",
|
|
130
|
+
"required": false,
|
|
131
|
+
"type": "TourBtnProps"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"alias": null,
|
|
135
|
+
"defaultText": null,
|
|
136
|
+
"description": "下一步按钮的属性",
|
|
137
|
+
"hasDefault": false,
|
|
138
|
+
"name": "nextButtonProps",
|
|
139
|
+
"required": false,
|
|
140
|
+
"type": "TourBtnProps"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"alias": null,
|
|
144
|
+
"defaultText": null,
|
|
145
|
+
"description": "自定义 scrollIntoView 配置",
|
|
146
|
+
"hasDefault": true,
|
|
147
|
+
"name": "scrollIntoViewOptions",
|
|
148
|
+
"required": false,
|
|
149
|
+
"type": "boolean | ScrollIntoViewOptions"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"alias": null,
|
|
153
|
+
"defaultText": null,
|
|
154
|
+
"description": "类型,影响背景色与文字颜色",
|
|
155
|
+
"hasDefault": false,
|
|
156
|
+
"name": "type",
|
|
157
|
+
"required": false,
|
|
158
|
+
"type": "'default' | 'primary'"
|
|
159
|
+
}
|
|
160
|
+
],
|
|
161
|
+
"related": [
|
|
162
|
+
"EpTour"
|
|
163
|
+
],
|
|
164
|
+
"relations": {
|
|
165
|
+
"children": [],
|
|
166
|
+
"combos": [
|
|
167
|
+
"EpTour + EpTourStep"
|
|
168
|
+
],
|
|
169
|
+
"parents": [
|
|
170
|
+
"EpTour"
|
|
171
|
+
],
|
|
172
|
+
"requiredChildren": []
|
|
173
|
+
},
|
|
174
|
+
"slots": [
|
|
175
|
+
{
|
|
176
|
+
"description": "自定义头部内容",
|
|
177
|
+
"name": "header"
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"description": "自定义主体内容",
|
|
181
|
+
"name": "default"
|
|
182
|
+
}
|
|
183
|
+
],
|
|
184
|
+
"slug": "tour-step",
|
|
185
|
+
"summary": "引导步骤,状态与结果反馈",
|
|
186
|
+
"tag": "ep-tour-step",
|
|
187
|
+
"useCases": [
|
|
188
|
+
"展示引导步骤并向用户传达状态",
|
|
189
|
+
"在操作前后提供即时反馈"
|
|
190
|
+
],
|
|
191
|
+
"variants": [
|
|
192
|
+
{
|
|
193
|
+
"dimension": "type",
|
|
194
|
+
"values": [
|
|
195
|
+
"default",
|
|
196
|
+
"primary"
|
|
197
|
+
],
|
|
198
|
+
"when": "通过 type 选择类型,影响背景色与文字颜色"
|
|
199
|
+
}
|
|
200
|
+
],
|
|
201
|
+
"visual": {
|
|
202
|
+
"cssVars": [
|
|
203
|
+
"--el-color-success",
|
|
204
|
+
"--el-color-warning",
|
|
205
|
+
"--el-color-danger",
|
|
206
|
+
"--el-font-size-base"
|
|
207
|
+
],
|
|
208
|
+
"density": "中等",
|
|
209
|
+
"shape": "行内或块级提示",
|
|
210
|
+
"slotContent": [
|
|
211
|
+
"header:自定义头部内容",
|
|
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
|
+
# EpTourStep
|
|
2
|
+
|
|
3
|
+
`ep-tour-step` · feedback(反馈) · `component:tour-step`
|
|
4
|
+
|
|
5
|
+
## 摘要
|
|
6
|
+
|
|
7
|
+
引导步骤,状态与结果反馈
|
|
8
|
+
|
|
9
|
+
## 适用场景
|
|
10
|
+
|
|
11
|
+
- 适用:展示引导步骤并向用户传达状态
|
|
12
|
+
- 适用:在操作前后提供即时反馈
|
|
13
|
+
- 不适用:无需用户感知状态变化时
|
|
14
|
+
- 不适用:需要完整业务弹窗流程时优先使用 Dialog
|
|
15
|
+
|
|
16
|
+
## 关键词
|
|
17
|
+
|
|
18
|
+
- 中文:引导步骤、反馈
|
|
19
|
+
- English: tour-step, tour, step, guide, feedback
|
|
20
|
+
|
|
21
|
+
## 变体
|
|
22
|
+
|
|
23
|
+
- type: default/primary(通过 type 选择类型,影响背景色与文字颜色)
|
|
24
|
+
|
|
25
|
+
## Props
|
|
26
|
+
|
|
27
|
+
- target (string | HTMLElement | (() => HTMLElement | null) | null):引导卡片指向的元素,为空时显示在屏幕中央
|
|
28
|
+
- title (string):引导内容标题
|
|
29
|
+
- description (string):描述内容
|
|
30
|
+
- showClose (boolean,默认 见文档):是否显示关闭按钮
|
|
31
|
+
- closeIcon (string | Component):自定义关闭图标
|
|
32
|
+
- showArrow (boolean,默认 见文档):是否显示箭头
|
|
33
|
+
- placement (Placement,默认 bottom):引导卡片相对目标元素的位置
|
|
34
|
+
- mask (boolean | TourMask,默认 见文档):是否启用遮罩,可传对象自定义样式与填充色
|
|
35
|
+
- contentStyle (CSSProperties):内容自定义样式
|
|
36
|
+
- prevButtonProps (TourBtnProps):上一步按钮的属性
|
|
37
|
+
- nextButtonProps (TourBtnProps):下一步按钮的属性
|
|
38
|
+
- scrollIntoViewOptions (boolean | ScrollIntoViewOptions,默认 见文档):自定义 scrollIntoView 配置
|
|
39
|
+
- type ('default' | 'primary'):类型,影响背景色与文字颜色
|
|
40
|
+
|
|
41
|
+
## Events
|
|
42
|
+
|
|
43
|
+
- close(—):关闭当前步骤时触发
|
|
44
|
+
|
|
45
|
+
## Slots
|
|
46
|
+
|
|
47
|
+
- header:自定义头部内容
|
|
48
|
+
- default:自定义主体内容
|
|
49
|
+
|
|
50
|
+
## 关系
|
|
51
|
+
|
|
52
|
+
- 父级:EpTour
|
|
53
|
+
- 常用组合:EpTour + EpTourStep
|
|
54
|
+
|
|
55
|
+
## 视觉提示
|
|
56
|
+
|
|
57
|
+
- 形状:行内或块级提示
|
|
58
|
+
- 密度:中等
|
|
59
|
+
- 插槽内容:header:自定义头部内容;default:自定义主体内容
|
|
60
|
+
- CSS 变量:--el-color-success、--el-color-warning、--el-color-danger、--el-font-size-base
|
|
61
|
+
|
|
62
|
+
## 示例
|
|
63
|
+
|
|
64
|
+
### 引导步骤
|
|
65
|
+
|
|
66
|
+
```vue
|
|
67
|
+
<script setup lang="ts">
|
|
68
|
+
import { ref } from 'vue'
|
|
69
|
+
import { EpButton, EpTour, EpTourStep } from 'ep-craft'
|
|
70
|
+
|
|
71
|
+
const open = ref(true)
|
|
72
|
+
</script>
|
|
73
|
+
|
|
74
|
+
<template>
|
|
75
|
+
<ep-button id="tour-step-target">目标按钮</ep-button>
|
|
76
|
+
<ep-tour v-model="open">
|
|
77
|
+
<ep-tour-step target="#tour-step-target" title="说明" description="引导步骤内容" />
|
|
78
|
+
</ep-tour>
|
|
79
|
+
</template>
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## 相关条目
|
|
83
|
+
|
|
84
|
+
- EpTour
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
ep-craft 0.2.0
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
{
|
|
2
|
+
"entry": {
|
|
3
|
+
"category": "feedback",
|
|
4
|
+
"events": [
|
|
5
|
+
{
|
|
6
|
+
"description": "打开状态变化时触发",
|
|
7
|
+
"name": "update:modelValue",
|
|
8
|
+
"params": "(value: boolean)"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"description": "当前步骤变化时触发",
|
|
12
|
+
"name": "update:current",
|
|
13
|
+
"params": "(current: number)"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"description": "关闭引导时触发",
|
|
17
|
+
"name": "close",
|
|
18
|
+
"params": "(current: number)"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"description": "完成全部步骤时触发",
|
|
22
|
+
"name": "finish",
|
|
23
|
+
"params": "—"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"description": "当前步骤变化时触发",
|
|
27
|
+
"name": "change",
|
|
28
|
+
"params": "(current: number)"
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
"exampleOmittedReason": null,
|
|
32
|
+
"examples": [
|
|
33
|
+
{
|
|
34
|
+
"code": "<script setup lang=\"ts\">\nimport { ref } from 'vue'\nimport { EpButton, EpTour, EpTourStep } from 'ep-craft'\n\nconst open = ref(false)\n</script>\n\n<template>\n <ep-button id=\"tour-target\" type=\"primary\" @click=\"open = true\">新建项目</ep-button>\n <ep-tour v-model=\"open\">\n <ep-tour-step target=\"#tour-target\" title=\"第一步\" description=\"点击这里创建项目\" />\n </ep-tour>\n</template>",
|
|
35
|
+
"id": "tour-1",
|
|
36
|
+
"language": "vue",
|
|
37
|
+
"title": "漫游引导"
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
"exposes": [],
|
|
41
|
+
"hot": false,
|
|
42
|
+
"id": "component:tour",
|
|
43
|
+
"keywords": {
|
|
44
|
+
"en": [
|
|
45
|
+
"tour",
|
|
46
|
+
"guide",
|
|
47
|
+
"feedback"
|
|
48
|
+
],
|
|
49
|
+
"zh": [
|
|
50
|
+
"漫游式引导",
|
|
51
|
+
"反馈"
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
"kind": "component",
|
|
55
|
+
"name": "EpTour",
|
|
56
|
+
"nonUseCases": [
|
|
57
|
+
"无需用户感知状态变化时",
|
|
58
|
+
"需要完整业务弹窗流程时优先使用 Dialog"
|
|
59
|
+
],
|
|
60
|
+
"props": [
|
|
61
|
+
{
|
|
62
|
+
"alias": "v-model",
|
|
63
|
+
"defaultText": "false",
|
|
64
|
+
"description": "是否打开引导",
|
|
65
|
+
"hasDefault": false,
|
|
66
|
+
"name": "modelValue",
|
|
67
|
+
"required": false,
|
|
68
|
+
"type": "boolean"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"alias": null,
|
|
72
|
+
"defaultText": null,
|
|
73
|
+
"description": "当前步骤索引",
|
|
74
|
+
"hasDefault": false,
|
|
75
|
+
"name": "current",
|
|
76
|
+
"required": false,
|
|
77
|
+
"type": "number"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"alias": null,
|
|
81
|
+
"defaultText": "true",
|
|
82
|
+
"description": "是否显示箭头",
|
|
83
|
+
"hasDefault": true,
|
|
84
|
+
"name": "showArrow",
|
|
85
|
+
"required": false,
|
|
86
|
+
"type": "boolean"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"alias": null,
|
|
90
|
+
"defaultText": "true",
|
|
91
|
+
"description": "是否显示关闭按钮",
|
|
92
|
+
"hasDefault": true,
|
|
93
|
+
"name": "showClose",
|
|
94
|
+
"required": false,
|
|
95
|
+
"type": "boolean"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"alias": null,
|
|
99
|
+
"defaultText": null,
|
|
100
|
+
"description": "自定义关闭图标",
|
|
101
|
+
"hasDefault": false,
|
|
102
|
+
"name": "closeIcon",
|
|
103
|
+
"required": false,
|
|
104
|
+
"type": "string | Component"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"alias": null,
|
|
108
|
+
"defaultText": "bottom",
|
|
109
|
+
"description": "引导卡片相对目标元素的位置",
|
|
110
|
+
"hasDefault": true,
|
|
111
|
+
"name": "placement",
|
|
112
|
+
"required": false,
|
|
113
|
+
"type": "Placement"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"alias": null,
|
|
117
|
+
"defaultText": null,
|
|
118
|
+
"description": "内容自定义样式",
|
|
119
|
+
"hasDefault": false,
|
|
120
|
+
"name": "contentStyle",
|
|
121
|
+
"required": false,
|
|
122
|
+
"type": "CSSProperties"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"alias": null,
|
|
126
|
+
"defaultText": "true",
|
|
127
|
+
"description": "是否启用遮罩,可传对象自定义样式与填充色",
|
|
128
|
+
"hasDefault": true,
|
|
129
|
+
"name": "mask",
|
|
130
|
+
"required": false,
|
|
131
|
+
"type": "boolean | TourMask"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"alias": null,
|
|
135
|
+
"defaultText": "{ offset: 6, radius: 2 }",
|
|
136
|
+
"description": "遮罩与目标元素之间的间隙",
|
|
137
|
+
"hasDefault": true,
|
|
138
|
+
"name": "gap",
|
|
139
|
+
"required": false,
|
|
140
|
+
"type": "{ offset?: number; radius?: number }"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"alias": null,
|
|
144
|
+
"defaultText": null,
|
|
145
|
+
"description": "引导层 z-index",
|
|
146
|
+
"hasDefault": false,
|
|
147
|
+
"name": "zIndex",
|
|
148
|
+
"required": false,
|
|
149
|
+
"type": "number"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"alias": null,
|
|
153
|
+
"defaultText": "{ block: \"center\" }",
|
|
154
|
+
"description": "自定义 scrollIntoView 配置",
|
|
155
|
+
"hasDefault": true,
|
|
156
|
+
"name": "scrollIntoViewOptions",
|
|
157
|
+
"required": false,
|
|
158
|
+
"type": "boolean | ScrollIntoViewOptions"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"alias": null,
|
|
162
|
+
"defaultText": null,
|
|
163
|
+
"description": "类型,影响背景色与文字颜色",
|
|
164
|
+
"hasDefault": false,
|
|
165
|
+
"name": "type",
|
|
166
|
+
"required": false,
|
|
167
|
+
"type": "'default' | 'primary'"
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"alias": null,
|
|
171
|
+
"defaultText": "body",
|
|
172
|
+
"description": "引导内容挂载的容器",
|
|
173
|
+
"hasDefault": true,
|
|
174
|
+
"name": "appendTo",
|
|
175
|
+
"required": false,
|
|
176
|
+
"type": "string | HTMLElement"
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"alias": null,
|
|
180
|
+
"defaultText": "true",
|
|
181
|
+
"description": "按 ESC 是否关闭引导",
|
|
182
|
+
"hasDefault": true,
|
|
183
|
+
"name": "closeOnPressEscape",
|
|
184
|
+
"required": false,
|
|
185
|
+
"type": "boolean"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"alias": null,
|
|
189
|
+
"defaultText": "true",
|
|
190
|
+
"description": "使用遮罩时目标区域是否可点击",
|
|
191
|
+
"hasDefault": true,
|
|
192
|
+
"name": "targetAreaClickable",
|
|
193
|
+
"required": false,
|
|
194
|
+
"type": "boolean"
|
|
195
|
+
}
|
|
196
|
+
],
|
|
197
|
+
"related": [
|
|
198
|
+
"EpTourStep",
|
|
199
|
+
"EpDialog"
|
|
200
|
+
],
|
|
201
|
+
"relations": {
|
|
202
|
+
"children": [
|
|
203
|
+
"EpTourStep"
|
|
204
|
+
],
|
|
205
|
+
"combos": [
|
|
206
|
+
"EpTour + EpTourStep"
|
|
207
|
+
],
|
|
208
|
+
"parents": [],
|
|
209
|
+
"requiredChildren": [
|
|
210
|
+
"EpTourStep"
|
|
211
|
+
]
|
|
212
|
+
},
|
|
213
|
+
"slots": [
|
|
214
|
+
{
|
|
215
|
+
"description": "步骤内容,通常放置 ep-tour-step",
|
|
216
|
+
"name": "default"
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"description": "自定义步骤指示器,参数为 `{ current, total }`",
|
|
220
|
+
"name": "indicators"
|
|
221
|
+
}
|
|
222
|
+
],
|
|
223
|
+
"slug": "tour",
|
|
224
|
+
"summary": "漫游式引导,状态与结果反馈",
|
|
225
|
+
"tag": "ep-tour",
|
|
226
|
+
"useCases": [
|
|
227
|
+
"展示漫游式引导并向用户传达状态",
|
|
228
|
+
"在操作前后提供即时反馈"
|
|
229
|
+
],
|
|
230
|
+
"variants": [
|
|
231
|
+
{
|
|
232
|
+
"dimension": "type",
|
|
233
|
+
"values": [
|
|
234
|
+
"default",
|
|
235
|
+
"primary"
|
|
236
|
+
],
|
|
237
|
+
"when": "通过 type 选择类型,影响背景色与文字颜色"
|
|
238
|
+
}
|
|
239
|
+
],
|
|
240
|
+
"visual": {
|
|
241
|
+
"cssVars": [
|
|
242
|
+
"--el-color-success",
|
|
243
|
+
"--el-color-warning",
|
|
244
|
+
"--el-color-danger",
|
|
245
|
+
"--el-font-size-base"
|
|
246
|
+
],
|
|
247
|
+
"density": "中等",
|
|
248
|
+
"shape": "行内或块级提示",
|
|
249
|
+
"slotContent": [
|
|
250
|
+
"default:步骤内容,通常放置 ep-tour-step",
|
|
251
|
+
"indicators:自定义步骤指示器,参数为 `{ current, total }`"
|
|
252
|
+
]
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
"generatedAt": "2026-11-03T03:09:12.050Z",
|
|
256
|
+
"libraryVersion": "0.2.0",
|
|
257
|
+
"schemaVersion": 1
|
|
258
|
+
}
|