@fox-js/phone-skills 4.0.1-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/README.md +30 -0
- package/foxui/SKILL.md +442 -0
- package/foxui/references/fox-action-sheet/doc.md +74 -0
- package/foxui/references/fox-actionsheet-item/doc.md +499 -0
- package/foxui/references/fox-animate/doc.md +66 -0
- package/foxui/references/fox-audio/doc.md +76 -0
- package/foxui/references/fox-avatar/doc.md +70 -0
- package/foxui/references/fox-back-top/doc.md +69 -0
- package/foxui/references/fox-badge/doc.md +72 -0
- package/foxui/references/fox-barrage/doc.md +116 -0
- package/foxui/references/fox-button/doc.md +203 -0
- package/foxui/references/fox-calendar/doc.md +346 -0
- package/foxui/references/fox-calendar-item/doc.md +331 -0
- package/foxui/references/fox-cascader/doc.md +78 -0
- package/foxui/references/fox-cascader-item/doc.md +710 -0
- package/foxui/references/fox-cell/doc.md +74 -0
- package/foxui/references/fox-checkbox-item/doc.md +387 -0
- package/foxui/references/fox-circle-progress/doc.md +65 -0
- package/foxui/references/fox-collapse/doc.md +71 -0
- package/foxui/references/fox-count-down/doc.md +78 -0
- package/foxui/references/fox-count-up/doc.md +178 -0
- package/foxui/references/fox-date-item/doc.md +437 -0
- package/foxui/references/fox-date-picker/doc.md +438 -0
- package/foxui/references/fox-dialog/doc.md +242 -0
- package/foxui/references/fox-divider/doc.md +149 -0
- package/foxui/references/fox-domain-provider/doc.md +93 -0
- package/foxui/references/fox-drag/doc.md +64 -0
- package/foxui/references/fox-dropdown/doc.md +138 -0
- package/foxui/references/fox-elevator/doc.md +66 -0
- package/foxui/references/fox-ellipsis/doc.md +69 -0
- package/foxui/references/fox-empty/doc.md +67 -0
- package/foxui/references/fox-fixed-nav/doc.md +72 -0
- package/foxui/references/fox-floating-button/doc.md +142 -0
- package/foxui/references/fox-grid/doc.md +69 -0
- package/foxui/references/fox-group/doc.md +295 -0
- package/foxui/references/fox-icon/doc.md +65 -0
- package/foxui/references/fox-image/doc.md +75 -0
- package/foxui/references/fox-image-preview/doc.md +79 -0
- package/foxui/references/fox-indicator/doc.md +70 -0
- package/foxui/references/fox-infinite-loading/doc.md +74 -0
- package/foxui/references/fox-input-item/doc.md +210 -0
- package/foxui/references/fox-input-number/doc.md +199 -0
- package/foxui/references/fox-input-number-item/doc.md +213 -0
- package/foxui/references/fox-item/doc.md +207 -0
- package/foxui/references/fox-layout/doc.md +273 -0
- package/foxui/references/fox-link-item/doc.md +158 -0
- package/foxui/references/fox-list/doc.md +71 -0
- package/foxui/references/fox-mapping/doc.md +251 -0
- package/foxui/references/fox-menu/doc.md +425 -0
- package/foxui/references/fox-message-box/doc.md +200 -0
- package/foxui/references/fox-money-item/doc.md +174 -0
- package/foxui/references/fox-more-button/doc.md +208 -0
- package/foxui/references/fox-navbar/doc.md +75 -0
- package/foxui/references/fox-notice-bar/doc.md +71 -0
- package/foxui/references/fox-notify/doc.md +72 -0
- package/foxui/references/fox-number-keyboard/doc.md +77 -0
- package/foxui/references/fox-over-lay/doc.md +70 -0
- package/foxui/references/fox-page/doc.md +76 -0
- package/foxui/references/fox-pagination/doc.md +73 -0
- package/foxui/references/fox-picker/doc.md +668 -0
- package/foxui/references/fox-picker-item/doc.md +389 -0
- package/foxui/references/fox-popover/doc.md +70 -0
- package/foxui/references/fox-popover-dialog/doc.md +113 -0
- package/foxui/references/fox-popup/doc.md +88 -0
- package/foxui/references/fox-price/doc.md +67 -0
- package/foxui/references/fox-progress/doc.md +74 -0
- package/foxui/references/fox-pull-refresh/doc.md +77 -0
- package/foxui/references/fox-radio-item/doc.md +384 -0
- package/foxui/references/fox-range/doc.md +65 -0
- package/foxui/references/fox-rate/doc.md +141 -0
- package/foxui/references/fox-rate-item/doc.md +137 -0
- package/foxui/references/fox-rolling-provider/doc.md +87 -0
- package/foxui/references/fox-search-bar/doc.md +91 -0
- package/foxui/references/fox-short-password/doc.md +78 -0
- package/foxui/references/fox-side-nav-bar/doc.md +68 -0
- package/foxui/references/fox-signature/doc.md +202 -0
- package/foxui/references/fox-skeleton/doc.md +73 -0
- package/foxui/references/fox-steps/doc.md +162 -0
- package/foxui/references/fox-steps-bar/doc.md +610 -0
- package/foxui/references/fox-sticky/doc.md +68 -0
- package/foxui/references/fox-swipe/doc.md +176 -0
- package/foxui/references/fox-swiper/doc.md +254 -0
- package/foxui/references/fox-switch/doc.md +162 -0
- package/foxui/references/fox-switch-item/doc.md +190 -0
- package/foxui/references/fox-tabbar/doc.md +63 -0
- package/foxui/references/fox-table/doc.md +640 -0
- package/foxui/references/fox-tabs/doc.md +67 -0
- package/foxui/references/fox-tabs-bar/doc.md +533 -0
- package/foxui/references/fox-tag/doc.md +213 -0
- package/foxui/references/fox-text/doc.md +84 -0
- package/foxui/references/fox-textarea-item/doc.md +106 -0
- package/foxui/references/fox-toast/doc.md +149 -0
- package/foxui/references/fox-tour/doc.md +89 -0
- package/foxui/references/fox-trend-arrow/doc.md +72 -0
- package/foxui/references/fox-uploader/doc.md +96 -0
- package/foxui/references/fox-video/doc.md +245 -0
- package/foxui/references/fox-water-mark/doc.md +81 -0
- package/package.json +21 -0
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Author: 江成
|
|
3
|
+
* @Date: 2026-04-27 00:37:28
|
|
4
|
+
* @LastEditors: 江成
|
|
5
|
+
* @LastEditTime: 2026-05-12 22:33:21
|
|
6
|
+
-->
|
|
7
|
+
---
|
|
8
|
+
title: Signature 组件使用规范
|
|
9
|
+
impact: HIGH
|
|
10
|
+
type: capability
|
|
11
|
+
description: 签名组件
|
|
12
|
+
tags: [foxui, fox-signature, FoxSignature]
|
|
13
|
+
version: "4.0.0"
|
|
14
|
+
author: jiangcheng
|
|
15
|
+
related: ["fox-js","fox-group","fox-slot-item"]
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
# Signature 组件使用规范
|
|
19
|
+
|
|
20
|
+
## 1. 核心职责 (Core Responsibility)
|
|
21
|
+
Signature 是 foxui 中用于 **签名组件** 的标准组件。
|
|
22
|
+
- **基于**: NutUI `nut-signature` 进行了二次封装 (若为纯自研组件则填 "自定义开发")
|
|
23
|
+
- **核心增强**: 基于 NutUI 组件二次封装、支持插槽扩展自定义内容
|
|
24
|
+
- **适用场景**: 签名组件
|
|
25
|
+
|
|
26
|
+
> 💡 **关键原则**: 在所有 签名组件 中,**必须**优先使用此组件,禁止直接使用原生 NutUI 组件。
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## 2. 关键 API 说明 (Key API)
|
|
31
|
+
|
|
32
|
+
### 2.1 Props 属性
|
|
33
|
+
|
|
34
|
+
| 属性名 | 类型 | 必填 | 默认值 | 说明 |
|
|
35
|
+
| :--- | :--- | :---: | :---: | :--- |
|
|
36
|
+
| `custom-class` | 自定义 class | string | - |
|
|
37
|
+
| `line-width` | 线条的宽度 | number | 3 |
|
|
38
|
+
| `stroke-style` | 绘图笔触颜色 | string | 000 |
|
|
39
|
+
| `type` | 图片格式 | string | png |
|
|
40
|
+
| `un-support-tpl` | 不支持 Canvas 情况下的展示文案 | string | 对不起,当前浏览器不支持Canvas,无法使用本控件! |
|
|
41
|
+
|
|
42
|
+
### 2.2 Events 事件
|
|
43
|
+
|
|
44
|
+
| 事件名 | 类型 | 说明 |
|
|
45
|
+
| :--- | :--- | :--- |
|
|
46
|
+
| `start` | 签名开始回调函数(指某次笔画的开始) | - |
|
|
47
|
+
| `signing` | 正在签名的回调函数(指某次笔画进行中) | event |
|
|
48
|
+
| `end` | 签名结束回调函数(指某次笔画的结束) | - |
|
|
49
|
+
| `confirm` | 点击确认按钮触发事件回调函数 | canvas和签名图片展示的 data URI,<br>如未绘制,则返回提示信息和空 data URI |
|
|
50
|
+
| `clear` | 点击重签按钮触发事件回调函数 | - |
|
|
51
|
+
|
|
52
|
+
### 2.3 Methods 方法
|
|
53
|
+
|
|
54
|
+
| 方法名 | 参数 | 说明 |
|
|
55
|
+
| :--- | :--- | :--- |
|
|
56
|
+
| `confrm` | 确认签名 | - |
|
|
57
|
+
| `clear` | 清理签名 | - |
|
|
58
|
+
|
|
59
|
+
### 2.4 Slots 插槽
|
|
60
|
+
|
|
61
|
+
| 插槽名 | 说明 |
|
|
62
|
+
| :--- | :--- |
|
|
63
|
+
| `toolbar` | toolbar插槽 |
|
|
64
|
+
|
|
65
|
+
## 3. 例子 (Examples)
|
|
66
|
+
|
|
67
|
+
## 代码演示
|
|
68
|
+
|
|
69
|
+
### 基础用法
|
|
70
|
+
|
|
71
|
+
```html
|
|
72
|
+
<script lang="ts" setup>
|
|
73
|
+
import { useFoxI18n } from '@fox-js/i18n'
|
|
74
|
+
const messages = {
|
|
75
|
+
zh_CN: {
|
|
76
|
+
basic: '基本用法',
|
|
77
|
+
tips: 'Tips: 点击确认按钮,下方显示签名图片'
|
|
78
|
+
},
|
|
79
|
+
en_US: {
|
|
80
|
+
basic: 'Basic Usage',
|
|
81
|
+
tips: 'Tips: click the confirm button, and the signature image is displayed below'
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
const { t } = useFoxI18n({ messages })
|
|
85
|
+
|
|
86
|
+
// confirm
|
|
87
|
+
const confirm = (canvas: any, data: any) => {
|
|
88
|
+
const img = document.createElement('img')
|
|
89
|
+
img.src = data
|
|
90
|
+
const imgDemoDiv = document.querySelector('.img-demo')
|
|
91
|
+
imgDemoDiv?.appendChild(img)
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// clear
|
|
95
|
+
const clear = () => {
|
|
96
|
+
console.log('清除')
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// start
|
|
100
|
+
const start = () => {
|
|
101
|
+
console.log('签名开始')
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// end
|
|
105
|
+
const end = () => {
|
|
106
|
+
console.log('签名结束')
|
|
107
|
+
}
|
|
108
|
+
</script>
|
|
109
|
+
|
|
110
|
+
<template>
|
|
111
|
+
<fox-group class="signature-demo" :title="t('basic')" column="1">
|
|
112
|
+
<fox-slot-item>
|
|
113
|
+
<fox-signature @confirm="confirm" @clear="clear" custom-class="test" @start="start"></fox-signature>
|
|
114
|
+
<p class="demo-tips">{{ t('tips') }}</p>
|
|
115
|
+
</fox-slot-item>
|
|
116
|
+
<fox-slot-item class="img-demo"></fox-slot-item>
|
|
117
|
+
</fox-group>
|
|
118
|
+
</template>
|
|
119
|
+
|
|
120
|
+
<style lang="scss">
|
|
121
|
+
.signature-demo {
|
|
122
|
+
display: flex;
|
|
123
|
+
flex-direction: column;
|
|
124
|
+
.demo-tips {
|
|
125
|
+
font-size: 12px;
|
|
126
|
+
color: #666;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
</style>
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### 修改颜色和签字粗细
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
```html
|
|
139
|
+
|
|
140
|
+
<!--
|
|
141
|
+
* @Author: 江成
|
|
142
|
+
* @Date: 2026-05-11 10:56:11
|
|
143
|
+
* @LastEditors: 江成
|
|
144
|
+
* @LastEditTime: 2026-05-11 11:15:21
|
|
145
|
+
-->
|
|
146
|
+
<script lang="ts" setup>
|
|
147
|
+
import { reactive } from 'vue'
|
|
148
|
+
import { useFoxI18n } from '@fox-js/i18n'
|
|
149
|
+
|
|
150
|
+
// 国际化
|
|
151
|
+
const messages = {
|
|
152
|
+
zh_CN: {
|
|
153
|
+
title: '修改颜色和签字粗细',
|
|
154
|
+
tips: 'Tips: 点击确认按钮,下方显示签名图片'
|
|
155
|
+
},
|
|
156
|
+
en_US: {
|
|
157
|
+
title: 'Modify color and signature thickness',
|
|
158
|
+
tips: 'Tips: click the confirm button, and the signature image is displayed below'
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
const { t } = useFoxI18n({ messages })
|
|
163
|
+
|
|
164
|
+
const state = reactive({
|
|
165
|
+
lineWidth: 4,
|
|
166
|
+
strokeStyle: 'green'
|
|
167
|
+
})
|
|
168
|
+
|
|
169
|
+
// end
|
|
170
|
+
const end = () => {
|
|
171
|
+
console.log('签名结束')
|
|
172
|
+
}
|
|
173
|
+
</script>
|
|
174
|
+
|
|
175
|
+
<template>
|
|
176
|
+
<fox-group class="signature-demo" :title="t('title')" column="1">
|
|
177
|
+
<fox-slot-item>
|
|
178
|
+
<fox-signature :lineWidth="state.lineWidth" :strokeStyle="state.strokeStyle" @end="end"></fox-signature>
|
|
179
|
+
<p class="demo-tips">{{ t('tips') }}</p>
|
|
180
|
+
</fox-slot-item>
|
|
181
|
+
</fox-group>
|
|
182
|
+
</template>
|
|
183
|
+
|
|
184
|
+
<style lang="scss">
|
|
185
|
+
.signature-demo {
|
|
186
|
+
display: flex;
|
|
187
|
+
flex-direction: column;
|
|
188
|
+
.demo-tips {
|
|
189
|
+
font-size: 12px;
|
|
190
|
+
color: #666;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
</style>
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
## 4. 相关组件 (Related Components)
|
|
199
|
+
- **fox-js**: 与 Signature 配合使用的相关组件
|
|
200
|
+
- **fox-group**: 与 Signature 配合使用的相关组件
|
|
201
|
+
- **fox-slot-item**: 与 Signature 配合使用的相关组件
|
|
202
|
+
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Author: 江成
|
|
3
|
+
* @Date: 2026-04-27 00:37:28
|
|
4
|
+
* @LastEditors: 江成
|
|
5
|
+
* @LastEditTime: 2026-05-12 22:33:21
|
|
6
|
+
-->
|
|
7
|
+
---
|
|
8
|
+
title: Skeleton 组件使用规范
|
|
9
|
+
impact: HIGH
|
|
10
|
+
type: capability
|
|
11
|
+
description: 骨架屏
|
|
12
|
+
tags: [foxui, fox-skeleton, FoxSkeleton]
|
|
13
|
+
version: "4.0.0"
|
|
14
|
+
author: jiangcheng
|
|
15
|
+
related: ["fox-js","fox-switch","fox-avatar"]
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
# Skeleton 组件使用规范
|
|
19
|
+
|
|
20
|
+
## 1. 核心职责 (Core Responsibility)
|
|
21
|
+
Skeleton 是 foxui 中用于 **骨架屏** 的标准组件。
|
|
22
|
+
- **基于**: NutUI `nut-skeleton` 进行了二次封装 (若为纯自研组件则填 "自定义开发")
|
|
23
|
+
- **核心增强**: 基于 NutUI 组件二次封装、支持 v-model 双向绑定、适配 H5 与小程序多端、支持插槽扩展自定义内容
|
|
24
|
+
- **适用场景**: 骨架屏
|
|
25
|
+
|
|
26
|
+
> 💡 **关键原则**: 在所有 骨架屏 中,**必须**优先使用此组件,禁止直接使用原生 NutUI 组件。
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## 2. 关键 API 说明 (Key API)
|
|
31
|
+
|
|
32
|
+
### 2.1 Props 属性
|
|
33
|
+
|
|
34
|
+
| 属性名 | 类型 | 必填 | 默认值 | 说明 |
|
|
35
|
+
| :--- | :--- | :---: | :---: | :--- |
|
|
36
|
+
| `loading` | 是否显示骨架屏 | Boolean | true |
|
|
37
|
+
| `width` | 每行宽度 | String | default |
|
|
38
|
+
| `height` | 每行高度 | String | 100px |
|
|
39
|
+
| `animated` | 是否开启骨架屏动画 | Boolean | false |
|
|
40
|
+
| `avatar` | 是否显示头像 | Boolean | false |
|
|
41
|
+
| `avatar-shape` | 头像形状:正方形/圆形 | String | round |
|
|
42
|
+
| `avatar-size` | 头像大小 | String | 50px |
|
|
43
|
+
| `round` | 标题/段落是否采用圆角风格 | Boolean | false |
|
|
44
|
+
| `row` | 设置段落行数 | String | 1 |
|
|
45
|
+
| `title` | 是否显示段落标题 | Boolean | true |
|
|
46
|
+
|
|
47
|
+
### 2.2 Events 事件
|
|
48
|
+
|
|
49
|
+
| 事件名 | 类型 | 说明 |
|
|
50
|
+
| :--- | :--- | :--- |
|
|
51
|
+
无
|
|
52
|
+
|
|
53
|
+
### 2.3 Methods 方法
|
|
54
|
+
|
|
55
|
+
| 方法名 | 参数 | 说明 |
|
|
56
|
+
| :--- | :--- | :--- |
|
|
57
|
+
无
|
|
58
|
+
|
|
59
|
+
### 2.4 Slots 插槽
|
|
60
|
+
|
|
61
|
+
| 插槽名 | 说明 |
|
|
62
|
+
| :--- | :--- |
|
|
63
|
+
| `default` | 骨架屏显示内容 |
|
|
64
|
+
|
|
65
|
+
## 3. 例子 (Examples)
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
## 4. 相关组件 (Related Components)
|
|
70
|
+
- **fox-js**: 与 Skeleton 配合使用的相关组件
|
|
71
|
+
- **fox-switch**: 与 Skeleton 配合使用的相关组件
|
|
72
|
+
- **fox-avatar**: 与 Skeleton 配合使用的相关组件
|
|
73
|
+
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Author: 江成
|
|
3
|
+
* @Date: 2026-04-27 00:37:28
|
|
4
|
+
* @LastEditors: 江成
|
|
5
|
+
* @LastEditTime: 2026-05-12 22:33:21
|
|
6
|
+
-->
|
|
7
|
+
---
|
|
8
|
+
title: Steps 组件使用规范
|
|
9
|
+
impact: HIGH
|
|
10
|
+
type: capability
|
|
11
|
+
description: 步骤条
|
|
12
|
+
tags: [foxui, fox-steps, FoxSteps]
|
|
13
|
+
version: "4.0.0"
|
|
14
|
+
author: jiangcheng
|
|
15
|
+
related: ["fox-js","fox-step"]
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
# Steps 组件使用规范
|
|
19
|
+
|
|
20
|
+
## 1. 核心职责 (Core Responsibility)
|
|
21
|
+
Steps 是 foxui 中用于 **步骤条** 的标准组件。
|
|
22
|
+
- **基于**: NutUI `nut-steps` 进行了二次封装 (若为纯自研组件则填 "自定义开发")
|
|
23
|
+
- **核心增强**: 基于 NutUI 组件二次封装、适配 H5 与小程序多端、支持插槽扩展自定义内容、支持主题定制
|
|
24
|
+
- **适用场景**: 步骤条
|
|
25
|
+
|
|
26
|
+
> 💡 **关键原则**: 在所有 步骤条 中,**必须**优先使用此组件,禁止直接使用原生 NutUI 组件。
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## 2. 关键 API 说明 (Key API)
|
|
31
|
+
|
|
32
|
+
### 2.1 Props 属性
|
|
33
|
+
|
|
34
|
+
| 属性名 | 类型 | 必填 | 默认值 | 说明 |
|
|
35
|
+
| :--- | :--- | :---: | :---: | :--- |
|
|
36
|
+
| `title` | 流程步骤的标题 | string | 步骤 |
|
|
37
|
+
| `content` | 流程步骤的描述性文字支持 html 结构 | string | 步骤描述 |
|
|
38
|
+
|
|
39
|
+
### 2.2 Events 事件
|
|
40
|
+
|
|
41
|
+
| 事件名 | 类型 | 说明 |
|
|
42
|
+
| :--- | :--- | :--- |
|
|
43
|
+
| `click-step` | 点击步骤的标题或图标时触发 | index: number |
|
|
44
|
+
|
|
45
|
+
### 2.3 Methods 方法
|
|
46
|
+
|
|
47
|
+
| 方法名 | 参数 | 说明 |
|
|
48
|
+
| :--- | :--- | :--- |
|
|
49
|
+
无
|
|
50
|
+
|
|
51
|
+
### 2.4 Slots 插槽
|
|
52
|
+
|
|
53
|
+
| 插槽名 | 说明 |
|
|
54
|
+
| :--- | :--- |
|
|
55
|
+
| `title` | 步骤标题 |
|
|
56
|
+
| `content` | 步骤内容 |
|
|
57
|
+
| `icon` | 步骤图标 |
|
|
58
|
+
|
|
59
|
+
## 3. 例子 (Examples)
|
|
60
|
+
|
|
61
|
+
## 代码演示
|
|
62
|
+
|
|
63
|
+
### 基本用法
|
|
64
|
+
|
|
65
|
+
```html
|
|
66
|
+
<template>
|
|
67
|
+
<fox-steps :current="current1" @click-step="handleClickStep">
|
|
68
|
+
<fox-step title="步骤一">
|
|
69
|
+
1
|
|
70
|
+
<template v-slot:title>步骤一</template>
|
|
71
|
+
</fox-step>
|
|
72
|
+
<fox-step title="未开始">2</fox-step>
|
|
73
|
+
<fox-step title="未开始">3</fox-step>
|
|
74
|
+
<fox-step title="未开始">4</fox-step>
|
|
75
|
+
</fox-steps>
|
|
76
|
+
</template>
|
|
77
|
+
<script>
|
|
78
|
+
import { reactive, toRefs } from 'vue';
|
|
79
|
+
export default {
|
|
80
|
+
setup() {
|
|
81
|
+
const state = reactive({
|
|
82
|
+
current1: 1,
|
|
83
|
+
});
|
|
84
|
+
const handleClickStep = (index: number) => {
|
|
85
|
+
console.log(index)
|
|
86
|
+
};
|
|
87
|
+
return { ...toRefs(state), handleClickStep };
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
</script>
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### 标题和描述信息
|
|
94
|
+
|
|
95
|
+
```html
|
|
96
|
+
<template>
|
|
97
|
+
<fox-steps :current="current2">
|
|
98
|
+
<fox-step title="已完成" content="步骤描述">1</fox-step>
|
|
99
|
+
<fox-step title="进行中" content="步骤描述">2</fox-step>
|
|
100
|
+
<fox-step title="未开始" content="步骤描述">3</fox-step>
|
|
101
|
+
</fox-steps>
|
|
102
|
+
</template>
|
|
103
|
+
<script>
|
|
104
|
+
import { reactive, toRefs } from 'vue';
|
|
105
|
+
export default {
|
|
106
|
+
setup() {
|
|
107
|
+
const state = reactive({
|
|
108
|
+
current2: 1,
|
|
109
|
+
});
|
|
110
|
+
return { ...toRefs(state) };
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
</script>
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### 自定义图标
|
|
117
|
+
|
|
118
|
+
```html
|
|
119
|
+
<template>
|
|
120
|
+
<fox-steps current="1">
|
|
121
|
+
<fox-step title="已完成" icon="service">1</fox-step>
|
|
122
|
+
<fox-step title="进行中" icon="people">2</fox-step>
|
|
123
|
+
<fox-step title="未开始" icon="location2">3</fox-step>
|
|
124
|
+
</fox-steps>
|
|
125
|
+
</template>
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### 竖向步骤条
|
|
129
|
+
|
|
130
|
+
```html
|
|
131
|
+
<template>
|
|
132
|
+
<fox-steps direction="vertical" current="2">
|
|
133
|
+
<fox-step title="已完成" content="您的订单已经打包完成,商品已发出">1</fox-step>
|
|
134
|
+
<fox-step title="进行中" content="您的订单正在配送途中">2</fox-step>
|
|
135
|
+
<fox-step title="未开始" content="收货地址为:上海外滩1号">3</fox-step>
|
|
136
|
+
</fox-steps>
|
|
137
|
+
</template>
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### 点状步骤和垂直方向
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
```html
|
|
144
|
+
<template>
|
|
145
|
+
<fox-steps direction="vertical" progress-dot current="2">
|
|
146
|
+
<fox-step title="已完成" content="您的订单已经打包完成,商品已发出">1</fox-step>
|
|
147
|
+
<fox-step title="进行中" content="您的订单正在配送途中">2</fox-step>
|
|
148
|
+
<fox-step title="未开始">
|
|
149
|
+
3
|
|
150
|
+
<template v-slot:content>
|
|
151
|
+
<p>收货地址为:</p>
|
|
152
|
+
<p>上海外滩1号</p>
|
|
153
|
+
</template>
|
|
154
|
+
</fox-step>
|
|
155
|
+
</fox-steps>
|
|
156
|
+
</template>
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## 4. 相关组件 (Related Components)
|
|
160
|
+
- **fox-js**: 与 Steps 配合使用的相关组件
|
|
161
|
+
- **fox-step**: 与 Steps 配合使用的相关组件
|
|
162
|
+
|