@ftlab/one-vue3 0.3.8-6 → 0.4.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.
Files changed (56) hide show
  1. package/CHANGELOG.md +36 -146
  2. package/README.md +143 -61
  3. package/assets/css/index.scss +25 -25
  4. package/assets/css/mixin.scss +142 -142
  5. package/assets/css/public.scss +175 -175
  6. package/assets/img/Germany.png +0 -0
  7. package/components.d.ts +6 -3
  8. package/dist/CheckMessageDialog-DygR717d.js +78 -0
  9. package/dist/FtlEntry.js +109 -0
  10. package/dist/FtlMessage.js +186 -0
  11. package/dist/FtlMultipleChoose-D8o09guU.js +312 -0
  12. package/dist/FtlMultipleChoose.js +1 -0
  13. package/dist/FtlNavbar-SsenWatk.js +191 -0
  14. package/dist/FtlNavbar.js +1 -0
  15. package/dist/FtlPasswordDialog-Dj_vS0mC.js +188 -0
  16. package/dist/FtlPasswordDialog.js +1 -0
  17. package/dist/FtlSidebar-D5AkRjgA.js +159 -0
  18. package/dist/FtlSidebar.js +1 -0
  19. package/dist/_plugin-vue_export-helper-Djzt4Yr7.js +7 -0
  20. package/dist/asyncToGenerator-CENKRPhX.js +26 -0
  21. package/dist/configProvider-CFU3sEdy.js +6 -0
  22. package/dist/ftlOne.js +16 -13
  23. package/dist/langSelect-DdbxrMFQ.js +106 -0
  24. package/dist/objectSpread2-Bpgh6RJW.js +57 -0
  25. package/dist/storage-DBeiC15W.js +25 -0
  26. package/dist/store.js +39 -98
  27. package/dist/style.css +2 -1
  28. package/dist/utils-BuLanift.js +10 -0
  29. package/dist/utils.js +558 -475
  30. package/eslint.config.js +34 -0
  31. package/ftlab-one-vue3-0.4.0.tgz +0 -0
  32. package/global.d.ts +63 -63
  33. package/i18n/cn.json +22 -22
  34. package/i18n/de.json +23 -0
  35. package/i18n/en.json +22 -22
  36. package/i18n/es.json +23 -0
  37. package/i18n/fr.json +22 -22
  38. package/package.json +119 -74
  39. package/vitest.config.ts +8 -0
  40. package/.eslintrc.cjs +0 -24
  41. package/.prettierrc.cjs +0 -18
  42. package/dist/CheckMessageDialog-0f85dbee.js +0 -167
  43. package/dist/index-2284be94.js +0 -15036
  44. package/dist/storage-9f2ae3ed.js +0 -30
  45. package/dist/utils-0eda3e43.js +0 -17
  46. package/dist/vuex.esm-bundler-2a047356.js +0 -770
  47. package/function/index.ts +0 -4
  48. package/function/info.js +0 -17
  49. package/function/permission.js +0 -17
  50. package/store/app.js +0 -24
  51. package/store/auth.js +0 -87
  52. package/store/index.ts +0 -10
  53. package/utils/date.ts +0 -127
  54. package/utils/index.ts +0 -3
  55. package/utils/storage.js +0 -27
  56. package/utils/utils.ts +0 -10
package/CHANGELOG.md CHANGED
@@ -1,187 +1,77 @@
1
1
  # Changelog
2
2
 
3
- All notable changes to this project will be documented in this file.
4
-
5
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
6
- and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
-
8
- Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
9
-
10
- ## [v0.3.8-6](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/compare/v0.3.8-5...v0.3.8-6)
11
-
12
- ### Commits
13
-
14
- - fix [`8aeaf2d`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/8aeaf2d9b4540abe50c0a8d30c95161ea7fc9b76)
15
-
16
- ## [v0.3.8-5](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/compare/v0.3.8-4...v0.3.8-5) - 2025-06-04
17
-
18
- ### Commits
19
-
20
- - fix [`1caf48e`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/1caf48ef7c93b8fb53e8bb70b2b730186dbd260a)
21
-
22
- ## [v0.3.8-4](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/compare/v0.3.8-3...v0.3.8-4) - 2025-06-04
23
-
24
- ### Commits
25
-
26
- - fix [`c811f1a`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/c811f1a9526e87de831c6006297f806ef84d2dc7)
27
- - fix: detail [`46b774a`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/46b774aba185902976975d94f6d80a2eb4854492)
28
-
29
- ## [v0.3.8-3](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/compare/v0.3.8-2...v0.3.8-3) - 2025-06-04
30
-
31
- ### Commits
32
-
33
- - fix [`ffd3fba`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/ffd3fba88d78d5753b6279333ffaf6d139344602)
34
-
35
- ## [v0.3.8-2](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/compare/v0.3.8-1...v0.3.8-2) - 2025-06-04
36
-
37
- ### Commits
38
-
39
- - fix: detail [`46b774a`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/46b774aba185902976975d94f6d80a2eb4854492)
40
-
41
- ## [v0.3.8-1](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/compare/v0.3.8-0...v0.3.8-1) - 2025-06-04
42
-
43
- ### Commits
44
-
45
- - feat: npmignore change [`3862394`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/3862394016994f369c01f5573b6c6a8402098173)
46
-
47
- ## [v0.3.8-0](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/compare/v0.3.6...v0.3.8-0) - 2025-06-04
48
-
49
- ### Commits
50
-
51
- - feat: change pinia to vuex [`b331296`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/b331296cdf634441ef4137556abf395dd1abd84c)
52
- - feat: detail change [`53b99a1`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/53b99a1abd8c5a28fa48764e255e78e57d4a2767)
53
- - hotfix: 修复打包后函数和预构建冲突的问题 [`f4b1fca`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/f4b1fca04c83424a0918f1d7a271e6ebf3e5e4ff)
54
-
55
- ## [v0.3.6](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/compare/v0.2.16...v0.3.6) - 2025-03-13
56
-
57
- ### Commits
3
+ ## [v0.4.0] - 2026-11-25
58
4
 
59
- - fix: store bug fix [`bb66736`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/bb6673665c1361ade8765af1e8f49c281d758313)
60
- - feat: utils support js,add new entry [`5f71427`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/5f7142710f12f1fbd7d7b39d29596e85cc64675b)
61
- - feat: FtlMultipleChoose params add [`9a577b9`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/9a577b902da49a20284feeb60a1078b5fa8eca2d)
62
- - feat: 时间格式化函数添加时间格式参数 [`653601b`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/653601b3eb9090e1dceb1755b3f6b7a6a134caa3)
63
- - feat: add type declare [`bd28cc0`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/bd28cc0ab3d91271b5f2af00c85d663b4a868f17)
64
- - fix: import bug [`892d8dc`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/892d8dcfeebcfd7e643ccf5fc28533c423eafc46)
5
+ ### Added
6
+ - 按组件子路径导出:`FtlSidebar` / `FtlNavbar` / `FtlMultipleChoose` / `FtlPasswordDialog` / `FtlEntry` / `FtlMessage`(`exports` 同步新增)
7
+ - `FtlNavbar` 的语言下拉拆为异步子组件(`langSelect`),仅 `isShowLangCode` 时加载
65
8
 
66
- ## [v0.2.16](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/compare/v0.2.4...v0.2.16) - 2024-08-02
9
+ ### Changed
10
+ - 构建工具链升级:Vite 4 → 8(rolldown)、@vitejs/plugin-vue 6、TypeScript 5.6、ESLint 9(flat config)、Vitest 5(替换 Jest + ts-jest)
11
+ - `dist` 全部依赖 external:element-plus / vue / pinia / vue-router / vue-i18n / axios / screenfull / dayjs 不再打包,改为 `peerDependencies`
12
+ - 状态层由 vuex 迁移到 pinia(`useAuthStore` / `useLangStore`),组件内语言切换、退出、修改密码逻辑同步调整
13
+ - 组件内 `element-plus/es` 子路径导入统一为主入口 `element-plus`
14
+ - axios / screenfull 改为按需动态导入
67
15
 
68
- ### Commits
69
-
70
- - feat: add date methods [`c41c7a2`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/c41c7a26509d85073c815f87ed3bb03062654985)
71
- - feat: multipleChoose component add [`34a1d4d`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/34a1d4dba5979031fb1387a77619843f8c82dc81)
72
- - fix: build bug fix [`d49527d`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/d49527d29060ddd1a040a366ca4808e827b5f4df)
73
- - feat: remove element-plus origin style [`a0c4fa1`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/a0c4fa1b195c3ee570a093c103ea28a3fbb64ac1)
74
- - hotfix: emit changeLanguage [`98f7a12`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/98f7a12b06c16af4aedf4f1bf89442dcf727694c)
75
- - fix: fix collapse style error [`54e9525`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/54e9525a99b216a9f7bb1b29ec578a768b49cb93)
76
- - feat: remove click event [`1cd1e54`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/1cd1e54da9c03fc4ea4a0f3480b33b302d7cf02d)
77
- - feat: add click event [`6a63a8a`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/6a63a8ac7c5ca710c6d91765c573af53df439bf4)
78
- - charge storage to js [`1d1368d`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/1d1368ddb5d1ce8ecbc5754530b46f705146013f)
79
- - fix: remove type declare [`d611d3a`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/d611d3ab302a4426e96f1c1e4e7ae940e427c9a9)
80
- - chore: charge ts to js [`e2feead`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/e2feeadc54c45ddab43a8947d38cb1decc76d230)
81
- - fix: winter time tz bug [`3f984ee`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/3f984eebce6e6409084439fd0342bbaf883693c1)
82
-
83
- ## [v0.2.4](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/compare/v0.2.3...v0.2.4) - 2024-01-10
84
-
85
- ### Commits
86
-
87
- - feat: support iconfont [`5268467`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/526846752ca3de05e7e78a665a7b1c1ff1b40b9f)
88
-
89
- ## [v0.2.3](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/compare/v0.2.2...v0.2.3) - 2023-12-11
90
-
91
- ### Commits
92
-
93
- - feat: menu style detail change [`93c3abb`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/93c3abba52a689bf6e0e265e4ad2c4aad38605fd)
94
-
95
- ## [v0.2.2](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/compare/v0.2.1...v0.2.2) - 2023-12-04
16
+ ### Removed
17
+ - 根入口不再静态导出 `FtlEntry` / `FtlMessage`(请使用子路径)
18
+ - 移除未使用依赖:`vuex`、`@rollup/plugin-replace`、`sass-loader`、`husky`、`vite-plugin-dts`、`jest` 系列
96
19
 
97
- ### Commits
98
-
99
- - fix: scroll bug fix [`2cd68f6`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/2cd68f6c534af2cd8b8069180d3ad20c1a9d223a)
100
-
101
- ## [v0.2.1](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/compare/v0.2.0...v0.2.1) - 2023-11-28
102
-
103
- ### Commits
104
-
105
- - feat: detail change [`79e1942`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/79e1942cf40561940eb6de31a17da0432aa2bf75)
106
-
107
- ## [v0.2.0](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/compare/v0.1.5...v0.2.0) - 2023-11-28
108
-
109
- ### Commits
20
+ ### Fixed
21
+ - 修改密码弹窗、消息中心在无 token / 401 时的健壮性(token 缺失时不再抛异常)
110
22
 
111
- - feat: ftlPasswordDialog add [`c7910c6`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/c7910c6e0c911fcd8d3a279602c3d40420f76e50)
112
- - feat: add message center [`ec3bcf5`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/ec3bcf5e744cb0606cb6d10af0200b7dec39604b)
113
-
114
- ## [v0.1.5](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/compare/v0.1.4...v0.1.5) - 2023-08-30
115
-
116
- ### Commits
117
-
118
- - feat: detail change [`75529d3`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/75529d3f95c457851eb39e0ae4dc67ada5380d49)
119
-
120
- ## [v0.1.4](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/compare/v0.1.3...v0.1.4) - 2023-08-11
121
-
122
- ### Commits
123
-
124
- - feat: detail add [`7a5d7b7`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/7a5d7b719facc65bb81c75b2f9f25a04820fb674)
125
-
126
- ## [v0.1.3](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/compare/v0.1.2...v0.1.3) - 2023-08-10
127
-
128
- ### Commits
129
-
130
- - feat: detail feat [`72c432d`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/72c432d0b98e222d65de842433a3d44d39ab9249)
131
-
132
- ## [v0.1.2](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/compare/v0.1.1...v0.1.2) - 2023-08-09
23
+ All notable changes to this project will be documented in this file.
133
24
 
134
- ### Commits
25
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
26
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
135
27
 
136
- - feat: build to es2015 [`ef0cf82`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/ef0cf829dd80a2b0044622e162609cbb5be05960)
137
- - doc:refactor README.md [`6b266e7`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/6b266e7c39be7b8a18bdaf7127fba89c6249dcd5)
28
+ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
138
29
 
139
- ## [v0.1.1](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/compare/v0.1.0...v0.1.1) - 2023-07-07
30
+ ## [v0.1.7](https://gitee.com/zsjqwe/one-vue3-vuex/compare/v0.1.6...v0.1.7)
140
31
 
141
32
  ### Commits
142
33
 
143
- - feat: theme color var add [`60ab46c`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/60ab46c30e17c7e72796e20c3eb66c71a359b7a9)
34
+ - feat: 细节调整 [`412ff2c`](https://gitee.com/zsjqwe/one-vue3-vuex/commit/412ff2cea61bfba9b12219b1eb22b97fb7526791)
144
35
 
145
- ## [v0.1.0](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/compare/v0.0.7...v0.1.0) - 2023-07-05
36
+ ## [v0.1.6](https://gitee.com/zsjqwe/one-vue3-vuex/compare/v0.1.5...v0.1.6) - 2026-05-26
146
37
 
147
38
  ### Commits
148
39
 
149
- - feat: 0.1.0 [`20f34b7`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/20f34b7c45139ae50bc15a5b37bb8b206b0d6e88)
40
+ - feat: 细节调整 [`d714f98`](https://gitee.com/zsjqwe/one-vue3-vuex/commit/d714f9804d3ddf58f0de2e5ab5c9fddf50340b34)
150
41
 
151
- ## [v0.0.7](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/compare/v0.0.6...v0.0.7) - 2023-07-05
42
+ ## [v0.1.5](https://gitee.com/zsjqwe/one-vue3-vuex/compare/v0.1.4...v0.1.5) - 2026-05-26
152
43
 
153
44
  ### Commits
154
45
 
155
- - feat: vite build external element-plus [`1415398`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/1415398585f7184eb1a7b5fd9db41337e6d011e3)
46
+ - feat: 细节调整 [`1f60cf1`](https://gitee.com/zsjqwe/one-vue3-vuex/commit/1f60cf1d7398a7f84299ed107ffba7090fb1dd2a)
156
47
 
157
- ## [v0.0.6](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/compare/v0.0.5...v0.0.6) - 2023-07-05
48
+ ## [v0.1.4](https://gitee.com/zsjqwe/one-vue3-vuex/compare/v0.1.3...v0.1.4) - 2026-05-22
158
49
 
159
50
  ### Commits
160
51
 
161
- - feat: vite build external pinia [`2525081`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/2525081c259f7875d19fd3c86fe5eac2f903bc1d)
52
+ - feat: 细节调整 [`80be035`](https://gitee.com/zsjqwe/one-vue3-vuex/commit/80be035f217fdcd4870952f41d025880e7984491)
162
53
 
163
- ## [v0.0.5](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/compare/v0.0.4...v0.0.5) - 2023-07-05
54
+ ## [v0.1.3](https://gitee.com/zsjqwe/one-vue3-vuex/compare/v0.1.2...v0.1.3) - 2026-03-03
164
55
 
165
56
  ### Commits
166
57
 
167
- - fix: pinia bug fix [`7701ea2`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/7701ea21231b549791f0f2ec23eab2f8544a39f0)
58
+ - feat: 细节调整 [`8afeb89`](https://gitee.com/zsjqwe/one-vue3-vuex/commit/8afeb8959139609828b8c23f7843fbda70e9ab3d)
168
59
 
169
- ## [v0.0.4](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/compare/v0.0.3...v0.0.4) - 2023-07-04
60
+ ## [v0.1.2](https://gitee.com/zsjqwe/one-vue3-vuex/compare/v0.1.1...v0.1.2) - 2026-03-03
170
61
 
171
62
  ### Commits
172
63
 
173
- - fix: style fix [`930b480`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/930b480c34ef7b0f743590aacab4125674a77d38)
64
+ - feat: 新增修改密码功能 [`2dd8f4a`](https://gitee.com/zsjqwe/one-vue3-vuex/commit/2dd8f4ac1b700a9ba13ae6b5d4f7549b17b458a6)
174
65
 
175
- ## [v0.0.3](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/compare/v0.0.2...v0.0.3) - 2023-07-04
66
+ ## [v0.1.1](https://gitee.com/zsjqwe/one-vue3-vuex/compare/v0.1.0...v0.1.1) - 2026-02-13
176
67
 
177
68
  ### Commits
178
69
 
179
- - feat: some common function and components add [`ca3198e`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/ca3198e22a6748620c6017482b42bb8bcaef51f7)
180
- - feat: pinia and style add [`34b30f5`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/34b30f560a58a74be9db88fcade6775c29769c7c)
70
+ - feat: 新增德语 [`4c6326b`](https://gitee.com/zsjqwe/one-vue3-vuex/commit/4c6326b3c4943f0f0b52a9369b13284806d7f62a)
181
71
 
182
- ## v0.0.2 - 2023-06-30
72
+ ## v0.1.0 - 2026-02-12
183
73
 
184
74
  ### Commits
185
75
 
186
- - feat: project init [`8924bba`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/8924bbad81f97fa7130f9bf571920509acd2474e)
187
- - Initial commit [`1d50e56`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/1d50e561512abf2733a397ebf5f29109a3584953)
76
+ - feat: project init [`cce9607`](https://gitee.com/zsjqwe/one-vue3-vuex/commit/cce9607244394410930e12080b63fba00c394fd2)
77
+ - feat: 欧翔one公共包vue3版本 [`6be75d7`](https://gitee.com/zsjqwe/one-vue3-vuex/commit/6be75d7a435bbdc0d2e9547ff62be4f1cb4152b6)
package/README.md CHANGED
@@ -1,61 +1,143 @@
1
- # one-vue3
2
-
3
- ### 如何使用
4
- ***
5
- 在项目中的main.ts中:
6
- ```vue
7
- import { createApp } from 'vue';
8
- import App from './App.vue';
9
- import FtlOne from '@ftlab/one-vue3';
10
- import '@ftlab/one-vue3/dist/style.css';
11
- import '@ftlab/one-vue3/assets/fontAwesome/css/font-awesome.css';
12
-
13
- const app=createApp(App);
14
- app.use(FtlOne); // 注册全局组件
15
- ```
16
- ### 侧边栏主题色配置
17
- ***
18
- 在项目中新建一个scss文件,填写如下内容,在全局中引入
19
- ```sass
20
- @forward 'node_modules/@ftlab/one-vue3/assets/css/index.scss' with (
21
- $color: #fff, /* 侧边栏菜单字体颜色 */
22
- $--color-header: #2e45ad, /* 侧边栏菜单交互背景色 */
23
- $--color-text: #0026d5, /* 侧边栏二级子菜单选中字体颜色 */
24
- $bg: #00265d, /* 侧边栏菜单背景色 */
25
- $content-bg: #94a5c1 /* 侧边栏菜单二级子菜单背景色 */
26
- );
27
-
28
- ```
29
- ### 提供的全局组件
30
- ***
31
-
32
- #### FtlNavbar
33
-
34
- 顶部导航栏
35
-
36
- | 属性 | 说明 | 类型 | 默认值 |
37
- |:----------------:|:---------:|:--------:|:----------------------------:|
38
- | sidebar | 是否可以收起侧边栏 | boolean | true |
39
- | isShowBreadcrumb | 是否展示面包屑 | boolean | true |
40
- | isShowScreenfull | 是否可以全屏展示 | boolean | true |
41
- | langCodeList | 语言下拉框选项 | string[] | 'en', 'cn', 'fr', 'es', 'or' |
42
- | logOutText | 退出按钮文本 | string? | 退出 |
43
-
44
-
45
- #### FtlSidebar
46
-
47
- 侧边栏
48
-
49
- | 属性 | 说明 | 类型 | 默认值 |
50
- |:----------------:|:-------:|:-----------------:|:----:|
51
- | collapse | 是否展开侧边栏 | boolean | true |
52
- | sideBarParams | 侧边栏配置 | SidebarParamsType | {} |
53
-
54
- #### FtlEntry
55
-
56
- 下拉框(提供项目间跳转的能力)
57
-
58
- | 属性 | 说明 | 类型 | 默认值 |
59
- |:-------------:|:------:|:------:|:---------:|
60
- | witdh | 下拉框宽度 | number | 240 |
61
- | authBaseUrl | 权限请求地址 | string | gateway地址 |
1
+ # @ftlab/one-vue3
2
+
3
+ 基于 Element Plus 的后台基础组件库:侧边栏、顶部导航、批量输入、修改密码、消息中心、项目跳转。
4
+
5
+ ## 环境要求(仅开发/构建)
6
+
7
+ - **Node.js `^22.12.0 || ^24.0.0 || >=26.0.0`**(Vitest 5 的要求;本仓库使用 22.23.5)
8
+ - npm(仓库自带 `package-lock.json`)
9
+
10
+ ```bash
11
+ npm install
12
+ npm run build # 产物在 dist/
13
+ npm test # Vitest
14
+ npm run lint # ESLint 9 flat config
15
+ ```
16
+
17
+ ## Peer 依赖(使用方需自行安装)
18
+
19
+ | 包 | 版本 |
20
+ |---|---|
21
+ | vue | `^3.3.0` |
22
+ | element-plus | `^2.3.0`(实际开发/验证使用 2.14.x) |
23
+ | pinia | `^2.0.0` |
24
+ | vue-router | `^4.0.0` |
25
+ | vue-i18n | `^9.2.0` |
26
+ | @element-plus/icons-vue | `^2.0.0` |
27
+ | @icon-park/vue-next | 使用菜单图标时由使用方注册(库不再强依赖) |
28
+ | axios | `^1.0.0` |
29
+ | dayjs | `^1.11.0` |
30
+ | screenfull | `^5.0.0 \|\| ^6.0.0`(可选,仅顶部导航全屏按钮需要) |
31
+
32
+ ```bash
33
+ npm i @ftlab/one-vue3
34
+ npm i vue element-plus pinia vue-router vue-i18n @element-plus/icons-vue axios dayjs
35
+ npm i screenfull # 需要全屏按钮时
36
+ ```
37
+
38
+ Element Plus 的样式由使用方引入(推荐 `element-plus/dist/index.css`)。
39
+
40
+ ## 使用方式(推荐:按组件子路径引入)
41
+
42
+ ```ts
43
+ import { createApp } from 'vue';
44
+ import FtlSidebar from '@ftlab/one-vue3/FtlSidebar';
45
+ import FtlNavbar from '@ftlab/one-vue3/FtlNavbar';
46
+ import FtlMultipleChoose from '@ftlab/one-vue3/FtlMultipleChoose';
47
+ import '@ftlab/one-vue3/dist/style.css';
48
+ import 'element-plus/dist/index.css';
49
+
50
+ const app = createApp(YourApp);
51
+ [FtlSidebar, FtlNavbar, FtlMultipleChoose].forEach((c: any) => app.component(c.name, c));
52
+ ```
53
+
54
+ 可用子路径:
55
+
56
+ ```
57
+ @ftlab/one-vue3/FtlSidebar
58
+ @ftlab/one-vue3/FtlNavbar
59
+ @ftlab/one-vue3/FtlMultipleChoose
60
+ @ftlab/one-vue3/FtlPasswordDialog
61
+ @ftlab/one-vue3/FtlEntry ← 不再从根入口导出
62
+ @ftlab/one-vue3/FtlMessage ← 不再从根入口导出
63
+ ```
64
+
65
+ store / utils / i18n:
66
+
67
+ ```ts
68
+ import { useAuthStore, useLangStore } from '@ftlab/one-vue3/store';
69
+ import { dayjs } from '@ftlab/one-vue3/utils';
70
+ import oneCn from '@ftlab/one-vue3/i18n/cn.json';
71
+ ```
72
+
73
+ 也支持整包注册(0.4.0 起根入口只包含 Sidebar / Navbar / PasswordDialog / MultipleChoose):
74
+
75
+ ```ts
76
+ import FtlOne from '@ftlab/one-vue3';
77
+ app.use(FtlOne);
78
+ ```
79
+
80
+ ## 0.4.0 迁移提示
81
+
82
+ - `FtlEntry`、`FtlMessage` **不再从根入口导出**,请改用子路径导入。
83
+ - 依赖改为 **external + peer**:element-plus / vue / pinia / vue-router / vue-i18n / axios / screenfull / dayjs 不再打进 `dist`,需使用方安装(见上方 peer 表)。
84
+ - 状态层由 **vuex 迁移到 pinia**:组件内部使用 `useAuthStore` / `useLangStore`(来自 `@ftlab/one-vue3/store`),使用方需 `app.use(createPinia())`。
85
+ - `FtlNavbar` 的语言下拉改为异步子组件,仅 `isShowLangCode` 时加载(含国旗图片)。
86
+ - 样式文件仍为 `@ftlab/one-vue3/dist/style.css`。
87
+
88
+ ## 侧边栏主题色配置
89
+
90
+ 在项目中新建一个 scss 文件并全局引入:
91
+
92
+ ```sass
93
+ @forward 'node_modules/@ftlab/one-vue3/assets/css/index.scss' with (
94
+ $color: #fff, /* 侧边栏菜单字体颜色 */
95
+ $--color-header: #2e45ad, /* 侧边栏菜单交互背景色 */
96
+ $--color-text: #0026d5, /* 二级子菜单选中字体颜色 */
97
+ $bg: #00265d, /* 侧边栏菜单背景色 */
98
+ $content-bg: #94a5c1 /* 二级子菜单背景色 */
99
+ );
100
+ ```
101
+
102
+ ## 组件
103
+
104
+ ### FtlNavbar(顶部导航)
105
+
106
+ | 属性 | 说明 | 类型 | 默认值 |
107
+ |---|---|---|---|
108
+ | sidebar | 是否展开侧边栏(配合 `v-model:sidebar`) | boolean | true |
109
+ | isShowBreadcrumb | 是否展示面包屑 | boolean | true |
110
+ | isShowScreenfull | 是否展示全屏按钮 | boolean | true |
111
+ | isShowLangCode | 是否展示语言切换 | boolean | true |
112
+ | isShowMessage | 是否展示消息中心 | boolean | true |
113
+ | needChangePassword | 是否展示修改密码入口 | boolean | true |
114
+ | langCodeList | 语言下拉选项 | string[] | ['en','cn','fr','es','de','or'] |
115
+ | logOutText | 退出按钮文本 | string \| null | '' |
116
+
117
+ 事件:`logout`、`update:sidebar`、`changeLanguage`
118
+ 插槽:`tabsMenu-l` / `tabsMenu-c` / `tabsMenu-r` / `message-l` / `message-r` / `right-l` / `right-c` / `right-r` / `userMenu` / 默认
119
+
120
+ ### FtlSidebar(侧边栏)
121
+
122
+ | 属性 | 说明 | 类型 | 默认值 |
123
+ |---|---|---|---|
124
+ | collapse | 是否展开 | boolean | true |
125
+ | sideBarParams | 侧边栏配置(logoName / logoLink / logoSrc / projectEntry / isProd / useIconPark…) | object | {} |
126
+
127
+ ### FtlMultipleChoose(批量输入)
128
+
129
+ | 属性 | 说明 | 默认值 |
130
+ |---|---|---|
131
+ | modelValue | 值(字符串数组,`v-model`) | [] |
132
+ | searchType | 搜索项名称(i18n key) | 'ftlOne.text.trackingNumber' |
133
+ | width / maxLimit | 宽度 / 最大条数 | 300 / 100 |
134
+ | customsColor | 主色(`r,g,b`) | '79,167,142' |
135
+
136
+ 事件:`update:modelValue`、`confirmSearch`、`deleteAll`、`copyData`
137
+
138
+ ### FtlEntry(项目跳转下拉,子路径引入)
139
+
140
+ | 属性 | 说明 | 默认值 |
141
+ |---|---|---|
142
+ | width | 下拉框宽度 | 240 |
143
+ | authBaseUrl | 权限请求地址 | gateway 地址 |
@@ -1,25 +1,25 @@
1
- @import './public.scss';
2
- @import './mixin.scss';
3
-
4
- $color: #fff !default;
5
- $--color-header: #4f83b2 !default;
6
- $--color-text: #74bdff !default;
7
- $bg: #2b3b49 !default;
8
- $content-bg: #78848e !default;
9
-
10
- .sidebar-container {
11
- @include sidebar-container($bg, $color, $--color-header, $content-bg, $--color-text);
12
- }
13
-
14
- .el-menu--vertical {
15
- @include el-menu--vertical($bg, $--color-header, $--color-text);
16
- }
17
-
18
- .level-bar-toggle-button {
19
- @include toggle-button($--color-header);
20
- }
21
-
22
- ::-webkit-scrollbar-thumb {
23
- background-color: $--color-header;
24
- border-radius: 5px;
25
- }
1
+ @import './public.scss';
2
+ @import './mixin.scss';
3
+
4
+ $color: #fff !default;
5
+ $--color-header: #4f83b2 !default;
6
+ $--color-text: #74bdff !default;
7
+ $bg: #2b3b49 !default;
8
+ $content-bg: #78848e !default;
9
+
10
+ .sidebar-container {
11
+ @include sidebar-container($bg, $color, $--color-header, $content-bg, $--color-text);
12
+ }
13
+
14
+ .el-menu--vertical {
15
+ @include el-menu--vertical($bg, $--color-header, $--color-text);
16
+ }
17
+
18
+ .level-bar-toggle-button {
19
+ @include toggle-button($--color-header);
20
+ }
21
+
22
+ ::-webkit-scrollbar-thumb {
23
+ background-color: $--color-header;
24
+ border-radius: 5px;
25
+ }