@kevairy/template 0.1.6 → 0.1.7
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/package.json +1 -1
- package/template/.agents/skills/kevairy-ui/SKILL.md +4 -0
- package/template/.agents/skills/kevairy-ui/references/component-catalog.md +1 -0
- package/template/.agents/skills/kevairy-ui/references/form-drawer.md +22 -0
- package/template/AGENTS.md +12 -0
- package/template/README.md +14 -0
- package/template/package.json +3 -2
- package/template/public/licenses/noto-sans-sc-OFL.txt +93 -0
- package/template/src/assets/images/svg/500.svg +5 -0
- package/template/src/assets/styles/core/el-ui.scss +0 -3
- package/template/src/assets/styles/core/router-transition.scss +36 -4
- package/template/src/assets/styles/core/tailwind.css +3 -0
- package/template/src/assets/styles/custom/search-table.scss +8 -0
- package/template/src/assets/styles/custom/typography.scss +88 -0
- package/template/src/components/core/feedback/art-page-loading/index.vue +1 -1
- package/template/src/components/core/layouts/art-header-bar/index.vue +21 -1
- package/template/src/components/core/layouts/art-menus/art-horizontal-menu/widget/HorizontalSubmenu.vue +7 -1
- package/template/src/components/core/layouts/art-menus/art-sidebar-menu/index.vue +1 -0
- package/template/src/components/core/layouts/art-menus/art-sidebar-menu/style.scss +2 -1
- package/template/src/components/core/layouts/art-menus/art-sidebar-menu/theme.scss +7 -0
- package/template/src/components/core/layouts/art-menus/art-sidebar-menu/widget/SidebarSubmenu.vue +2 -2
- package/template/src/components/core/layouts/art-work-tab/index.vue +8 -15
- package/template/src/components/core/views/exception/ArtException.vue +8 -5
- package/template/src/hooks/core/useChart.ts +22 -2
- package/template/src/locales/langs/en.json +1 -1
- package/template/src/locales/langs/zh.json +1 -1
- package/template/src/main.ts +3 -0
- package/template/src/router/core/access.ts +11 -0
- package/template/src/types/router/index.ts +2 -0
- package/template/src/utils/ui/loading.ts +7 -1
- package/template/src/views/examples/crud-workspace/index.vue +103 -30
- package/template/src/views/examples/search-table/index.vue +1 -1
- package/template/src/views/exception/500/index.vue +35 -32
- package/template/src/views/index/index.vue +58 -2
- package/template/src/views/index/style.scss +91 -13
- package/template/tests/e2e/drawer.spec.ts +85 -0
- package/template/tests/e2e/form-drawer.spec.ts +128 -0
- package/template/tests/e2e/layout-motion.spec.ts +189 -0
- package/template/tests/e2e/search-table.spec.ts +6 -5
- package/template/tests/e2e/session-recovery.spec.ts +6 -8
- package/template/tests/e2e/typography.spec.ts +118 -0
- package/template/tests/unit/permissions/rules.spec.ts +29 -0
- package/template/vite.config.ts +2 -0
package/package.json
CHANGED
|
@@ -19,6 +19,10 @@ description: Guide Vue 3 admin UI work toward @kevairy/components and establishe
|
|
|
19
19
|
6. Keep `@kevairy/components/style.css` imported once in `src/main.ts`; do not import it in individual pages.
|
|
20
20
|
7. Run focused tests and `pnpm typecheck`. Run `pnpm build` when changing dependencies, shared UI composition, or build-facing code.
|
|
21
21
|
|
|
22
|
+
## Business forms
|
|
23
|
+
|
|
24
|
+
For a new business create form, or a shared create/edit form, read [the form drawer convention](references/form-drawer.md) and use `KvFormDrawer` by default without asking which container to use. Start from `src/views/examples/crud-workspace/index.vue`. Historical Dialog forms are not the default pattern. Explicit user instructions or an established design can override this default; record the reason. Confirmation dialogs are outside this rule.
|
|
25
|
+
|
|
22
26
|
## Source-of-truth rules
|
|
23
27
|
|
|
24
28
|
- Treat the installed package exports and type declarations as authoritative for the project's pinned version.
|
|
@@ -19,6 +19,7 @@ Use this catalog to choose a capability before reading its exact API documentati
|
|
|
19
19
|
| Base table rendering | `KvTable` | https://kevairy.top/components/api/kv-table |
|
|
20
20
|
| Column visibility, density, refresh, and fullscreen controls | `KvTableToolbar` | https://kevairy.top/components/api/kv-table-toolbar |
|
|
21
21
|
| Config-driven search form | `KvSearchBar` | https://kevairy.top/components/api/kv-search-bar |
|
|
22
|
+
| Business create form or shared create/edit form | `KvFormDrawer` | https://kevairy.top/components/api/kv-form-drawer |
|
|
22
23
|
| Draggable or resizable dialog | `KvDialog` | https://kevairy.top/components/api/kv-dialog |
|
|
23
24
|
| Dictionary value as a styled tag | `KvDictTag` | https://kevairy.top/components/api/kv-dict-tag |
|
|
24
25
|
| Section heading with optional actions | `KvSectionTitle` | https://kevairy.top/components/api/kv-section-title |
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# 业务表单抽屉规范
|
|
2
|
+
|
|
3
|
+
## 适用范围
|
|
4
|
+
|
|
5
|
+
新开发的业务新增表单默认使用 `@kevairy/components` 的 `KvFormDrawer`,从页面右侧滑出;新增与编辑共用同一表单时统一使用抽屉。没有指定容器时直接采用默认方案,无需询问。
|
|
6
|
+
|
|
7
|
+
用户明确要求其他形式,或已有明确的产品设计时,遵循该要求并在交付说明中记录原因。删除确认、操作确认、消息提示、登录/注册页面和导航抽屉不属于本规范。历史业务表单仅在明确的迁移任务中调整。
|
|
8
|
+
|
|
9
|
+
## 实现方式
|
|
10
|
+
|
|
11
|
+
- 以 [标准 CRUD 示例](../../../../src/views/examples/crud-workspace/index.vue) 为起点。不要模仿历史 `KvDialog` / `ElDialog` 新增表单,也不要自行拼装 `ElDrawer` 复制公共交互。
|
|
12
|
+
- 先核对当前组件版本和类型。组件不存在时说明版本差异,不要编造 API。组件 API:<https://kevairy.top/components/api/kv-form-drawer>。
|
|
13
|
+
- 默认桌面宽度 640px;复杂表单通过 `size` 加宽;视口宽度不超过 640px 时全宽显示。标题和底部操作区固定,内容独立滚动。
|
|
14
|
+
- 使用默认“取消 / 保存”按钮。需要附加操作时使用 `footer-extra`,不要自行关闭以绕过保护。
|
|
15
|
+
- 页面负责字段、校验、接口和错误提示。`submitting` 在校验开始前同步置为 true,通过 finally 恢复,并在提交函数入口判断以防重复提交;表单控件在提交期间禁用。
|
|
16
|
+
- 页面保存打开时的字段快照,计算 `dirty`;编辑数据应先加载并建立快照,再允许输入。取消、右上角关闭、Esc 统一触发未保存修改确认。需要程序化取消时调用实例的 `requestClose()`。
|
|
17
|
+
- 保存失败时保持抽屉打开、保留输入并展示错误;保存成功后才设置 v-model 为 false,然后刷新列表。父组件主动设置 false 会跳过放弃修改确认,只用于保存成功或明确的外部状态切换。
|
|
18
|
+
- 在 `closed` 后重置字段和校验;每次打开建立新的初始状态,防止新增与编辑之间残留数据。
|
|
19
|
+
|
|
20
|
+
## 交付检查
|
|
21
|
+
|
|
22
|
+
验证默认从右侧打开、小屏全宽、内容滚动时操作区可见;验证必填校验、重复提交保护、保存成功刷新、失败保留输入;验证有修改时取消/关闭/Esc 提示确认、继续编辑保留数据、放弃修改后重新打开无残留。
|
package/template/AGENTS.md
CHANGED
|
@@ -9,6 +9,18 @@
|
|
|
9
9
|
- 在线文档与当前安装版本不一致时,以 `package.json` 中的版本及其类型声明为准。
|
|
10
10
|
- `@kevairy/components/style.css` 只在应用入口导入一次,页面中不要重复导入。
|
|
11
11
|
|
|
12
|
+
## 新增表单
|
|
13
|
+
|
|
14
|
+
- 新开发的业务新增表单默认使用从右侧滑出的 `KvFormDrawer`,无需再次询问交互形式。新增与编辑共用表单时统一使用抽屉。
|
|
15
|
+
- 表单开发前阅读 Skill 的 [表单抽屉规范](.agents/skills/kevairy-ui/references/form-drawer.md),优先参考 `src/views/examples/crud-workspace/index.vue`,不要沿用历史 Dialog 表单。
|
|
16
|
+
- 删除确认、操作确认等非表单交互继续使用确认对话框。用户明确指定其他交互或已有明确设计要求时按其要求实现,并在交付说明中记录例外原因。
|
|
17
|
+
- 历史业务表单按明确的迁移任务逐步调整,不因本规范批量改写。
|
|
18
|
+
|
|
19
|
+
## Code Review Rules
|
|
20
|
+
|
|
21
|
+
- 检查新开发的业务新增表单是否使用 `KvFormDrawer`;使用其他容器时检查是否有明确的用户要求或设计依据。
|
|
22
|
+
- 检查取消、关闭按钮、Esc 是否保留未保存修改保护,提交是否防止重复操作,失败是否保留输入。
|
|
23
|
+
|
|
12
24
|
## 验证
|
|
13
25
|
|
|
14
26
|
- 修改完成后运行与变更相称的检查,至少包含 `pnpm typecheck`。
|
package/template/README.md
CHANGED
|
@@ -21,6 +21,20 @@ __RUN_COMMAND__ test
|
|
|
21
21
|
__RUN_COMMAND__ build
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
+
## 布局动效
|
|
25
|
+
|
|
26
|
+
首次进入或刷新时,菜单、工具栏和页面区块在全屏 Loading 结束后错峰入场;日常导航与页面内刷新只过渡右侧内容。
|
|
27
|
+
|
|
28
|
+
内容外层只淡入,内部区块的位移在入场期间局部裁剪,避免短暂滚动条,长页面仍正常滚动。移动端菜单保留独立抽屉行为。设置面板的“页面切换动画”选择“无”,或系统开启“减少动态效果”时,布局入场不播放。
|
|
29
|
+
|
|
30
|
+
布局入口为 src/views/index/index.vue 与同目录的 style.scss,路由过渡样式为 src/assets/styles/core/router-transition.scss。
|
|
31
|
+
|
|
32
|
+
## 字体与搜索表格
|
|
33
|
+
|
|
34
|
+
模板本地打包 Noto Sans SC Variable,统一排版入口为 src/assets/styles/custom/typography.scss,使用 --app-font-family 与 --app-font-mono。字体无需外部服务,OFL 许可证随 public/licenses 一同部署。
|
|
35
|
+
|
|
36
|
+
搜索栏间距、表格标题显隐和工具栏尺寸由 @kevairy/components 维护;搜索栏和表格卡片四周内边距、搜索栏与卡片间距、工具栏到表格内容间距默认均为 12px,可通过公共组件间距 CSS 变量覆盖;搜索表格默认保留数量统计,不传 title 时不显示标题,传入非空 title 即显示;区域名称可用 aria-label 独立设置。表头配色由 src/assets/styles/custom/search-table.scss 配置,背景显隐仍由 appearance.headerBackground 控制。
|
|
37
|
+
|
|
24
38
|
## 版本与构建
|
|
25
39
|
|
|
26
40
|
发布版本由项目根目录 package.json 的 version 管理。每次执行构建命令会自动生成独立的构建编号、UTC 构建时间、Git 提交和未提交状态,不修改版本文件。
|
package/template/package.json
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"@e965/xlsx": "0.20.3",
|
|
13
13
|
"@element-plus/icons-vue": "2.3.2",
|
|
14
14
|
"@iconify/vue": "5.0.1",
|
|
15
|
-
"@kevairy/components": "0.2.
|
|
15
|
+
"@kevairy/components": "0.2.2",
|
|
16
16
|
"@tailwindcss/vite": "4.3.3",
|
|
17
17
|
"@vueuse/core": "13.9.0",
|
|
18
18
|
"@wangeditor/editor": "5.1.23",
|
|
@@ -32,7 +32,8 @@
|
|
|
32
32
|
"vue": "3.5.45",
|
|
33
33
|
"vue-i18n": "11.4.18",
|
|
34
34
|
"vue-router": "4.6.4",
|
|
35
|
-
"xgplayer": "3.0.26"
|
|
35
|
+
"xgplayer": "3.0.26",
|
|
36
|
+
"@fontsource-variable/noto-sans-sc": "5.3.1"
|
|
36
37
|
},
|
|
37
38
|
"devDependencies": {
|
|
38
39
|
"@eslint/js": "9.39.5",
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Google Inc.
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
http://scripts.sil.org/OFL
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg
|
|
2
|
+
viewBox="0 0 400 300"
|
|
3
|
+
fill="none"
|
|
4
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
5
|
+
><mask id="a" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="47" y="38" width="307" height="224"><path d="M353.3 38H47.5v223.8h305.8V38Z" fill="#fff"/></mask><g mask="url(#a)"><path fill-rule="evenodd" clip-rule="evenodd" d="M299.2 200.6H61.6v5.1h240.3l-2.7-5.1Z" fill="#C7DEFF"/><path d="m308.9 185.8-6.5 20H183.7M332.3 127.6h10.6l-5 16.7-14.8-.1-7.2 21.1M328.8 127.4l13.6-39.6M307.6 166 337 84.7H180.6l-9.8 26.9h-10.5M296.6 196l4.3-11.8M157.2 149.2l6.4-17.7" stroke="#071F4D"/><path fill-rule="evenodd" clip-rule="evenodd" d="M324.8 93.1H188.5l-34.8 95.8h136.4l34.7-95.8ZM169.9 166.2l5-13.6-5 13.6Z" fill="#fff"/><path d="m169.9 166.2 5-13.6" stroke="#071F4D"/><path fill-rule="evenodd" clip-rule="evenodd" d="M324.8 93.1H188.5l-4 11.7h135.8l4.5-11.7Z" fill="#006EFF"/><path fill-rule="evenodd" clip-rule="evenodd" d="M102.6 159.5h38.3l2.7 36.6h-38.4c-10.1 0-20.9-8.2-20.9-18.3 0-10.1 8.2-18.3 18.3-18.3Z" fill="#DEEBFC"/><path fill-rule="evenodd" clip-rule="evenodd" d="M84.3 174.102c2.5 3.4 10 5 17.9 2.8 16.6-6.5 23.8-3.9 23.8-3.9s.5-3.4 1.3-5c-5.8-3-15.4.3-26.1 3.1-10.7 2.8-15.8-2.5-15.8-2.5-.4 0-1.1 2.8-1.1 5.5Z" fill="#fff"/><path d="M96.5 194.2c-7.2-3.3-12.2-10.5-12.2-19m0 0c0-11.5 9.3-20.8 20.8-20.8h29.4" stroke="#071F4D"/><path fill-rule="evenodd" clip-rule="evenodd" d="M140.3 195.1c-8.4-2.7-14.5-10.6-14.5-19.8l14.5 19.8Zm-14.5-19.8c0-11.5 9.3-20.8 20.8-20.8l-20.8 20.8Zm20.8-20.8c11.5 0 20.8 9.3 20.8 20.8l-20.8-20.8Zm20.8 20.8c0 8.4-5 15.6-12.1 18.9l12.1-18.9Z" fill="#fff"/><path d="M140.3 195.1c-8.4-2.7-14.5-10.6-14.5-19.8m0 0c0-11.5 9.3-20.8 20.8-20.8m0 0c11.5 0 20.8 9.3 20.8 20.8m0 0c0 8.4-5 15.6-12.1 18.9" stroke="#071F4D"/><path fill-rule="evenodd" clip-rule="evenodd" d="M161.5 177.2c0-7.7-6.3-14-14-14s-14 6.3-14 14c0 5.8 3.5 10.8 8.6 12.9.1 0 5.8 1.6 10.7 0 5.3-1.7 8.7-7.1 8.7-12.9Z" fill="#00E4E5"/><path d="M140.5 190.1c-5.8-2.4-9.9-8.2-9.9-14.9 0-8.9 7.2-16.1 16.1-16.1 8.9 0 16.1 7.2 16.1 16.1 0 6.8-4.2 12.5-10.1 14.9M88.4 170.604c2.9 1.3 7.7 2.6 13.6.3 14.7-5.7 22.3-4.3 24.6-3.5M84.5 174.599s5.9 6.5 19 1.7c9.2-3.4 15.3-3.9 18.8-3.8" stroke="#071F4D"/><path fill-rule="evenodd" clip-rule="evenodd" d="M340.6 112.3h-55.2l-2.7 6.2H338l2.6-6.2Z" fill="#071F4D"/><path fill-rule="evenodd" clip-rule="evenodd" d="M236.8 117.9c-16.13 0-29.2 13.07-29.2 29.2s13.07 29.2 29.2 29.2 29.2-13.07 29.2-29.2-13.07-29.2-29.2-29.2Z" fill="#00E4E5"/><path d="M265 123.3c13.1 13.1 13.1 34.4 0 47.6M306 205.9h19.2M61.7 205.9h32.9M181.2 196.2h115.2M47.5 205.9h10v-9.7h73.8" stroke="#071F4D"/><path fill-rule="evenodd" clip-rule="evenodd" d="M146.7 179.2c-2.49 0-4.5 2.01-4.5 4.5s2.01 4.5 4.5 4.5 4.5-2.01 4.5-4.5-2.01-4.5-4.5-4.5Z" fill="#071F4D"/><path fill-rule="evenodd" clip-rule="evenodd" d="M169.5 196.2c3.9 0 7.1 3.2 7.1 7.1 0 3.9-3.2 7.1-7.1 7.1H144c-2.1 0-3.9 1.7-3.9 3.9v1c0 2.1 1.7 3.9 3.9 3.9h48c5.1 0 9.2 4.1 9.2 9.2s-4.1 9.3-9.2 9.2h-33.8c-2.3 0-4.1 1.8-4.1 4.1s1.8 4.1 4.1 4.1h4.2c4.4 0 8 3.6 8 8s-3.6 8-8 8H111c-3.7 0-6.8-3-6.8-6.8 0-3.7 3-6.8 6.8-6.8h.3c2.3 0 4.1-1.8 4.1-4.1s-1.8-4.1-4.1-4.1H79c-4.5 0-8.1-3.6-8.1-8.1s3.6-8.1 8.1-8.1h37.7c2.1 0 3.9-1.7 3.9-3.9 0-2.1-1.7-3.9-3.9-3.9h-7.9c-4.4 0-7.9-3.5-7.9-7.9s3.5-7.9 7.9-7.9h30.4c2.2 0 3.9-1.8 3.9-3.9V187c0-1.9 1.6-3.5 3.5-3.5s3.5 1.6 3.5 3.5v5.3c0 2.2 1.8 3.9 3.9 3.9h15.5Z" fill="#006EFF"/><path d="m227.8 138.5 18.7 18.7M227.8 157.2l18.7-18.7" stroke="#fff" stroke-width="6"/><path fill-rule="evenodd" clip-rule="evenodd" d="M194.8 96.9c-.99 0-1.8.81-1.8 1.8s.81 1.8 1.8 1.8 1.8-.81 1.8-1.8-.81-1.8-1.8-1.8ZM202.9 96.9c-.99 0-1.8.81-1.8 1.8s.81 1.8 1.8 1.8 1.8-.81 1.8-1.8-.81-1.8-1.8-1.8Z" fill="#fff"/><path d="m291.7 184.3-1.6 4.6h-121M298.1 166.7l22.5-61.9" stroke="#071F4D"/><path fill-rule="evenodd" clip-rule="evenodd" d="m193 134.1 2.2-5.1h-19.4l-2.3 5.1H193ZM313.2 123.5l2.2-5.1h-24.5l-2.3 5.1h24.6Z" fill="#DEEBFC"/><path d="m164.5 159.2 19.8-54.6" stroke="#071F4D"/><path fill-rule="evenodd" clip-rule="evenodd" d="M199.6 119.8h-53.2l-4.4 9.3h53.2l4.4-9.3Z" fill="#00E4E5"/><path d="M151.3 129.1H142l4.4-9.3h16.9" stroke="#071F4D"/><path fill-rule="evenodd" clip-rule="evenodd" d="M353.3 169.4h-67.4l-4.8 12.2h67.3l4.9-12.2Z" fill="#006EFF"/><path d="M332.4 169.4h20.9l-4.9 12.2h-39.7M242.7 235.5v-4.8c0-3.8 3.1-7 7-7h20.2c3.8 0 7 3.1 7 7" stroke="#071F4D"/><path d="M261.1 235.5v-4.8c0-3.8 3.1-7 7-7h13.7c3.8 0 7 3.1 7 7v4.8M242.6 230.7h13.7M235.2 237.7h63.3M224 237.7h6.7" stroke="#071F4D"/><path fill-rule="evenodd" clip-rule="evenodd" d="M324.1 141.3H335l3.3-10.7h-10.2l-4 10.7Z" fill="#C7DEFF"/><path fill-rule="evenodd" clip-rule="evenodd" d="M288.3 230.4c0-3.6-2.9-6.5-6.5-6.5h-14.2c-3.6 0-6.5 2.9-6.5 6.5v5.3h27.2v-5.3Z" fill="#071F4D"/><path d="M80.4 228.5H83M87.7 228.5h19.2M146.3 195.8v2c0 3.6-2.9 6.6-6.6 6.6H138M133.4 204.3h1.5M154 249.9h9.4" stroke="#DEEBFC"/><path d="m299.4 141.9 5.1-13.9" stroke="#071F4D"/></g></svg>
|
|
@@ -7,9 +7,6 @@
|
|
|
7
7
|
--el-color-black: white !important;
|
|
8
8
|
// 输入框边框颜色
|
|
9
9
|
// --el-border-color: #E4E4E7 !important; // DCDFE6
|
|
10
|
-
// 按钮粗度
|
|
11
|
-
--el-font-weight-primary: 400 !important;
|
|
12
|
-
|
|
13
10
|
--el-component-custom-height: 36px !important;
|
|
14
11
|
|
|
15
12
|
--el-component-size: var(--el-component-custom-height) !important;
|
|
@@ -25,12 +25,16 @@ $fade-easing: transition-config('fade-easing');
|
|
|
25
25
|
|
|
26
26
|
// === 动画类 ===
|
|
27
27
|
|
|
28
|
-
//
|
|
28
|
+
// 默认页面切换:轻微上移,退出更快;只作用于右侧路由内容。
|
|
29
29
|
.fade {
|
|
30
|
-
&-enter-active
|
|
30
|
+
&-enter-active {
|
|
31
|
+
transition:
|
|
32
|
+
opacity 200ms $easing,
|
|
33
|
+
transform 200ms $easing;
|
|
34
|
+
}
|
|
35
|
+
|
|
31
36
|
&-leave-active {
|
|
32
|
-
transition: opacity
|
|
33
|
-
will-change: opacity;
|
|
37
|
+
transition: opacity 120ms $fade-easing;
|
|
34
38
|
}
|
|
35
39
|
|
|
36
40
|
&-enter-from,
|
|
@@ -42,6 +46,14 @@ $fade-easing: transition-config('fade-easing');
|
|
|
42
46
|
&-leave-from {
|
|
43
47
|
opacity: 1;
|
|
44
48
|
}
|
|
49
|
+
|
|
50
|
+
&-enter-from {
|
|
51
|
+
transform: translate3d(0, 6px, 0);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&-enter-to {
|
|
55
|
+
transform: none;
|
|
56
|
+
}
|
|
45
57
|
}
|
|
46
58
|
|
|
47
59
|
// 滑动动画通用样式
|
|
@@ -102,3 +114,23 @@ $fade-easing: transition-config('fade-easing');
|
|
|
102
114
|
.slide-bottom {
|
|
103
115
|
@include slide-transition('bottom');
|
|
104
116
|
}
|
|
117
|
+
|
|
118
|
+
@media (prefers-reduced-motion: reduce) {
|
|
119
|
+
.fade,
|
|
120
|
+
.slide-left,
|
|
121
|
+
.slide-right,
|
|
122
|
+
.slide-top,
|
|
123
|
+
.slide-bottom {
|
|
124
|
+
&-enter-active,
|
|
125
|
+
&-leave-active {
|
|
126
|
+
transition: none;
|
|
127
|
+
will-change: auto;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
&-enter-from,
|
|
131
|
+
&-leave-to {
|
|
132
|
+
opacity: 1;
|
|
133
|
+
transform: none;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
@@ -97,6 +97,9 @@
|
|
|
97
97
|
|
|
98
98
|
/* ==================== Tailwind Theme Configuration ==================== */
|
|
99
99
|
@theme {
|
|
100
|
+
--font-sans: var(--app-font-family);
|
|
101
|
+
--font-mono: var(--app-font-mono);
|
|
102
|
+
|
|
100
103
|
/* Box Color (Light: white / Dark: black) */
|
|
101
104
|
--color-box: var(--default-box-color);
|
|
102
105
|
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
// 字体由 Fontsource 随应用打包;此入口在 Element Plus、Kevairy 样式之后加载。
|
|
2
|
+
:root {
|
|
3
|
+
--app-font-family:
|
|
4
|
+
'Noto Sans SC Variable', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans CJK SC', system-ui,
|
|
5
|
+
sans-serif;
|
|
6
|
+
--app-font-mono: 'SFMono-Regular', 'Consolas', 'Liberation Mono', monospace;
|
|
7
|
+
--app-font-size-small: 12px;
|
|
8
|
+
--app-font-size-secondary: 13px;
|
|
9
|
+
--app-font-size-base: 14px;
|
|
10
|
+
--app-font-size-title: 16px;
|
|
11
|
+
--app-font-weight-regular: 400;
|
|
12
|
+
--app-font-weight-medium: 500;
|
|
13
|
+
--app-font-weight-semibold: 600;
|
|
14
|
+
--app-line-height: 1.5;
|
|
15
|
+
--el-font-family: var(--app-font-family);
|
|
16
|
+
--el-font-size-base: var(--app-font-size-base);
|
|
17
|
+
--el-font-size-small: var(--app-font-size-secondary);
|
|
18
|
+
--el-font-size-extra-small: var(--app-font-size-small);
|
|
19
|
+
--el-font-size-medium: var(--app-font-size-title);
|
|
20
|
+
--el-font-weight-primary: var(--app-font-weight-medium);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
html {
|
|
24
|
+
font-family: var(--app-font-family);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
body {
|
|
28
|
+
font-size: var(--app-font-size-base);
|
|
29
|
+
font-weight: var(--app-font-weight-regular);
|
|
30
|
+
line-height: var(--app-line-height);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// 原生控件、浮层和 Teleport 内容均从同一字体入口继承。
|
|
34
|
+
button,
|
|
35
|
+
input,
|
|
36
|
+
optgroup,
|
|
37
|
+
select,
|
|
38
|
+
textarea {
|
|
39
|
+
font-family: inherit;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
code,
|
|
43
|
+
kbd,
|
|
44
|
+
pre,
|
|
45
|
+
samp {
|
|
46
|
+
font-family: var(--app-font-mono);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.el-form-item__label,
|
|
50
|
+
.el-button,
|
|
51
|
+
.el-tabs__item {
|
|
52
|
+
font-weight: var(--app-font-weight-medium);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.el-table {
|
|
56
|
+
font-variant-numeric: tabular-nums;
|
|
57
|
+
|
|
58
|
+
th.el-table__cell {
|
|
59
|
+
font-weight: var(--app-font-weight-medium);
|
|
60
|
+
color: var(--el-text-color-primary);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.kv-search-table .table-summary {
|
|
65
|
+
span {
|
|
66
|
+
font-size: var(--app-font-size-secondary);
|
|
67
|
+
font-weight: var(--app-font-weight-regular);
|
|
68
|
+
font-variant-numeric: tabular-nums;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.el-dialog .el-dialog__title,
|
|
73
|
+
.el-drawer .el-drawer__title,
|
|
74
|
+
.el-message-box .el-message-box__title {
|
|
75
|
+
font-size: var(--app-font-size-title);
|
|
76
|
+
font-weight: var(--app-font-weight-semibold);
|
|
77
|
+
line-height: var(--app-line-height);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.el-pagination,
|
|
81
|
+
.el-statistic,
|
|
82
|
+
.el-date-editor {
|
|
83
|
+
font-variant-numeric: tabular-nums;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.el-menu-item.is-active {
|
|
87
|
+
font-weight: var(--app-font-weight-medium);
|
|
88
|
+
}
|
|
@@ -18,7 +18,9 @@
|
|
|
18
18
|
<!-- 系统信息 -->
|
|
19
19
|
<div class="flex-c c-p" @click="toHome" v-if="isTopMenu">
|
|
20
20
|
<ArtLogo class="pl-4.5" />
|
|
21
|
-
<p v-if="width >= 1400" class="my-0 mx-2 ml-2 text-
|
|
21
|
+
<p v-if="width >= 1400" class="my-0 mx-2 ml-2 text-base font-semibold">{{
|
|
22
|
+
AppConfig.systemInfo.name
|
|
23
|
+
}}</p>
|
|
22
24
|
</div>
|
|
23
25
|
|
|
24
26
|
<ArtLogo
|
|
@@ -470,6 +472,24 @@
|
|
|
470
472
|
animation: breathing 1.5s ease-in-out infinite;
|
|
471
473
|
}
|
|
472
474
|
|
|
475
|
+
@media (prefers-reduced-motion: reduce) {
|
|
476
|
+
.refresh-btn,
|
|
477
|
+
.language-btn,
|
|
478
|
+
.setting-btn,
|
|
479
|
+
.full-screen-btn,
|
|
480
|
+
.exit-full-screen-btn,
|
|
481
|
+
.notice-button,
|
|
482
|
+
.chat-button {
|
|
483
|
+
&:hover :deep(.art-svg-icon) {
|
|
484
|
+
animation: none;
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
.breathing-dot {
|
|
489
|
+
animation: none;
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
|
|
473
493
|
/* iPad breakpoint adjustments */
|
|
474
494
|
@media screen and (width <= 768px) {
|
|
475
495
|
.logo2 {
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<ElSubMenu v-if="hasChildren" :index="item.path || item.meta.title" class="!p-0">
|
|
3
3
|
<template #title>
|
|
4
|
-
<ArtSvgIcon
|
|
4
|
+
<ArtSvgIcon
|
|
5
|
+
v-if="level === 0 && item.meta.icon"
|
|
6
|
+
:icon="item.meta.icon"
|
|
7
|
+
:color="theme?.iconColor"
|
|
8
|
+
class="mr-1 text-lg"
|
|
9
|
+
/>
|
|
5
10
|
<span class="text-md">{{ formatMenuTitle(item.meta.title) }}</span>
|
|
6
11
|
<div v-if="item.meta.showBadge" class="art-badge art-badge-horizontal" />
|
|
7
12
|
<div v-if="item.meta.showTextBadge" class="art-text-badge">
|
|
@@ -27,6 +32,7 @@
|
|
|
27
32
|
@click="goPage(item)"
|
|
28
33
|
>
|
|
29
34
|
<ArtSvgIcon
|
|
35
|
+
v-if="level === 0 && item.meta.icon"
|
|
30
36
|
:icon="item.meta.icon"
|
|
31
37
|
:color="theme?.iconColor"
|
|
32
38
|
class="mr-1 text-lg"
|
|
@@ -15,6 +15,13 @@ $popup-menu-radius: 6px;
|
|
|
15
15
|
width: calc(100% - 16px);
|
|
16
16
|
margin-left: 8px;
|
|
17
17
|
border-radius: 6px;
|
|
18
|
+
transition:
|
|
19
|
+
color 160ms ease,
|
|
20
|
+
background-color 160ms ease;
|
|
21
|
+
|
|
22
|
+
@media (prefers-reduced-motion: reduce) {
|
|
23
|
+
transition: none;
|
|
24
|
+
}
|
|
18
25
|
|
|
19
26
|
.menu-icon {
|
|
20
27
|
margin-left: -7px;
|
package/template/src/components/core/layouts/art-menus/art-sidebar-menu/widget/SidebarSubmenu.vue
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<template v-for="(item, index) in filteredMenuItems" :key="getUniqueKey(item, index)">
|
|
3
3
|
<ElSubMenu v-if="hasChildren(item)" :index="item.path || item.meta.title" :level="level">
|
|
4
4
|
<template #title>
|
|
5
|
-
<div class="menu-icon flex-cc">
|
|
5
|
+
<div v-if="level === 0 && item.meta.icon" class="menu-icon flex-cc">
|
|
6
6
|
<ArtSvgIcon
|
|
7
7
|
:icon="item.meta.icon"
|
|
8
8
|
:color="theme?.iconColor"
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
:level-item="level + 1"
|
|
31
31
|
@click="goPage(item)"
|
|
32
32
|
>
|
|
33
|
-
<div class="menu-icon flex-cc">
|
|
33
|
+
<div v-if="level === 0 && item.meta.icon" class="menu-icon flex-cc">
|
|
34
34
|
<ArtSvgIcon
|
|
35
35
|
:icon="item.meta.icon"
|
|
36
36
|
:color="theme?.iconColor"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<template>
|
|
3
3
|
<div
|
|
4
4
|
v-if="showWorkTab"
|
|
5
|
-
class="box-border flex-b w-full
|
|
5
|
+
class="art-work-tab box-border flex-b w-full select-none"
|
|
6
6
|
:class="[
|
|
7
7
|
tabStyle === 'tab-card' ? 'py-1 border-b border-[var(--art-card-border)]' : '',
|
|
8
8
|
tabStyle === 'tab-google' ? 'pt-1 pb-0 border-b border-[var(--art-card-border)]' : ''
|
|
@@ -19,9 +19,11 @@
|
|
|
19
19
|
}"
|
|
20
20
|
>
|
|
21
21
|
<li
|
|
22
|
-
class="art-card-xs inline-flex flex-cc h-8 mr-1.5 text-
|
|
22
|
+
class="art-card-xs inline-flex flex-cc h-8 mr-1.5 text-sm c-p hover:text-theme group"
|
|
23
23
|
:class="[
|
|
24
|
-
item.path === activeTab
|
|
24
|
+
item.path === activeTab
|
|
25
|
+
? 'activ-tab !text-theme font-medium'
|
|
26
|
+
: 'text-g-600 dark:text-g-800',
|
|
25
27
|
tabStyle === 'tab-google' ? 'google-tab relative !h-8 !leading-8 !border-none' : ''
|
|
26
28
|
]"
|
|
27
29
|
:style="{
|
|
@@ -568,17 +570,8 @@
|
|
|
568
570
|
background: var(--art-gray-300);
|
|
569
571
|
}
|
|
570
572
|
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
padding-left: 0.625rem;
|
|
575
|
-
}
|
|
576
|
-
}
|
|
577
|
-
|
|
578
|
-
@media only screen and (width <= 640px) {
|
|
579
|
-
.box-border.flex.justify-between {
|
|
580
|
-
padding-right: 0.9375rem;
|
|
581
|
-
padding-left: 0.9375rem;
|
|
582
|
-
}
|
|
573
|
+
.art-work-tab {
|
|
574
|
+
padding-inline: var(--art-page-gutter, 12px);
|
|
575
|
+
margin-bottom: 8px;
|
|
583
576
|
}
|
|
584
577
|
</style>
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="page-content !border-0 !bg-transparent min-h-screen flex-cc">
|
|
3
|
-
<div class="flex-cc max-md:!block max-md:text-center">
|
|
4
|
-
<ThemeSvg :src="data.imgUrl" size="100%" class="!w-100" />
|
|
3
|
+
<div class="flex-cc max-w-full max-md:!block max-md:text-center">
|
|
4
|
+
<ThemeSvg :src="data.imgUrl" size="100%" class="!w-100 max-w-full" aria-hidden="true" />
|
|
5
5
|
<div class="ml-15 w-75 max-md:mx-auto max-md:mt-10 max-md:w-full max-md:text-center">
|
|
6
|
+
<slot name="title" />
|
|
6
7
|
<p class="text-xl leading-7 text-g-600 max-md:text-lg">{{ data.desc }}</p>
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
<slot name="action">
|
|
9
|
+
<ElButton type="primary" size="large" @click="backHome" v-ripple class="mt-5">{{
|
|
10
|
+
data.btnText
|
|
11
|
+
}}</ElButton>
|
|
12
|
+
</slot>
|
|
10
13
|
</div>
|
|
11
14
|
</div>
|
|
12
15
|
</div>
|
|
@@ -97,6 +97,24 @@ export function useChart(options: UseChartOptions = {}) {
|
|
|
97
97
|
let isDestroyed = false
|
|
98
98
|
let emptyStateDiv: HTMLElement | null = null
|
|
99
99
|
|
|
100
|
+
// Canvas 不继承 DOM 字体,需要在初始化、更新及字体加载完成时同步排版。
|
|
101
|
+
const withTypography = (options: EChartsOption): EChartsOption => ({
|
|
102
|
+
...options,
|
|
103
|
+
textStyle: {
|
|
104
|
+
fontFamily: getCssVar('--app-font-family') || 'sans-serif',
|
|
105
|
+
fontSize: useChartOps().fontSize,
|
|
106
|
+
fontWeight: 400,
|
|
107
|
+
...options.textStyle
|
|
108
|
+
}
|
|
109
|
+
})
|
|
110
|
+
|
|
111
|
+
const handleFontsLoaded = () => {
|
|
112
|
+
if (chart && !isDestroyed) {
|
|
113
|
+
chart.setOption(withTypography(chart.getOption() as EChartsOption))
|
|
114
|
+
chart.resize()
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
100
118
|
// 清理定时器的统一方法
|
|
101
119
|
const clearTimers = () => {
|
|
102
120
|
if (resizeTimeoutId) {
|
|
@@ -442,7 +460,7 @@ export function useChart(options: UseChartOptions = {}) {
|
|
|
442
460
|
setupThemeWatcher()
|
|
443
461
|
}
|
|
444
462
|
if (chart && !isDestroyed) {
|
|
445
|
-
chart.setOption(options)
|
|
463
|
+
chart.setOption(withTypography(options))
|
|
446
464
|
pendingOptions = null
|
|
447
465
|
}
|
|
448
466
|
}
|
|
@@ -541,7 +559,7 @@ export function useChart(options: UseChartOptions = {}) {
|
|
|
541
559
|
initChart(options)
|
|
542
560
|
return
|
|
543
561
|
}
|
|
544
|
-
chart.setOption(options)
|
|
562
|
+
chart.setOption(withTypography(options))
|
|
545
563
|
} catch (error) {
|
|
546
564
|
console.error('图表更新失败:', error)
|
|
547
565
|
}
|
|
@@ -590,10 +608,12 @@ export function useChart(options: UseChartOptions = {}) {
|
|
|
590
608
|
|
|
591
609
|
onMounted(() => {
|
|
592
610
|
window.addEventListener('resize', debouncedResize)
|
|
611
|
+
document.fonts?.addEventListener('loadingdone', handleFontsLoaded)
|
|
593
612
|
})
|
|
594
613
|
|
|
595
614
|
onBeforeUnmount(() => {
|
|
596
615
|
window.removeEventListener('resize', debouncedResize)
|
|
616
|
+
document.fonts?.removeEventListener('loadingdone', handleFontsLoaded)
|
|
597
617
|
})
|
|
598
618
|
|
|
599
619
|
onUnmounted(() => {
|