diff --git a/src/backend/NetAdmin.Domain/Events/SeedDataInsertedEvent.cs b/src/backend/NetAdmin.Domain/Events/SeedDataInsertedEvent.cs
index 9279fcc9..fe9ea3e2 100644
--- a/src/backend/NetAdmin.Domain/Events/SeedDataInsertedEvent.cs
+++ b/src/backend/NetAdmin.Domain/Events/SeedDataInsertedEvent.cs
@@ -8,15 +8,14 @@ public sealed record SeedDataInsertedEvent : DataAbstraction, IEventSource
///
/// Initializes a new instance of the class.
///
- public SeedDataInsertedEvent(int insertedCount)
+ public SeedDataInsertedEvent(int insertedCount, bool isConsumOnce = false)
{
+ IsConsumOnce = isConsumOnce;
InsertedCount = insertedCount;
+ CreatedTime = DateTime.Now;
EventId = nameof(SeedDataInsertedEvent);
}
- ///
- public CancellationToken CancellationToken { get; }
-
///
public DateTime CreatedTime { get; }
@@ -27,10 +26,13 @@ public sealed record SeedDataInsertedEvent : DataAbstraction, IEventSource
public bool IsConsumOnce { get; }
///
- public object Payload { get; }
+ public CancellationToken CancellationToken { get; init; }
///
/// 插入数量
///
public int InsertedCount { get; set; }
+
+ ///
+ public object Payload { get; init; }
}
\ No newline at end of file
diff --git a/src/backend/NetAdmin.Host/Controllers/Tpl/ExampleController.cs b/src/backend/NetAdmin.Host/Controllers/Tpl/ExampleController.cs
index 15606d46..29698b7b 100644
--- a/src/backend/NetAdmin.Host/Controllers/Tpl/ExampleController.cs
+++ b/src/backend/NetAdmin.Host/Controllers/Tpl/ExampleController.cs
@@ -52,6 +52,7 @@ public sealed class ExampleController(IExampleCache cache) : ControllerBase
/// 示例是否存在
///
+ [NonAction]
public Task ExistAsync(QueryReq req)
{
return Cache.ExistAsync(req);
@@ -60,6 +61,7 @@ public sealed class ExampleController(IExampleCache cache) : ControllerBase
/// 导出示例
///
+ [NonAction]
public Task ExportAsync(QueryReq req)
{
return Cache.ExportAsync(req);
@@ -84,6 +86,7 @@ public sealed class ExampleController(IExampleCache cache) : ControllerBase
/// 查询示例
///
+ [NonAction]
public Task> QueryAsync(QueryReq req)
{
return Cache.QueryAsync(req);
diff --git a/src/backend/NetAdmin.Tests/NetAdmin.Tests.csproj b/src/backend/NetAdmin.Tests/NetAdmin.Tests.csproj
index 42b17220..c9bab2c2 100644
--- a/src/backend/NetAdmin.Tests/NetAdmin.Tests.csproj
+++ b/src/backend/NetAdmin.Tests/NetAdmin.Tests.csproj
@@ -5,7 +5,7 @@
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
diff --git a/src/frontend/admin/src/api/tpl/example.js b/src/frontend/admin/src/api/tpl/example.js
index 59db0e9d..384888a9 100644
--- a/src/frontend/admin/src/api/tpl/example.js
+++ b/src/frontend/admin/src/api/tpl/example.js
@@ -49,28 +49,6 @@ export default {
},
},
- /**
- * 示例是否存在
- */
- exist: {
- url: `${config.API_URL}/api/tpl/example/exist`,
- name: `示例是否存在`,
- post: async function (data = {}, config = {}) {
- return await http.post(this.url, data, config)
- },
- },
-
- /**
- * 导出示例
- */
- export: {
- url: `${config.API_URL}/api/tpl/example/export`,
- name: `导出示例`,
- post: async function (data = {}, config = {}) {
- return await http.post(this.url, data, config)
- },
- },
-
/**
* 获取单个示例
*/
@@ -92,15 +70,4 @@ export default {
return await http.post(this.url, data, config)
},
},
-
- /**
- * 查询示例
- */
- query: {
- url: `${config.API_URL}/api/tpl/example/query`,
- name: `查询示例`,
- post: async function (data = {}, config = {}) {
- return await http.post(this.url, data, config)
- },
- },
}
\ No newline at end of file
diff --git a/src/frontend/admin/src/components/naVersionUpdater/index.vue b/src/frontend/admin/src/components/naVersionUpdater/index.vue
index b6ccc7af..1832c0b2 100644
--- a/src/frontend/admin/src/components/naVersionUpdater/index.vue
+++ b/src/frontend/admin/src/components/naVersionUpdater/index.vue
@@ -43,7 +43,7 @@ export default {
const contents = []
const msg = h('p', { style: 'width:230px;display:flex;justify-content:space-between' }, [
h('span', {}, this.$t('即将开始更新……')),
- h('a', { style: 'color:#21A675', href: 'javascript:window.location.reload()' }, this.$t('立即更新')),
+ h('a', { style: 'color:var(--el-color-primary)', href: 'javascript:window.location.reload()' }, this.$t('立即更新')),
])
const task = h('p', { style: 'font-weight:bold' }, version)
const progress = h(
@@ -55,7 +55,7 @@ export default {
style: {
width: '230px',
height: '6px',
- 'background-color': '#21A675',
+ 'background-color': 'var(--el-color-primary)',
'margin-top': '6px',
'border-radius': '6px',
},
diff --git a/src/frontend/admin/src/components/scEcharts/echarts-theme-T.js b/src/frontend/admin/src/components/scEcharts/echarts-theme-T.js
index b6c17058..d93272a9 100644
--- a/src/frontend/admin/src/components/scEcharts/echarts-theme-T.js
+++ b/src/frontend/admin/src/components/scEcharts/echarts-theme-T.js
@@ -1,5 +1,7 @@
+import DEFAULT_CONFIG from '@/config'
+
const T = {
- color: ['#21A675', '#36CE9E', '#f56e6a', '#626c91', '#edb00d', '#909399'],
+ color: [DEFAULT_CONFIG.APP_SET_COLOR, '#36CE9E', '#f56e6a', '#626c91', '#edb00d', '#909399'],
grid: {
left: '3%',
right: '3%',
diff --git a/src/frontend/admin/src/components/scFileSelect/index.vue b/src/frontend/admin/src/components/scFileSelect/index.vue
index 40fe40d7..316ee053 100644
--- a/src/frontend/admin/src/components/scFileSelect/index.vue
+++ b/src/frontend/admin/src/components/scFileSelect/index.vue
@@ -440,7 +440,7 @@ export default {
}
.sc-file-select__item__file .item-file.item-file-doc {
- color: #21a675;
+ color: var(--el-color-primary);
}
.sc-file-select__item__upload {
diff --git a/src/frontend/admin/src/components/scFilterBar/my.vue b/src/frontend/admin/src/components/scFilterBar/my.vue
index 4ed870c1..6ec420de 100644
--- a/src/frontend/admin/src/components/scFilterBar/my.vue
+++ b/src/frontend/admin/src/components/scFilterBar/my.vue
@@ -125,7 +125,7 @@ export default {
.sc-filter-my-list li:hover {
background: #ecf5ff;
- color: #21a675;
+ color: var(--el-color-primary);
}
.sc-filter-my-list li label {
diff --git a/src/frontend/admin/src/components/scPageHeader/index.vue b/src/frontend/admin/src/components/scPageHeader/index.vue
index 103ec7c7..dac90b83 100644
--- a/src/frontend/admin/src/components/scPageHeader/index.vue
+++ b/src/frontend/admin/src/components/scPageHeader/index.vue
@@ -53,7 +53,7 @@ export default {
.sc-page-header__icon span {
width: 2.5rem;
height: 2.5rem;
- background: #21a675;
+ background: var(--el-color-primary);
border-radius: 40%;
display: flex;
align-items: center;
diff --git a/src/frontend/admin/src/config/appConfig.js b/src/frontend/admin/src/config/appConfig.js
index 11110ce2..c8edeb76 100644
--- a/src/frontend/admin/src/config/appConfig.js
+++ b/src/frontend/admin/src/config/appConfig.js
@@ -3,7 +3,7 @@
export default {
//标题
- //APP_NAME: "NetAdmin",
+ //APP_NAME: "标题",
//接口地址,如遇跨域需使用nginx代理
- //API_URL: "https://www.fastmock.site/mock/5039c4361c39a7e3252c5b55971f1bd3/api"
+ //API_URL: import.meta.env.VITE_API_URL,
}
\ No newline at end of file
diff --git a/src/frontend/admin/src/config/fileSelect.js b/src/frontend/admin/src/config/fileSelect.js
index 9dad00e8..dd41f474 100644
--- a/src/frontend/admin/src/config/fileSelect.js
+++ b/src/frontend/admin/src/config/fileSelect.js
@@ -1,4 +1,5 @@
import API from '@/api'
+import DEFAULT_CONFIG from '@/config/index'
//文件选择器配置
@@ -43,11 +44,11 @@ export default {
files: {
doc: {
icon: 'sc-icon-file-word-2-fill',
- color: '#21A675',
+ color: DEFAULT_CONFIG.APP_SET_COLOR,
},
docx: {
icon: 'sc-icon-file-word-2-fill',
- color: '#21A675',
+ color: DEFAULT_CONFIG.APP_SET_COLOR,
},
xls: {
icon: 'sc-icon-file-excel-2-fill',
diff --git a/src/frontend/admin/src/config/myConfig.js b/src/frontend/admin/src/config/myConfig.js
index 44ae227a..a0155a31 100644
--- a/src/frontend/admin/src/config/myConfig.js
+++ b/src/frontend/admin/src/config/myConfig.js
@@ -1,7 +1,7 @@
//业务配置
//会合并至this.$CONFIG
//生产模式 public/config.js 同名key会覆盖这里的配置从而实现打包后的热更新
-//为避免和NetAdmin框架配置混淆建议添加前缀 MY_
+//为避免和框架配置混淆建议添加前缀 MY_
//全局可使用 this.$CONFIG.MY_KEY 访问
export default {
diff --git a/src/frontend/admin/src/layout/components/sideM.vue b/src/frontend/admin/src/layout/components/sideM.vue
index 43e7b538..5b902e5d 100644
--- a/src/frontend/admin/src/layout/components/sideM.vue
+++ b/src/frontend/admin/src/layout/components/sideM.vue
@@ -15,9 +15,9 @@
@@ -31,6 +31,7 @@