😎1、升级Furion v4.9.5.15 2、整理代码
This commit is contained in:
parent
29e085c138
commit
4a4e5d7a79
@ -17,10 +17,10 @@
|
||||
<PackageReference Include="AngleSharp" Version="1.1.2" />
|
||||
<PackageReference Include="AspectCore.Extensions.Reflection" Version="2.4.0" />
|
||||
<PackageReference Include="AspNetCoreRateLimit" Version="5.0.0" />
|
||||
<PackageReference Include="Elastic.Clients.Elasticsearch" Version="8.15.8" />
|
||||
<PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.9.5.14" />
|
||||
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.5.14" />
|
||||
<PackageReference Include="Furion.Pure" Version="4.9.5.14" />
|
||||
<PackageReference Include="Elastic.Clients.Elasticsearch" Version="8.15.9" />
|
||||
<PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.9.5.15" />
|
||||
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.5.15" />
|
||||
<PackageReference Include="Furion.Pure" Version="4.9.5.15" />
|
||||
<PackageReference Include="Hardware.Info" Version="101.0.0" />
|
||||
<PackageReference Include="Hashids.net" Version="1.7.0" />
|
||||
<PackageReference Include="IPTools.China" Version="1.6.0" />
|
||||
@ -42,7 +42,7 @@
|
||||
<PackageReference Include="SqlSugarCore" Version="5.1.4.169" />
|
||||
<PackageReference Include="SSH.NET" Version="2024.1.0" />
|
||||
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.4.5" />
|
||||
<PackageReference Include="TencentCloudSDK.Sms" Version="3.0.1102" />
|
||||
<PackageReference Include="TencentCloudSDK.Sms" Version="3.0.1104" />
|
||||
<PackageReference Include="UAParser" Version="3.1.47" />
|
||||
<PackageReference Include="Yitter.IdGenerator" Version="1.0.14" />
|
||||
</ItemGroup>
|
||||
|
||||
109
Admin.NET/Admin.NET.Core/Extension/DataTypeExtension.cs
Normal file
109
Admin.NET/Admin.NET.Core/Extension/DataTypeExtension.cs
Normal file
@ -0,0 +1,109 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core;
|
||||
|
||||
/// <summary>
|
||||
/// 基本数据类型扩展(作为NewLife.Core的Utility的补充)
|
||||
/// </summary>
|
||||
public static class DataTypeExtension
|
||||
{
|
||||
/// <summary>转为SByte整数,转换失败时返回默认值。</summary>
|
||||
/// <remarks></remarks>
|
||||
/// <param name="value">待转换对象</param>
|
||||
/// <param name="defaultValue">默认值。待转换对象无效时使用</param>
|
||||
/// <returns></returns>
|
||||
public static sbyte ToSByte(this object value, sbyte defaultValue = default)
|
||||
{
|
||||
if (value is sbyte num) return num;
|
||||
if (value == null || value == DBNull.Value) return defaultValue;
|
||||
|
||||
if (sbyte.TryParse(value.ToString(), out var result))
|
||||
return result;
|
||||
else
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
/// <summary>转为Byte整数,转换失败时返回默认值。</summary>
|
||||
/// <remarks></remarks>
|
||||
/// <param name="value">待转换对象</param>
|
||||
/// <param name="defaultValue">默认值。待转换对象无效时使用</param>
|
||||
/// <returns></returns>
|
||||
public static byte ToByte(this object value, byte defaultValue = default)
|
||||
{
|
||||
if (value is byte num) return num;
|
||||
if (value == null || value == DBNull.Value) return defaultValue;
|
||||
|
||||
if (byte.TryParse(value.ToString(), out var result))
|
||||
return result;
|
||||
else
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
/// <summary>转为Int16整数,转换失败时返回默认值。</summary>
|
||||
/// <remarks></remarks>
|
||||
/// <param name="value">待转换对象</param>
|
||||
/// <param name="defaultValue">默认值。待转换对象无效时使用</param>
|
||||
/// <returns></returns>
|
||||
public static short ToInt16(this object value, short defaultValue = default)
|
||||
{
|
||||
if (value is short num) return num;
|
||||
if (value == null || value == DBNull.Value) return defaultValue;
|
||||
|
||||
if (short.TryParse(value.ToString(), out var result))
|
||||
return result;
|
||||
else
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
/// <summary>转为UInt16整数,转换失败时返回默认值。</summary>
|
||||
/// <remarks></remarks>
|
||||
/// <param name="value">待转换对象</param>
|
||||
/// <param name="defaultValue">默认值。待转换对象无效时使用</param>
|
||||
/// <returns></returns>
|
||||
public static ushort ToUInt16(this object value, ushort defaultValue = default)
|
||||
{
|
||||
if (value is ushort num) return num;
|
||||
if (value == null || value == DBNull.Value) return defaultValue;
|
||||
|
||||
if (ushort.TryParse(value.ToString(), out var result))
|
||||
return result;
|
||||
else
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
/// <summary>转为UInt32整数,转换失败时返回默认值。</summary>
|
||||
/// <remarks></remarks>
|
||||
/// <param name="value">待转换对象</param>
|
||||
/// <param name="defaultValue">默认值。待转换对象无效时使用</param>
|
||||
/// <returns></returns>
|
||||
public static uint ToUInt32(this object value, uint defaultValue = default)
|
||||
{
|
||||
if (value is uint num) return num;
|
||||
if (value == null || value == DBNull.Value) return defaultValue;
|
||||
|
||||
if (uint.TryParse(value.ToString(), out var result))
|
||||
return result;
|
||||
else
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
/// <summary>转为UInt64整数,转换失败时返回默认值。</summary>
|
||||
/// <remarks></remarks>
|
||||
/// <param name="value">待转换对象</param>
|
||||
/// <param name="defaultValue">默认值。待转换对象无效时使用</param>
|
||||
/// <returns></returns>
|
||||
public static ulong ToUInt64(this object value, ulong defaultValue = default)
|
||||
{
|
||||
if (value is ulong num) return num;
|
||||
if (value == null || value == DBNull.Value) return defaultValue;
|
||||
|
||||
if (ulong.TryParse(value.ToString(), out var result))
|
||||
return result;
|
||||
else
|
||||
return defaultValue;
|
||||
}
|
||||
}
|
||||
@ -105,8 +105,7 @@ public class Startup : AppStartup
|
||||
.AddInjectWithUnifyResult<AdminResultProvider>()
|
||||
.AddJsonOptions(options =>
|
||||
{
|
||||
// 解决中文乱码,返回数据被转为Unicode字符串的问题
|
||||
options.JsonSerializerOptions.Encoder = JavaScriptEncoder.Create(UnicodeRanges.All);
|
||||
options.JsonSerializerOptions.Encoder = JavaScriptEncoder.Create(UnicodeRanges.All); // 禁止Unicode转码
|
||||
});
|
||||
|
||||
// 三方授权登录OAuth
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"name": "admin.net.pro",
|
||||
"type": "module",
|
||||
"version": "2.4.33",
|
||||
"lastBuildTime": "2024.10.10",
|
||||
"lastBuildTime": "2024.10.13",
|
||||
"description": "Admin.NET 站在巨人肩膀上的 .NET 通用权限开发框架",
|
||||
"author": "zuohuaijun",
|
||||
"license": "MIT",
|
||||
@ -20,7 +20,7 @@
|
||||
"@microsoft/signalr": "^8.0.7",
|
||||
"@vue-office/docx": "^1.6.2",
|
||||
"@vue-office/excel": "^1.7.11",
|
||||
"@vue-office/pdf": "^2.0.2",
|
||||
"@vue-office/pdf": "^2.0.6",
|
||||
"@vueuse/core": "^11.1.0",
|
||||
"@wangeditor/editor": "^5.1.23",
|
||||
"@wangeditor/editor-for-vue": "^5.1.12",
|
||||
@ -32,7 +32,7 @@
|
||||
"echarts": "^5.5.1",
|
||||
"echarts-gl": "^2.0.9",
|
||||
"echarts-wordcloud": "^2.1.0",
|
||||
"element-plus": "^2.8.4",
|
||||
"element-plus": "^2.8.5",
|
||||
"exceljs": "^4.4.0",
|
||||
"ezuikit-js": "^8.0.12-alpha.3",
|
||||
"gcoord": "^1.0.6",
|
||||
@ -41,7 +41,7 @@
|
||||
"jsplumb": "^2.15.6",
|
||||
"jwchat": "^2.0.3",
|
||||
"lodash-es": "^4.17.21",
|
||||
"md-editor-v3": "^4.20.4",
|
||||
"md-editor-v3": "^4.21.0",
|
||||
"mitt": "^3.0.1",
|
||||
"monaco-editor": "^0.52.0",
|
||||
"mqtt": "^5.10.1",
|
||||
@ -54,12 +54,12 @@
|
||||
"qs": "^6.13.0",
|
||||
"relation-graph": "^2.2.7",
|
||||
"screenfull": "^6.0.2",
|
||||
"sm-crypto-v2": "^1.9.2",
|
||||
"sm-crypto-v2": "^1.9.3",
|
||||
"sortablejs": "^1.15.3",
|
||||
"splitpanes": "^3.1.5",
|
||||
"vcrontab-3": "^3.3.22",
|
||||
"vform3-builds": "^3.0.10",
|
||||
"vue": "^3.5.11",
|
||||
"vue": "^3.5.12",
|
||||
"vue-clipboard3": "^2.0.0",
|
||||
"vue-demi": "0.14.6",
|
||||
"vue-draggable-plus": "^0.5.3",
|
||||
@ -88,15 +88,15 @@
|
||||
"@typescript-eslint/parser": "^8.8.1",
|
||||
"@vitejs/plugin-vue": "^5.1.4",
|
||||
"@vitejs/plugin-vue-jsx": "^4.0.1",
|
||||
"@vue/compiler-sfc": "^3.5.11",
|
||||
"code-inspector-plugin": "^0.16.1",
|
||||
"@vue/compiler-sfc": "^3.5.12",
|
||||
"code-inspector-plugin": "^0.17.0",
|
||||
"eslint": "^9.12.0",
|
||||
"eslint-plugin-vue": "^9.28.0",
|
||||
"eslint-plugin-vue": "^9.29.0",
|
||||
"globals": "^15.11.0",
|
||||
"less": "^4.2.0",
|
||||
"prettier": "^3.3.3",
|
||||
"rollup-plugin-visualizer": "^5.12.0",
|
||||
"sass": "^1.79.4",
|
||||
"sass": "^1.79.5",
|
||||
"terser": "^5.34.1",
|
||||
"typescript": "^5.6.3",
|
||||
"vite": "^5.4.8",
|
||||
|
||||
@ -2,8 +2,7 @@
|
||||
<el-dialog v-model="state.dialogVisible" draggable :close-on-click-modal="false" :width="Number(state.width) + Number(8) + 'mm'">
|
||||
<template #header>
|
||||
<div style="color: #fff">
|
||||
<el-icon size="16" style="margin-right: 3px; display: inline; vertical-align: middle"> <ele-Printer />
|
||||
</el-icon>
|
||||
<el-icon size="16" style="margin-right: 3px; display: inline; vertical-align: middle"> <ele-Printer /> </el-icon>
|
||||
<span>{{ props.title }}</span>
|
||||
</div>
|
||||
</template>
|
||||
@ -19,11 +18,10 @@
|
||||
<script lang="ts" setup>
|
||||
import { nextTick, reactive, ref } from 'vue';
|
||||
|
||||
//父级传递来的参数
|
||||
var props = defineProps({
|
||||
title: {
|
||||
type: String,
|
||||
default: "",
|
||||
default: '',
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user