vue3-admin-gpt 1.0.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 (118) hide show
  1. package/.env.development +14 -0
  2. package/.env.production +14 -0
  3. package/LICENSE +21 -0
  4. package/README.en.md +106 -0
  5. package/README.md +104 -0
  6. package/build-zip.cjs +53 -0
  7. package/cli.js +110 -0
  8. package/jsconfig.json +9 -0
  9. package/package.json +92 -0
  10. package/public/index.html +20 -0
  11. package/public/robots.txt +2 -0
  12. package/rspack.config.js +282 -0
  13. package/rspack.js +162 -0
  14. package/src/App.vue +9 -0
  15. package/src/api/icon.js +9 -0
  16. package/src/api/router.js +9 -0
  17. package/src/api/table.js +25 -0
  18. package/src/api/tree.js +9 -0
  19. package/src/api/user.js +34 -0
  20. package/src/assets/error_images/401.png +0 -0
  21. package/src/assets/error_images/404.png +0 -0
  22. package/src/assets/error_images/cloud.png +0 -0
  23. package/src/assets/login_images/background.jpg +0 -0
  24. package/src/assets/logo.png +0 -0
  25. package/src/assets/qr_logo/lqr_logo.png +0 -0
  26. package/src/assets/vuejs-fill.svg +4 -0
  27. package/src/components/VabPageHeader/index.vue +133 -0
  28. package/src/config/index.js +7 -0
  29. package/src/config/net.config.js +20 -0
  30. package/src/config/permission.js +136 -0
  31. package/src/config/setting.config.js +62 -0
  32. package/src/config/settings.js +6 -0
  33. package/src/config/theme.config.js +14 -0
  34. package/src/layouts/EmptyLayout.vue +3 -0
  35. package/src/layouts/components/VabAppMain/index.vue +109 -0
  36. package/src/layouts/components/VabAvatar/index.vue +255 -0
  37. package/src/layouts/components/VabBreadcrumb/index.vue +61 -0
  38. package/src/layouts/components/VabFullScreen/index.vue +61 -0
  39. package/src/layouts/components/VabLogo/index.vue +94 -0
  40. package/src/layouts/components/VabNav/index.vue +176 -0
  41. package/src/layouts/components/VabSide/components/VabMenuItem.vue +80 -0
  42. package/src/layouts/components/VabSide/components/VabSideItem.vue +100 -0
  43. package/src/layouts/components/VabSide/components/VabSubmenu.vue +56 -0
  44. package/src/layouts/components/VabSide/index.vue +123 -0
  45. package/src/layouts/components/VabTabs/index.vue +500 -0
  46. package/src/layouts/components/VabTheme/index.vue +603 -0
  47. package/src/layouts/components/VabTop/index.vue +286 -0
  48. package/src/layouts/export.js +29 -0
  49. package/src/layouts/index.vue +339 -0
  50. package/src/main.js +40 -0
  51. package/src/plugins/echarts.js +4 -0
  52. package/src/plugins/index.js +44 -0
  53. package/src/plugins/support.js +16 -0
  54. package/src/router/index.js +400 -0
  55. package/src/store/index.js +26 -0
  56. package/src/store/modules/errorLog.js +27 -0
  57. package/src/store/modules/routes.js +60 -0
  58. package/src/store/modules/settings.js +73 -0
  59. package/src/store/modules/table.js +22 -0
  60. package/src/store/modules/tabsBar.js +109 -0
  61. package/src/store/modules/user.js +131 -0
  62. package/src/styles/element-variables.scss +13 -0
  63. package/src/styles/loading.scss +345 -0
  64. package/src/styles/nav-icons.scss +52 -0
  65. package/src/styles/normalize.scss +353 -0
  66. package/src/styles/spinner/dots.css +68 -0
  67. package/src/styles/spinner/gauge.css +104 -0
  68. package/src/styles/spinner/inner-circles.css +51 -0
  69. package/src/styles/spinner/plus.css +341 -0
  70. package/src/styles/themes/default.scss +1 -0
  71. package/src/styles/transition.scss +18 -0
  72. package/src/styles/vab.scss +476 -0
  73. package/src/styles/variables.scss +69 -0
  74. package/src/utils/accessToken.js +56 -0
  75. package/src/utils/eventBus.js +8 -0
  76. package/src/utils/handleRoutes.js +100 -0
  77. package/src/utils/index.js +231 -0
  78. package/src/utils/message.js +67 -0
  79. package/src/utils/pageTitle.js +11 -0
  80. package/src/utils/password.js +43 -0
  81. package/src/utils/permission.js +19 -0
  82. package/src/utils/request.js +187 -0
  83. package/src/utils/static.js +81 -0
  84. package/src/utils/vab.js +218 -0
  85. package/src/utils/validate.js +48 -0
  86. package/src/views/401.vue +302 -0
  87. package/src/views/404.vue +302 -0
  88. package/src/views/demo/index.vue +591 -0
  89. package/src/views/index/index.vue +1489 -0
  90. package/src/views/login/index.vue +456 -0
  91. package/src/views/register/index.vue +524 -0
  92. package/src/views/vab/calendar.vue +488 -0
  93. package/src/views/vab/campaign.vue +1006 -0
  94. package/src/views/vab/chart.vue +189 -0
  95. package/src/views/vab/customer.vue +666 -0
  96. package/src/views/vab/editor.vue +84 -0
  97. package/src/views/vab/form.vue +151 -0
  98. package/src/views/vab/help.vue +390 -0
  99. package/src/views/vab/icon.vue +113 -0
  100. package/src/views/vab/knowledge.vue +820 -0
  101. package/src/views/vab/nested/menu1/menu2/menu3.vue +29 -0
  102. package/src/views/vab/nested/menu1/menu2.vue +33 -0
  103. package/src/views/vab/nested/menu1.vue +33 -0
  104. package/src/views/vab/nested.vue +97 -0
  105. package/src/views/vab/notification.vue +416 -0
  106. package/src/views/vab/order.vue +507 -0
  107. package/src/views/vab/permissions.vue +214 -0
  108. package/src/views/vab/product.vue +724 -0
  109. package/src/views/vab/project.vue +559 -0
  110. package/src/views/vab/settings.vue +319 -0
  111. package/src/views/vab/statistics.vue +431 -0
  112. package/src/views/vab/table.vue +110 -0
  113. package/src/views/vab/task.vue +613 -0
  114. package/src/views/vab/team.vue +662 -0
  115. package/src/views/vab/tree.vue +44 -0
  116. package/src/views/vab/upload.vue +180 -0
  117. package/src/views/vab/vue3Demo/index.vue +103 -0
  118. package/src/views/vab/workflow.vue +863 -0
@@ -0,0 +1,591 @@
1
+ <template>
2
+ <div class="demo-container">
3
+ <el-card shadow="never">
4
+ <template #header>
5
+ <div class="card-header">
6
+ <span class="title">路由创建教程</span>
7
+ </div>
8
+ </template>
9
+
10
+ <el-alert
11
+ title="欢迎使用路由创建示例页面"
12
+ type="success"
13
+ :closable="false"
14
+ show-icon
15
+ style="margin-bottom: 20px"
16
+ >
17
+ 本页面将帮助你了解如何在系统中创建自己的页面和路由
18
+ </el-alert>
19
+
20
+ <el-divider content-position="left">
21
+ <el-icon><Document /></el-icon>
22
+ 第一步:创建页面组件
23
+ </el-divider>
24
+
25
+ <el-card shadow="hover" style="margin-bottom: 20px">
26
+ <template #header>
27
+ <span>在 src/views/ 目录下创建你的页面组件</span>
28
+ </template>
29
+ <el-text tag="pre" class="code-block">
30
+ &lt;template&gt;
31
+ &lt;div class="my-page-container"&gt;
32
+ &lt;el-card shadow="never"&gt;
33
+ &lt;h2&gt;我的页面&lt;/h2&gt;
34
+ &lt;p&gt;这是我的第一个自定义页面&lt;/p&gt;
35
+ &lt;el-button type="primary" @click="handleClick"&gt;
36
+ 点击我
37
+ &lt;/el-button&gt;
38
+ &lt;/el-card&gt;
39
+ &lt;/div&gt;
40
+ &lt;/template&gt;
41
+
42
+ &lt;script setup&gt;
43
+ import { ElMessage } from "element-plus";
44
+
45
+ const handleClick = () =&gt; {
46
+ ElMessage.success("按钮被点击了!")
47
+ };
48
+ &lt;/script&gt;
49
+
50
+ &lt;style lang="scss" scoped&gt;
51
+ .my-page-container {
52
+ padding: 20px;
53
+ }
54
+ &lt;/style&gt;
55
+ </el-text>
56
+ </el-card>
57
+
58
+ <el-divider content-position="left">
59
+ <el-icon><Setting /></el-icon>
60
+ 第二步:配置路由
61
+ </el-divider>
62
+
63
+ <el-card shadow="hover" style="margin-bottom: 20px">
64
+ <template #header>
65
+ <span>在 src/router/index.js 中添加路由配置</span>
66
+ </template>
67
+ <el-text tag="pre" class="code-block">
68
+ {
69
+ path: "/myPage",
70
+ component: Layout,
71
+ redirect: "/myPage/index",
72
+ name: "MyPage",
73
+ meta: {
74
+ title: "我的页面",
75
+ icon: "star",
76
+ roles: ["admin", "common"]
77
+ },
78
+ children: [
79
+ {
80
+ path: "index",
81
+ name: "MyPageIndex",
82
+ component: () =&gt; import("@/views/myPage/index"),
83
+ meta: {
84
+ title: "页面首页",
85
+ icon: "star"
86
+ }
87
+ }
88
+ ]
89
+ }
90
+ </el-text>
91
+ </el-card>
92
+
93
+ <el-divider content-position="left">
94
+ <el-icon><InfoFilled /></el-icon>
95
+ 路由配置说明
96
+ </el-divider>
97
+
98
+ <el-table :data="routerConfig" border style="width: 100%">
99
+ <el-table-column prop="field" label="配置项" width="140" />
100
+ <el-table-column prop="description" label="说明" />
101
+ <el-table-column prop="example" label="示例" width="200" />
102
+ </el-table>
103
+
104
+ <el-alert
105
+ title="重要:组件名必须与路由 name 一致"
106
+ type="warning"
107
+ :closable="false"
108
+ show-icon
109
+ style="margin-top: 15px"
110
+ >
111
+ keep-alive 缓存是通过组件的 <code>name</code> 属性来匹配的,因此组件的 <code>name</code> 必须与路由配置中的 <code>name</code> 完全一致,缓存才能生效。<br><br>
112
+ 例如:路由中 <code>name: "ExampleIndex"</code>,则组件中必须定义 <code>export default { name: "ExampleIndex" }</code> 或 <code>defineOptions({ name: "ExampleIndex" })</code>
113
+ </el-alert>
114
+
115
+ <el-divider content-position="left">
116
+ <el-icon><Memo /></el-icon>
117
+ 第三步:页面缓存机制详解
118
+ </el-divider>
119
+
120
+ <el-card shadow="hover" style="margin-bottom: 20px">
121
+ <template #header>
122
+ <span>缓存工作原理</span>
123
+ </template>
124
+ <el-descriptions :column="1" border>
125
+ <el-descriptions-item label="实现位置">
126
+ src/layouts/components/VabAppMain/index.vue
127
+ </el-descriptions-item>
128
+ <el-descriptions-item label="核心代码">
129
+ <el-text tag="pre" class="code-block-small">
130
+ &lt;router-view v-slot="{ Component }"&gt;
131
+ &lt;transition mode="out-in" name="fade-transform"&gt;
132
+ &lt;keep-alive :include="cachedRoutes" :max="keepAliveMaxNum"&gt;
133
+ &lt;component :is="Component" /&gt;
134
+ &lt;/keep-alive&gt;
135
+ &lt;/transition&gt;
136
+ &lt;/router-view&gt;
137
+ </el-text>
138
+ </el-descriptions-item>
139
+ <el-descriptions-item label="缓存判断">
140
+ 根据 meta.noKeepAlive 属性判断是否缓存,false 时缓存
141
+ </el-descriptions-item>
142
+ </el-descriptions>
143
+ </el-card>
144
+
145
+ <el-card shadow="hover" style="margin-bottom: 20px">
146
+ <template #header>
147
+ <span>如何控制页面缓存</span>
148
+ </template>
149
+ <el-alert
150
+ title="缓存配置说明"
151
+ type="info"
152
+ :closable="false"
153
+ style="margin-bottom: 15px"
154
+ >
155
+ 在路由 meta 中配置 <code>noKeepAlive</code> 属性
156
+ </el-alert>
157
+ <el-table :data="cacheConfig" border style="width: 100%">
158
+ <el-table-column prop="config" label="配置方式" width="180" />
159
+ <el-table-column prop="effect" label="效果" />
160
+ <el-table-column prop="useCase" label="适用场景" />
161
+ </el-table>
162
+ </el-card>
163
+
164
+ <el-card shadow="hover" style="margin-bottom: 20px">
165
+ <template #header>
166
+ <span>缓存测试示例</span>
167
+ </template>
168
+ <el-row :gutter="20">
169
+ <el-col :span="12">
170
+ <div class="cache-test-box">
171
+ <h4>不缓存页面(每次刷新)</h4>
172
+ <el-input
173
+ v-model="noCacheInput"
174
+ placeholder="输入内容后切换标签再回来"
175
+ style="margin-bottom: 10px"
176
+ />
177
+ <el-button size="small" type="info" disabled>
178
+ noKeepAlive: true
179
+ </el-button>
180
+ </div>
181
+ </el-col>
182
+ <el-col :span="12">
183
+ <div class="cache-test-box">
184
+ <h4>缓存页面(保持状态)</h4>
185
+ <el-input
186
+ v-model="cacheInput"
187
+ placeholder="输入内容后切换标签再回来"
188
+ style="margin-bottom: 10px"
189
+ />
190
+ <el-button size="small" type="success" disabled>
191
+ noKeepAlive: false
192
+ </el-button>
193
+ </div>
194
+ </el-col>
195
+ </el-row>
196
+ </el-card>
197
+
198
+ <el-divider content-position="left">
199
+ <el-icon><Tools /></el-icon>
200
+ 第四步:系统配置详解
201
+ </el-divider>
202
+
203
+ <el-card shadow="hover" style="margin-bottom: 20px">
204
+ <template #header>
205
+ <span>setting.config.js 重要配置项</span>
206
+ </template>
207
+ <el-table :data="settingConfig" border style="width: 100%">
208
+ <el-table-column prop="field" label="配置项" width="160" />
209
+ <el-table-column prop="defaultValue" label="默认值" width="150" />
210
+ <el-table-column prop="description" label="说明" />
211
+ </el-table>
212
+ </el-card>
213
+
214
+ <el-card shadow="hover" style="margin-bottom: 20px">
215
+ <template #header>
216
+ <span>theme.config.js 重要配置项</span>
217
+ </template>
218
+ <el-table :data="themeConfig" border style="width: 100%">
219
+ <el-table-column prop="field" label="配置项" width="140" />
220
+ <el-table-column prop="defaultValue" label="默认值" width="140" />
221
+ <el-table-column prop="description" label="说明" />
222
+ <el-table-column prop="options" label="可选值" />
223
+ </el-table>
224
+ </el-card>
225
+
226
+ <el-divider content-position="left">
227
+ <el-icon><MagicStick /></el-icon>
228
+ 第五步:常用组件示例
229
+ </el-divider>
230
+
231
+ <el-row :gutter="20">
232
+ <el-col :span="12">
233
+ <el-card shadow="hover" style="margin-bottom: 20px">
234
+ <template #header>
235
+ <span>按钮示例</span>
236
+ </template>
237
+ <div class="button-demo">
238
+ <el-button type="primary">主要按钮</el-button>
239
+ <el-button type="success">成功按钮</el-button>
240
+ <el-button type="warning">警告按钮</el-button>
241
+ <el-button type="danger">危险按钮</el-button>
242
+ </div>
243
+ </el-card>
244
+ </el-col>
245
+
246
+ <el-col :span="12">
247
+ <el-card shadow="hover" style="margin-bottom: 20px">
248
+ <template #header>
249
+ <span>消息提示示例</span>
250
+ </template>
251
+ <div class="message-demo">
252
+ <el-button @click="showSuccess">成功消息</el-button>
253
+ <el-button @click="showWarning">警告消息</el-button>
254
+ <el-button @click="showError">错误消息</el-button>
255
+ </div>
256
+ </el-card>
257
+ </el-col>
258
+ </el-row>
259
+
260
+ <el-card shadow="hover">
261
+ <template #header>
262
+ <span>数据表格示例</span>
263
+ </template>
264
+ <el-table :data="tableData" border style="width: 100%">
265
+ <el-table-column prop="date" label="日期" width="180" />
266
+ <el-table-column prop="name" label="姓名" width="180" />
267
+ <el-table-column prop="address" label="地址" />
268
+ <el-table-column label="操作" width="150">
269
+ <template #default="scope">
270
+ <el-button
271
+ size="small"
272
+ type="primary"
273
+ @click="handleEdit(scope.row)"
274
+ >
275
+ 编辑
276
+ </el-button>
277
+ <el-button
278
+ size="small"
279
+ type="danger"
280
+ @click="handleDelete(scope.row)"
281
+ >
282
+ 删除
283
+ </el-button>
284
+ </template>
285
+ </el-table-column>
286
+ </el-table>
287
+ </el-card>
288
+ </el-card>
289
+ </div>
290
+ </template>
291
+
292
+ <script setup>
293
+ import { ref } from "vue";
294
+ import { ElMessage, ElMessageBox } from "element-plus";
295
+ import {
296
+ Document,
297
+ Setting,
298
+ InfoFilled,
299
+ MagicStick,
300
+ Memo,
301
+ Tools,
302
+ } from "@element-plus/icons-vue";
303
+
304
+ // 定义组件名,用于 keep-alive 缓存匹配
305
+ defineOptions({
306
+ name: "ExampleIndex",
307
+ });
308
+
309
+ // 响应式数据
310
+ const noCacheInput = ref("");
311
+ const cacheInput = ref("");
312
+
313
+ const routerConfig = [
314
+ {
315
+ field: "path",
316
+ description: "路由路径",
317
+ example: "/myPage",
318
+ },
319
+ {
320
+ field: "component",
321
+ description: "父级布局组件",
322
+ example: "Layout / EmptyLayout",
323
+ },
324
+ {
325
+ field: "redirect",
326
+ description: "重定向路径",
327
+ example: "/myPage/index",
328
+ },
329
+ {
330
+ field: "name",
331
+ description: "路由名称(唯一),必须与组件的 name 完全一致才能缓存",
332
+ example: "MyPage",
333
+ },
334
+ {
335
+ field: "meta.title",
336
+ description: "页面标题",
337
+ example: "我的页面",
338
+ },
339
+ {
340
+ field: "meta.icon",
341
+ description: "菜单图标",
342
+ example: "star, user, setting 等",
343
+ },
344
+ {
345
+ field: "meta.roles",
346
+ description: "访问权限",
347
+ example: "['admin', 'common']",
348
+ },
349
+ {
350
+ field: "meta.noKeepAlive",
351
+ description: "是否不缓存页面(true=不缓存)",
352
+ example: "true / false",
353
+ },
354
+ ];
355
+
356
+ const cacheConfig = [
357
+ {
358
+ config: "meta: { noKeepAlive: true }",
359
+ effect: "页面不缓存,每次访问都重新渲染",
360
+ useCase: "登录页、注册页、详情页等需要实时数据的页面",
361
+ },
362
+ {
363
+ config: "meta: { noKeepAlive: false } 或不设置",
364
+ effect: "页面会被缓存,保持滚动位置和表单状态",
365
+ useCase: "列表页、表单页等需要保持用户操作状态的页面",
366
+ },
367
+ ];
368
+
369
+ const settingConfig = [
370
+ {
371
+ field: "loginInterception",
372
+ defaultValue: "false",
373
+ description: "是否开启登录拦截。true=未登录自动跳转登录页,false=不拦截",
374
+ },
375
+ {
376
+ field: "keepAliveMaxNum",
377
+ defaultValue: "99",
378
+ description: "路由缓存的最大数量,超过限制后最早缓存的页面会被清除",
379
+ },
380
+ {
381
+ field: "routesWhiteList",
382
+ defaultValue: "[/login, /register, /404, /401]",
383
+ description: "路由白名单,这些路径不需要token校验即可访问",
384
+ },
385
+ {
386
+ field: "tokenName",
387
+ defaultValue: "accessToken",
388
+ description: "token的名称,用于请求头和存储",
389
+ },
390
+ {
391
+ field: "tokenTableName",
392
+ defaultValue: "vue-admin-better-2024",
393
+ description: "token在localStorage/sessionStorage中存储的key名称",
394
+ },
395
+ {
396
+ field: "storage",
397
+ defaultValue: "localStorage",
398
+ description: "token存储方式,可选 localStorage 或 sessionStorage",
399
+ },
400
+ {
401
+ field: "recordRoute",
402
+ defaultValue: "true",
403
+ description: "token失效回退登录页时是否记录当前路由,登录后可返回原页面",
404
+ },
405
+ {
406
+ field: "authentication",
407
+ defaultValue: "intelligence",
408
+ description: "权限验证方式:intelligence(后端只控制permissions)或 all(完全由后端控制)",
409
+ },
410
+ {
411
+ field: "title",
412
+ defaultValue: "vue-admin-better",
413
+ description: "系统标题,显示在页面、浏览器标签和加载屏",
414
+ },
415
+ {
416
+ field: "devPort",
417
+ defaultValue: "8091",
418
+ description: "开发环境端口号",
419
+ },
420
+ {
421
+ field: "routerMode",
422
+ defaultValue: "hash",
423
+ description: "路由模式:hash(URL带#号)或 history(URL干净,需服务器配置)",
424
+ },
425
+ ];
426
+
427
+ const themeConfig = [
428
+ {
429
+ field: "header",
430
+ defaultValue: "fixed",
431
+ description: "头部固定方式",
432
+ options: "fixed(固定)/ noFixed(不固定)",
433
+ },
434
+ {
435
+ field: "layout",
436
+ defaultValue: "vertical",
437
+ description: "布局模式",
438
+ options: "vertical(纵向菜单)/ horizontal(横向菜单)",
439
+ },
440
+ {
441
+ field: "themeBar",
442
+ defaultValue: "true",
443
+ description: "是否显示主题配置按钮(右上角设置图标)",
444
+ options: "true / false",
445
+ },
446
+ {
447
+ field: "tabsBar",
448
+ defaultValue: "true",
449
+ description: "是否显示多标签页导航",
450
+ options: "true / false",
451
+ },
452
+ ];
453
+
454
+ const tableData = [
455
+ {
456
+ date: "2024-01-01",
457
+ name: "张三",
458
+ address: "北京市朝阳区",
459
+ },
460
+ {
461
+ date: "2024-01-02",
462
+ name: "李四",
463
+ address: "上海市浦东新区",
464
+ },
465
+ {
466
+ date: "2024-01-03",
467
+ name: "王五",
468
+ address: "广州市天河区",
469
+ },
470
+ ];
471
+
472
+ // 方法
473
+ const showSuccess = () => {
474
+ ElMessage.success("这是一条成功消息!");
475
+ };
476
+
477
+ const showWarning = () => {
478
+ ElMessage.warning("这是一条警告消息!");
479
+ };
480
+
481
+ const showError = () => {
482
+ ElMessage.error("这是一条错误消息!");
483
+ };
484
+
485
+ const handleEdit = (row) => {
486
+ ElMessage.info(`编辑:${row.name}`);
487
+ };
488
+
489
+ const handleDelete = (row) => {
490
+ ElMessageBox.confirm(`确认删除 ${row.name} 吗?`, "提示", {
491
+ confirmButtonText: "确定",
492
+ cancelButtonText: "取消",
493
+ type: "warning",
494
+ })
495
+ .then(() => {
496
+ ElMessage.success("删除成功");
497
+ })
498
+ .catch(() => {
499
+ ElMessage.info("已取消删除");
500
+ });
501
+ };
502
+ </script>
503
+
504
+ <style lang="scss" scoped>
505
+ .demo-container {
506
+ padding: 20px;
507
+
508
+ .card-header {
509
+ display: flex;
510
+ align-items: center;
511
+ justify-content: space-between;
512
+
513
+ .title {
514
+ font-size: 18px;
515
+ font-weight: 600;
516
+ color: #303133;
517
+ }
518
+ }
519
+
520
+ .el-divider {
521
+ margin: 30px 0 20px;
522
+
523
+ :deep(.el-divider__text) {
524
+ display: flex;
525
+ align-items: center;
526
+ font-size: 16px;
527
+ font-weight: 600;
528
+
529
+ .el-icon {
530
+ margin-right: 8px;
531
+ }
532
+ }
533
+ }
534
+
535
+ .code-block {
536
+ display: block;
537
+ padding: 15px;
538
+ background-color: #f5f7fa;
539
+ border-radius: 4px;
540
+ font-family: "Courier New", monospace;
541
+ font-size: 13px;
542
+ line-height: 1.6;
543
+ color: #303133;
544
+ white-space: pre-wrap;
545
+ word-wrap: break-word;
546
+ overflow-x: auto;
547
+ }
548
+
549
+ .code-block-small {
550
+ display: block;
551
+ padding: 10px;
552
+ background-color: #f5f7fa;
553
+ border-radius: 4px;
554
+ font-family: "Courier New", monospace;
555
+ font-size: 12px;
556
+ line-height: 1.5;
557
+ color: #303133;
558
+ overflow-x: auto;
559
+ }
560
+
561
+ .button-demo,
562
+ .message-demo {
563
+ display: flex;
564
+ gap: 10px;
565
+ flex-wrap: wrap;
566
+ }
567
+
568
+ .cache-test-box {
569
+ padding: 15px;
570
+ border: 1px solid #dcdfe6;
571
+ border-radius: 4px;
572
+ background-color: #fafafa;
573
+
574
+ h4 {
575
+ margin: 0 0 10px 0;
576
+ font-size: 14px;
577
+ color: #606266;
578
+ }
579
+ }
580
+
581
+ :deep(.el-alert__content) {
582
+ code {
583
+ padding: 2px 6px;
584
+ background-color: #f5f7fa;
585
+ border-radius: 3px;
586
+ color: #e6a23c;
587
+ font-family: "Courier New", monospace;
588
+ }
589
+ }
590
+ }
591
+ </style>