From 72f4c591ceeed13939c964ecbbae36bb9f008c1d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=A5=9E=E4=BB=99?= <615206459@qq.com>
Date: Fri, 3 Jan 2025 00:32:57 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/cool/types/index.ts | 1 +
src/modules/helper/static/index.scss | 7 +++++++
src/modules/helper/views/plugins/serve.vue | 13 +++++--------
src/modules/helper/views/plugins/vue.vue | 20 +++++++++++++++-----
src/plugins/crud/config.ts | 1 +
src/plugins/echarts/config.ts | 2 +-
src/plugins/editor-monaco/config.ts | 2 +-
src/plugins/editor-wang/config.ts | 6 +++---
src/plugins/element-ui/config.ts | 2 +-
9 files changed, 35 insertions(+), 19 deletions(-)
diff --git a/src/cool/types/index.ts b/src/cool/types/index.ts
index be09fba..8f53d39 100644
--- a/src/cool/types/index.ts
+++ b/src/cool/types/index.ts
@@ -13,6 +13,7 @@ export declare interface ModuleConfig {
author?: string;
updateTime?: string;
demo?: { name: string; component: Component }[] | string;
+ doc?: string;
options?: {
[key: string]: any;
};
diff --git a/src/modules/helper/static/index.scss b/src/modules/helper/static/index.scss
index a088705..6854262 100644
--- a/src/modules/helper/static/index.scss
+++ b/src/modules/helper/static/index.scss
@@ -45,6 +45,8 @@
flex: 1;
.tag {
+ display: flex;
+ flex-wrap: wrap;
margin-bottom: 10px;
.el-tag {
@@ -89,6 +91,11 @@
justify-content: space-between;
padding: 10px;
height: 30px;
+
+ .el-button {
+ font-size: 12px;
+ height: 28px;
+ }
}
&.is-add {
diff --git a/src/modules/helper/views/plugins/serve.vue b/src/modules/helper/views/plugins/serve.vue
index f189335..578d024 100644
--- a/src/modules/helper/views/plugins/serve.vue
+++ b/src/modules/helper/views/plugins/serve.vue
@@ -47,17 +47,14 @@
- 详情
- 卸载
+
-
+ 卸载
+ 详情
diff --git a/src/modules/helper/views/plugins/vue.vue b/src/modules/helper/views/plugins/vue.vue
index aa8d4e6..0e8cb86 100644
--- a/src/modules/helper/views/plugins/vue.vue
+++ b/src/modules/helper/views/plugins/vue.vue
@@ -44,13 +44,18 @@
-
+
示例
+
+
+ 文档
+
@@ -63,6 +68,7 @@
:key="index"
:label="item.name"
:name="index"
+ :lazy="index != 0"
>
@@ -140,6 +146,10 @@ const det = reactive({
})
);
}
+ },
+
+ openDoc(url: string) {
+ window.open(url);
}
});
diff --git a/src/plugins/crud/config.ts b/src/plugins/crud/config.ts
index 60c7861..a6de4f3 100644
--- a/src/plugins/crud/config.ts
+++ b/src/plugins/crud/config.ts
@@ -17,6 +17,7 @@ export default (): Merge => {
version: '1.1.2',
updateTime: '2024-12-31',
demo: '/demo/crud',
+ doc: 'https://vue.cool-admin.com/src/guide/plugins/crud.html',
// 组件全注册
components: Object.values(import.meta.glob('./components/**/*.{vue,tsx}')),
diff --git a/src/plugins/echarts/config.ts b/src/plugins/echarts/config.ts
index 7664812..58489f7 100644
--- a/src/plugins/echarts/config.ts
+++ b/src/plugins/echarts/config.ts
@@ -9,7 +9,7 @@ export default (): ModuleConfig => {
author: 'COOL',
version: '1.0.0',
updateTime: '2024-07-22',
- demo: 'https://echarts.apache.org/examples/zh/index.html',
+ doc: 'https://echarts.apache.org/examples/zh/index.html',
install(app) {
app.component('v-chart', VueECharts);
}
diff --git a/src/plugins/editor-monaco/config.ts b/src/plugins/editor-monaco/config.ts
index 564b00c..6148ad9 100644
--- a/src/plugins/editor-monaco/config.ts
+++ b/src/plugins/editor-monaco/config.ts
@@ -13,10 +13,10 @@ export default (): ModuleConfig => {
component: () => import('./demo/base.vue')
}
],
+ doc: 'https://www.npmjs.com/package/monaco-editor',
components: [
// 依赖偏大,现用于“ai编码页面”,如不需要请注释组件
- // 代码编辑器 https://www.npmjs.com/package/monaco-editor
() => import('./components/monaco.vue')
]
};
diff --git a/src/plugins/editor-wang/config.ts b/src/plugins/editor-wang/config.ts
index e284209..ef9e16a 100644
--- a/src/plugins/editor-wang/config.ts
+++ b/src/plugins/editor-wang/config.ts
@@ -2,8 +2,8 @@ import type { ModuleConfig } from '/@/cool';
export default (): ModuleConfig => {
return {
- label: '富文本编辑器',
- description: '基于 wangEditor 封装的富文本编辑器', // https://www.wangeditor.com
+ label: 'Wang 编辑器',
+ description: '基于 wangEditor 封装的富文本编辑器',
author: 'COOL',
version: '1.0.0',
updateTime: '2024-02-01',
@@ -13,7 +13,7 @@ export default (): ModuleConfig => {
component: () => import('./demo/base.vue')
}
],
-
+ doc: 'https://www.wangeditor.com',
components: [() => import('./components/wang.vue')]
};
};
diff --git a/src/plugins/element-ui/config.ts b/src/plugins/element-ui/config.ts
index 2d2e8f8..0e44319 100644
--- a/src/plugins/element-ui/config.ts
+++ b/src/plugins/element-ui/config.ts
@@ -10,7 +10,7 @@ export default (): ModuleConfig => {
author: 'COOL',
version: '1.0.0',
updateTime: '2024-07-22',
- demo: 'https://element-plus.org/zh-CN/component/overview.html',
+ doc: 'https://element-plus.org/zh-CN/component/overview.html',
install(app) {
app.use(ElementPlus);
}