@qilitt-mickey/vue3-temp-skill 1.0.12 → 1.1.2
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 +66 -214
- package/SKILL.md +165 -527
- package/package.json +2 -2
- package/references/api-check.md +187 -128
- package/references/base-code-dict.md +49 -48
- package/references/chart-echarts.md +61 -0
- package/references/code-quality.md +44 -15
- package/references/core-kernel.md +305 -0
- package/references/crud-pages.md +87 -261
- package/references/data-compare.md +502 -501
- package/references/data-mapping.md +218 -213
- package/references/data-screen.md +94 -79
- package/references/data-writeback.md +104 -104
- package/references/detail-page.md +100 -99
- package/references/directives-advanced.md +27 -4
- package/references/download-export.md +70 -68
- package/references/feedback-loading.md +62 -60
- package/references/feedback-ui.md +125 -111
- package/references/file-management.md +28 -7
- package/references/flowchart-g6.md +249 -244
- package/references/form-advanced.md +264 -26
- package/references/graph-relation.md +12 -7
- package/references/http-api.md +138 -103
- package/references/icons.md +326 -0
- package/references/layout-theme.md +1 -1
- package/references/mobile-h5.md +20 -0
- package/references/particles.md +143 -0
- package/references/permission-auth.md +8 -31
- package/references/project-inventory.md +175 -120
- package/references/qrcode-barcode.md +107 -92
- package/references/rich-text.md +85 -73
- package/references/seamless-scroll.md +40 -38
- package/references/table-vxe.md +114 -0
- package/references/tree-table.md +2 -1
- package/references/ui-components.md +5 -1
- package/references/verify-captcha.md +110 -96
- package/references/websocket-realtime.md +2 -1
- package/references/wechat-js.md +58 -0
- package/references/workflow-bpmn.md +207 -206
- package/references/advanced-ui.md +0 -302
- package/references/build-optim.md +0 -282
- package/references/vue-core.md +0 -209
|
@@ -1,60 +1,62 @@
|
|
|
1
|
-
# 反馈与 Loading
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
message
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
ElMessageBox
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
1
|
+
# 反馈与 Loading
|
|
2
|
+
|
|
3
|
+
> 按本文件示例编写,复用项目已有 Message / Loading / MessageBox 封装,勿另起一套提示方案。
|
|
4
|
+
|
|
5
|
+
规范系统 Loading、Message、MessageBox、NoticeBar 等反馈组件的使用。在需要提示用户或阻塞操作时参照。
|
|
6
|
+
|
|
7
|
+
## Loading
|
|
8
|
+
|
|
9
|
+
### 局部 Loading
|
|
10
|
+
|
|
11
|
+
```vue
|
|
12
|
+
<el-card v-loading.lock="loading" :element-loading-spinner="svgLoading">
|
|
13
|
+
<!-- 内容 -->
|
|
14
|
+
</el-card>
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### 全屏 Loading
|
|
18
|
+
|
|
19
|
+
```vue
|
|
20
|
+
<el-button v-loading.lock.fullscreen="fullLoading" @click="submit">
|
|
21
|
+
保存
|
|
22
|
+
</el-button>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### 获取系统统一 Loading SVG
|
|
26
|
+
|
|
27
|
+
```typescript
|
|
28
|
+
import { useApp } from "@/hooks/useApp";
|
|
29
|
+
|
|
30
|
+
const { svgLoading } = useApp();
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Message
|
|
34
|
+
|
|
35
|
+
使用 `src/utils/message.ts` 封装函数:
|
|
36
|
+
|
|
37
|
+
```typescript
|
|
38
|
+
import { message, closeAllMessage } from "@/utils/message";
|
|
39
|
+
|
|
40
|
+
message("操作成功", { type: "success" });
|
|
41
|
+
message("警告信息", { type: "warning", duration: 3000 });
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
默认 `duration: 5000`、`grouping: true`、`plain: true`。
|
|
45
|
+
|
|
46
|
+
## MessageBox
|
|
47
|
+
|
|
48
|
+
```typescript
|
|
49
|
+
import { ElMessageBox } from "element-plus";
|
|
50
|
+
|
|
51
|
+
ElMessageBox.confirm($t("确定删除吗?"), $t("温馨提醒"), {
|
|
52
|
+
confirmButtonText: $t("确定"),
|
|
53
|
+
cancelButtonText: $t("取消"),
|
|
54
|
+
type: "warning",
|
|
55
|
+
});
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## 关键约定
|
|
59
|
+
|
|
60
|
+
1. 所有提示文案使用 `$t()`。
|
|
61
|
+
2. 长耗时操作显示 loading,避免用户重复点击。
|
|
62
|
+
3. 表单提交失败调用 `checkReeorPosition()` 定位错误项。
|
|
@@ -1,111 +1,125 @@
|
|
|
1
|
-
# 展示类反馈组件
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
</template>
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
##
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
1
|
+
# 展示类反馈组件
|
|
2
|
+
|
|
3
|
+
> 按本文件示例编写,复用项目已有反馈类组件与 Hook,勿另起一套展示实现。
|
|
4
|
+
|
|
5
|
+
规范通知栏、水印、时间轴、闪烁点、打字机动画等展示类反馈组件的使用。在需要信息展示、氛围效果时参照。
|
|
6
|
+
|
|
7
|
+
## 依赖(缺则先装)
|
|
8
|
+
|
|
9
|
+
多数组件为项目自研,无额外包。打字机需要:
|
|
10
|
+
|
|
11
|
+
| 包 | 版本 | 用途 |
|
|
12
|
+
|---|---|---|
|
|
13
|
+
| `typeit` | `8.8.7` | `ReTypeit` |
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
pnpm add typeit@8.8.7
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## ReNoticeBar 通知栏
|
|
20
|
+
|
|
21
|
+
```vue
|
|
22
|
+
<script setup lang="ts">
|
|
23
|
+
const NoticeBar = defineAsyncComponent(
|
|
24
|
+
() => import("@/components/ReNoticeBar"),
|
|
25
|
+
);
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<template>
|
|
29
|
+
<NoticeBar text="系统将于今晚 22:00 进行维护" />
|
|
30
|
+
|
|
31
|
+
<NoticeBar
|
|
32
|
+
text="系统将于今晚 22:00 进行维护"
|
|
33
|
+
left-icon="notice"
|
|
34
|
+
right-icon="arrowRight"
|
|
35
|
+
background="#ecf5ff"
|
|
36
|
+
color="#409eff"
|
|
37
|
+
/>
|
|
38
|
+
</template>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Watermark 水印
|
|
42
|
+
|
|
43
|
+
使用 `@pureadmin/utils` 的 `useWatermark`。
|
|
44
|
+
|
|
45
|
+
```vue
|
|
46
|
+
<script setup lang="ts">
|
|
47
|
+
import { useWatermark } from "@pureadmin/utils";
|
|
48
|
+
|
|
49
|
+
const { setWatermark, clear } = useWatermark();
|
|
50
|
+
const appMain: Ref = inject("appMain");
|
|
51
|
+
const { setWatermark: setLocalWatermark, clear: clearLocal } =
|
|
52
|
+
useWatermark(appMain);
|
|
53
|
+
</script>
|
|
54
|
+
|
|
55
|
+
<template>
|
|
56
|
+
<el-button
|
|
57
|
+
@click="setWatermark('水印测试、多行测试', { rotate: -20, lineHeight: 20 })"
|
|
58
|
+
>
|
|
59
|
+
整页水印
|
|
60
|
+
</el-button>
|
|
61
|
+
<el-button @click="clear">清除整页水印</el-button>
|
|
62
|
+
<el-button @click="setLocalWatermark('局部水印')">局部水印</el-button>
|
|
63
|
+
</template>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
- 不传容器则铺满整个页面。
|
|
67
|
+
- 传入容器 DOM 则只在该容器内绘制水印。
|
|
68
|
+
|
|
69
|
+
## ReTimeLine 时间轴
|
|
70
|
+
|
|
71
|
+
```vue
|
|
72
|
+
<script setup lang="ts">
|
|
73
|
+
import { ReTimeLine } from "@/components/ReTimeLine";
|
|
74
|
+
|
|
75
|
+
const items = ref([
|
|
76
|
+
{ title: "立项", date: "2024-01-01", imgUrl: "/test.png" },
|
|
77
|
+
{ title: "开发", date: "2024-03-01", imgUrl: "/test.png" },
|
|
78
|
+
]);
|
|
79
|
+
</script>
|
|
80
|
+
|
|
81
|
+
<template>
|
|
82
|
+
<ReTimeLine :items="items" />
|
|
83
|
+
</template>
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## ReFlicker 闪烁点
|
|
87
|
+
|
|
88
|
+
```vue
|
|
89
|
+
<script setup lang="ts">
|
|
90
|
+
import { useRenderFlicker } from "@/components/ReFlicker";
|
|
91
|
+
|
|
92
|
+
const Flicker = useRenderFlicker({
|
|
93
|
+
width: "12px",
|
|
94
|
+
height: "12px",
|
|
95
|
+
background: "var(--el-color-success)",
|
|
96
|
+
borderRadius: "50%",
|
|
97
|
+
scale: 2,
|
|
98
|
+
});
|
|
99
|
+
</script>
|
|
100
|
+
|
|
101
|
+
<template>
|
|
102
|
+
<Flicker />
|
|
103
|
+
</template>
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## ReTypeit 打字机动画
|
|
107
|
+
|
|
108
|
+
```vue
|
|
109
|
+
<script setup lang="ts">
|
|
110
|
+
import TypeIt from "@/components/ReTypeit";
|
|
111
|
+
</script>
|
|
112
|
+
|
|
113
|
+
<template>
|
|
114
|
+
<TypeIt :options="{ speed: 100, loop: true }">
|
|
115
|
+
<span class="type-it">Hello World</span>
|
|
116
|
+
</TypeIt>
|
|
117
|
+
</template>
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## 关键约定
|
|
121
|
+
|
|
122
|
+
1. 通知栏长文本自动滚动;搭配 `el-carousel` 可实现垂直轮播。
|
|
123
|
+
2. 水印在页面切换或登录态变化时应重新设置,避免被移除。
|
|
124
|
+
3. `ReTimeLine` 数据项至少包含 `title` 与 `date`。
|
|
125
|
+
4. `ReFlicker` 通过 `useRenderFlicker` 返回组件,适合状态指示。
|
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# 文件管理与预览
|
|
2
2
|
|
|
3
|
+
> 按下列示例编写。
|
|
4
|
+
> **构建附属**:`build/plugins/FileViewer.ts` + `@file-viewer/*` 大体积资源随本能力,不单独成构建 Skill。
|
|
5
|
+
|
|
6
|
+
## 依赖(缺则先装)
|
|
7
|
+
|
|
8
|
+
| 包 | 版本 | 类型 |
|
|
9
|
+
|---|---|---|
|
|
10
|
+
| `@file-viewer/core` | `2.1.14` | dependencies |
|
|
11
|
+
| `@file-viewer/vue3` | `2.1.14` | dependencies |
|
|
12
|
+
| `@file-viewer/preset-all` | `2.1.14` | dependencies |
|
|
13
|
+
| `browser-image-compression` | `2.0.2` | dependencies(上传压缩) |
|
|
14
|
+
| `@file-viewer/vite-plugin` | `2.1.14` | **devDependencies** |
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
pnpm add @file-viewer/core@2.1.14 @file-viewer/vue3@2.1.14 @file-viewer/preset-all@2.1.14 browser-image-compression@2.0.2
|
|
18
|
+
pnpm add -D @file-viewer/vite-plugin@2.1.14
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
先查 `package.json`;完整模板通常已装齐。缺插件接线时恢复 `build/plugins/FileViewer.ts`,勿擅自改 Vite 主配置。三件套必须同版本。
|
|
22
|
+
|
|
3
23
|
## ReAttachment 附件管理
|
|
4
24
|
|
|
5
25
|
集附件类型选择、上传、下载、删除于一体的表单组件。
|
|
@@ -121,12 +141,13 @@ downloadAttachment(url, fileName)
|
|
|
121
141
|
2. `pageStatus` 控制编辑态:`view` 模式下所有操作禁用。
|
|
122
142
|
3. 文件大小校验在 `onChange` 中实时执行,超限文件自动过滤。
|
|
123
143
|
4. 文件预览组件通过 `v-model:visible` 控制显示隐藏。
|
|
124
|
-
5.
|
|
125
|
-
6.
|
|
144
|
+
5. 附件类型选项可从字典 `baseCodeGet(...)` 获取。
|
|
145
|
+
6. 删除已上传附件必须弹确认框。
|
|
146
|
+
7. 选型:`@file-viewer/*` + `ReFileViewer`,禁止擅自换 pdf.js 等方案。
|
|
126
147
|
|
|
127
|
-
##
|
|
148
|
+
## 落点(仓库内)
|
|
128
149
|
|
|
129
|
-
-
|
|
130
|
-
-
|
|
131
|
-
-
|
|
132
|
-
-
|
|
150
|
+
- `src/components/ReAttachment`
|
|
151
|
+
- `src/components/ReFileViewer`
|
|
152
|
+
- `src/utils/uploadManager.ts` / `imageCompression.ts`
|
|
153
|
+
- `build/plugins/FileViewer.ts`
|