@flyto/farco 1.1.3 → 1.1.4

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 ADDED
@@ -0,0 +1,144 @@
1
+ # @flyto/farco
2
+
3
+ 基于 Arco Design Vue 的业务组件库,提供更贴近业务的统一约定层。
4
+
5
+ ## 特性
6
+
7
+ - 基于 Arco Design Vue 二次封装
8
+ - 统一交互和默认行为
9
+ - 提升配置化能力
10
+ - 保留底层扩展性
11
+
12
+ ## 安装
13
+
14
+ ### npm
15
+
16
+ ```bash
17
+ npm install @flyto/farco
18
+ ```
19
+
20
+ ### pnpm
21
+
22
+ ```bash
23
+ pnpm add @flyto/farco
24
+ ```
25
+
26
+ ## 依赖
27
+
28
+ 本包依赖以下运行时环境,请确保已安装:
29
+
30
+ ```bash
31
+ npm install vue vue-router @arco-design/web-vue
32
+ ```
33
+
34
+ ## 完整引入
35
+
36
+ ```ts
37
+ import { createApp } from 'vue'
38
+ import { createRouter, createWebHistory } from 'vue-router'
39
+ import ArcoVue from '@arco-design/web-vue'
40
+ import '@arco-design/web-vue/dist/arco.css'
41
+
42
+ import Farco from '@flyto/farco'
43
+ import '@flyto/farco/style.css'
44
+
45
+ const router = createRouter({
46
+ history: createWebHistory(),
47
+ routes: [],
48
+ })
49
+
50
+ const app = createApp(App)
51
+
52
+ app.use(ArcoVue)
53
+ app.use(Farco, {
54
+ router,
55
+ icons: {
56
+ iconfont: h('span'),
57
+ arco: {},
58
+ },
59
+ })
60
+
61
+ app.use(router)
62
+ app.mount('#app')
63
+ ```
64
+
65
+ ## 按需引入
66
+
67
+ ```ts
68
+ import { createApp } from 'vue'
69
+ import { FButton, FInput, FSelect, FTable } from '@flyto/farco'
70
+ import '@flyto/farco/style.css'
71
+
72
+ const app = createApp({})
73
+ app.component('FButton', FButton)
74
+ app.component('FInput', FInput)
75
+ app.component('FSelect', FSelect)
76
+ app.component('FTable', FTable)
77
+ ```
78
+
79
+ ## 组件列表
80
+
81
+ ### 基础组件
82
+
83
+ | 组件 | 说明 |
84
+ | --------- | ---------------------------------- |
85
+ | FButton | 按钮,支持 tooltip、icon、自定义色 |
86
+ | FIcon | 图标,统一 iconfont 与 Arco Icon |
87
+ | FLink | 链接,支持路由跳转 |
88
+ | FSkeleton | 骨架屏 |
89
+ | FText | 文本,支持省略、展开 |
90
+
91
+ ### 表单组件
92
+
93
+ | 组件 | 说明 |
94
+ | --------- | ---------- |
95
+ | FCheckbox | 复选框组 |
96
+ | FDate | 日期选择 |
97
+ | FForm | 配置化表单 |
98
+ | FFormItem | 表单项 |
99
+ | FInput | 输入框 |
100
+ | FMlInput | 多行输入 |
101
+ | FRadio | 单选框组 |
102
+ | FRange | 区间输入 |
103
+ | FSearch | 搜索选择 |
104
+ | FSelect | 选择器 |
105
+ | FSwitch | 开关 |
106
+ | FTextarea | 文本域 |
107
+
108
+ ### 数据与交互
109
+
110
+ | 组件 | 说明 |
111
+ | ---------- | -------- |
112
+ | FPopChoice | 弹窗选择 |
113
+ | FQueryList | 查询列表 |
114
+ | FTable | 表格 |
115
+
116
+ ### 业务工具函数
117
+
118
+ ```ts
119
+ import { utils } from '@flyto/farco'
120
+
121
+ utils.formatListToMenus(list)
122
+ ```
123
+
124
+ | 函数 | 说明 |
125
+ | --------------------- | ------------------------------------ |
126
+ | utils.formatListToMenus | 格式化服务端权限数据为 Arco 菜单结构 |
127
+
128
+ ### 相关类型
129
+
130
+ | 类型 | 说明 |
131
+ | ---------------- | ------------------------ |
132
+ | ArcoAppMenu | Arco 框架菜单结构 |
133
+ | AuthFunction | 服务端返回的权限数据结构 |
134
+ | ServerEntityBase | 服务端返回数据的基础字段 |
135
+
136
+ ## 构建
137
+
138
+ ```bash
139
+ pnpm build
140
+ ```
141
+
142
+ ## License
143
+
144
+ MIT