@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,190 @@
|
|
|
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: SwitchItem 组件使用规范
|
|
9
|
+
impact: HIGH
|
|
10
|
+
type: capability
|
|
11
|
+
description: 用来打开或关闭选项
|
|
12
|
+
tags: [foxui, fox-switch-item, FoxSwitchItem]
|
|
13
|
+
version: "4.0.0"
|
|
14
|
+
author: jiangcheng
|
|
15
|
+
related: ["fox-js"]
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
# SwitchItem 组件使用规范
|
|
19
|
+
|
|
20
|
+
## 1. 核心职责 (Core Responsibility)
|
|
21
|
+
SwitchItem 是 foxui 中用于 **用来打开或关闭选项** 的标准组件。
|
|
22
|
+
- **基于**: NutUI `nut-switch-item` 进行了二次封装 (若为纯自研组件则填 "自定义开发")
|
|
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
|
+
| `v-model` | 开关状态 | Boolean、String、Number | false |
|
|
37
|
+
| `disable` | 禁用状态 | Boolean | false |
|
|
38
|
+
| `loading` | 加载状态 | Boolean | false |
|
|
39
|
+
| `name` | 图标名称/icon | String | loading |
|
|
40
|
+
| `color` | 图标颜色/icon,仅在loading状态下生效 | String | - |
|
|
41
|
+
| `size` | 图标尺寸/icon,仅在loading状态下生效 | String、Number | 12px |
|
|
42
|
+
| `active-color` | 打开时的背景颜色 | String | fa2c19 |
|
|
43
|
+
| `inactive-color` | 关闭时的背景颜色 | String | ebebeb |
|
|
44
|
+
| `active-text` | 打开时文字描述 | String | - |
|
|
45
|
+
| `inactive-text` | 关闭时文字描述 | String | - |
|
|
46
|
+
| `active-value` | 打开时组件的值 | Boolean、String、Number | true |
|
|
47
|
+
| `inactive-value` | 关闭组件的值 | Boolean、String、Number | false |
|
|
48
|
+
|
|
49
|
+
### 2.2 Events 事件
|
|
50
|
+
|
|
51
|
+
| 事件名 | 类型 | 说明 |
|
|
52
|
+
| :--- | :--- | :--- |
|
|
53
|
+
| `change` | 切换开关时触发 | value: boolean,event: Event |
|
|
54
|
+
|
|
55
|
+
### 2.3 Methods 方法
|
|
56
|
+
|
|
57
|
+
| 方法名 | 参数 | 说明 |
|
|
58
|
+
| :--- | :--- | :--- |
|
|
59
|
+
无
|
|
60
|
+
|
|
61
|
+
### 2.4 Slots 插槽
|
|
62
|
+
|
|
63
|
+
| 插槽名 | 说明 |
|
|
64
|
+
| :--- | :--- |
|
|
65
|
+
无
|
|
66
|
+
|
|
67
|
+
## 3. 例子 (Examples)
|
|
68
|
+
|
|
69
|
+
## 代码演示
|
|
70
|
+
### 基础用法
|
|
71
|
+
``` html
|
|
72
|
+
<fox-switch-item v-model="checked">开关</fox-switch-item>
|
|
73
|
+
<fox-switch-item v-model="checkedStr" activeValue="开" inactiveValue="关" @change="change">值为字符串</fox-switch-item>
|
|
74
|
+
```
|
|
75
|
+
``` ts
|
|
76
|
+
import { getCurrentInstance, reactive, toRefs } from 'vue'
|
|
77
|
+
import { createComponent } from '../../utils/create'
|
|
78
|
+
const { createDemo } = createComponent('switch-item')
|
|
79
|
+
export default createDemo({
|
|
80
|
+
/**
|
|
81
|
+
* setup
|
|
82
|
+
*/
|
|
83
|
+
setup() {
|
|
84
|
+
let { proxy } = getCurrentInstance() as any
|
|
85
|
+
// state
|
|
86
|
+
let state = reactive({
|
|
87
|
+
checked: true,
|
|
88
|
+
checkedStr: '开'
|
|
89
|
+
})
|
|
90
|
+
// 方法
|
|
91
|
+
let methods = {
|
|
92
|
+
change: (value: boolean, event: Event) => {
|
|
93
|
+
proxy.$toast.text(`触发了change事件,开关状态:${value}`)
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return {
|
|
97
|
+
...toRefs(state),
|
|
98
|
+
...methods
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
})
|
|
102
|
+
```
|
|
103
|
+
### 禁用状态
|
|
104
|
+
``` html
|
|
105
|
+
<fox-switch-item v-model="checked" disable>禁用状态</fox-switch-item>
|
|
106
|
+
```
|
|
107
|
+
### 加载状态
|
|
108
|
+
``` html
|
|
109
|
+
<fox-switch-item v-model="checked" loading color="red">加载状态</fox-switch-item>
|
|
110
|
+
```
|
|
111
|
+
### change事件
|
|
112
|
+
``` html
|
|
113
|
+
<fox-switch-item v-model="checked" @change="change">change事件</fox-switch-item>
|
|
114
|
+
```
|
|
115
|
+
``` ts
|
|
116
|
+
import { getCurrentInstance, reactive, toRefs } from 'vue'
|
|
117
|
+
import { createComponent } from '../../utils/create'
|
|
118
|
+
const { createDemo } = createComponent('switch-item')
|
|
119
|
+
export default createDemo({
|
|
120
|
+
/**
|
|
121
|
+
* setup
|
|
122
|
+
*/
|
|
123
|
+
setup() {
|
|
124
|
+
let { proxy } = getCurrentInstance() as any
|
|
125
|
+
// state
|
|
126
|
+
let state = reactive({
|
|
127
|
+
checked: true,
|
|
128
|
+
})
|
|
129
|
+
// 方法
|
|
130
|
+
let methods = {
|
|
131
|
+
change: (value: boolean, event: Event) => {
|
|
132
|
+
proxy.$toast.text(`触发了change事件,开关状态:${value}`)
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
return {
|
|
136
|
+
...toRefs(state),
|
|
137
|
+
...methods
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
})
|
|
141
|
+
```
|
|
142
|
+
### 异步控制
|
|
143
|
+
``` html
|
|
144
|
+
<fox-switch-item :model-value="checkedAsync" @change="changeAsync" :loading="loadingAsync">异步控制</fox-switch-item>
|
|
145
|
+
```
|
|
146
|
+
``` ts
|
|
147
|
+
import { getCurrentInstance, reactive, toRefs } from 'vue'
|
|
148
|
+
import { createComponent } from '../../utils/create'
|
|
149
|
+
const { createDemo } = createComponent('switch-item')
|
|
150
|
+
export default createDemo({
|
|
151
|
+
/**
|
|
152
|
+
* setup
|
|
153
|
+
*/
|
|
154
|
+
setup() {
|
|
155
|
+
let { proxy } = getCurrentInstance() as any
|
|
156
|
+
// state
|
|
157
|
+
let state = reactive({
|
|
158
|
+
loadingAsync: false,
|
|
159
|
+
checkedStr: '开'
|
|
160
|
+
})
|
|
161
|
+
// 方法
|
|
162
|
+
let methods = {
|
|
163
|
+
changeAsync: (value: boolean, event: Event) => {
|
|
164
|
+
proxy.$toast.text(`2秒后异步触发 ${value}`)
|
|
165
|
+
state.loadingAsync = true
|
|
166
|
+
setTimeout(() => {
|
|
167
|
+
state.checkedAsync = value
|
|
168
|
+
state.loadingAsync = false
|
|
169
|
+
}, 2000)
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
return {
|
|
173
|
+
...toRefs(state),
|
|
174
|
+
...methods
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
})
|
|
178
|
+
```
|
|
179
|
+
### 自定义颜色
|
|
180
|
+
``` html
|
|
181
|
+
<fox-switch-item v-model="checked" @change="change" active-color="blue">自定义颜色</fox-switch-item>
|
|
182
|
+
```
|
|
183
|
+
### 支持文字
|
|
184
|
+
``` html
|
|
185
|
+
<fox-switch-item v-model="checked" @change="change" active-text="开" inactive-text="关">支持文字</fox-switch-item>
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
## 4. 相关组件 (Related Components)
|
|
189
|
+
- **fox-js**: 与 SwitchItem 配合使用的相关组件
|
|
190
|
+
|
|
@@ -0,0 +1,63 @@
|
|
|
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: Tabbar 组件使用规范
|
|
9
|
+
impact: HIGH
|
|
10
|
+
type: capability
|
|
11
|
+
description: 标签栏
|
|
12
|
+
tags: [foxui, fox-tabbar, FoxTabbar]
|
|
13
|
+
version: "4.0.0"
|
|
14
|
+
author: jiangcheng
|
|
15
|
+
related: ["fox-js","fox-tabbar-item"]
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
# Tabbar 组件使用规范
|
|
19
|
+
|
|
20
|
+
## 1. 核心职责 (Core Responsibility)
|
|
21
|
+
Tabbar 是 foxui 中用于 **标签栏** 的标准组件。
|
|
22
|
+
- **基于**: NutUI `nut-tabbar` 进行了二次封装 (若为纯自研组件则填 "自定义开发")
|
|
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
|
+
无
|
|
37
|
+
|
|
38
|
+
### 2.2 Events 事件
|
|
39
|
+
|
|
40
|
+
| 事件名 | 类型 | 说明 |
|
|
41
|
+
| :--- | :--- | :--- |
|
|
42
|
+
| `change` | 切换页签时触发事件 | 点击的索引值和tab item对象 |
|
|
43
|
+
|
|
44
|
+
### 2.3 Methods 方法
|
|
45
|
+
|
|
46
|
+
| 方法名 | 参数 | 说明 |
|
|
47
|
+
| :--- | :--- | :--- |
|
|
48
|
+
无
|
|
49
|
+
|
|
50
|
+
### 2.4 Slots 插槽
|
|
51
|
+
|
|
52
|
+
| 插槽名 | 说明 |
|
|
53
|
+
| :--- | :--- |
|
|
54
|
+
无
|
|
55
|
+
|
|
56
|
+
## 3. 例子 (Examples)
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
## 4. 相关组件 (Related Components)
|
|
61
|
+
- **fox-js**: 与 Tabbar 配合使用的相关组件
|
|
62
|
+
- **fox-tabbar-item**: 与 Tabbar 配合使用的相关组件
|
|
63
|
+
|