😎1、修复全局字典错误 2、修复分布式锁错误 3、默认翻译中英文 4、调整暗色模式样式匹配

This commit is contained in:
zuohuaijun 2025-08-16 18:47:26 +08:00
parent df1718b5e4
commit b2c56cd16e
7 changed files with 5624 additions and 8305 deletions

View File

@ -103,11 +103,14 @@ public class SysCacheService : IDynamicApiController, ISingleton
{
var key = Key(cacheName, obs);
// 使用分布式锁
using (_cacheProvider.Cache.AcquireLock($@"lock:AdGetAsync:{cacheName}", expiry != null ? (int)expiry.Value.TotalSeconds * 1000 : 1000))
using (_cacheProvider.Cache.AcquireLock($@"lock:AdGetAsync:{cacheName}", 1000))
{
var value = Get<T>(key);
value ??= await ((dynamic)del).DynamicInvokeAsync(obs);
Set(key, value);
if (value == null)
{
value = await ((dynamic)del).DynamicInvoke(obs);
_ = expiry == null ? Set(key, value) : Set(key, value, (TimeSpan)expiry);
}
return value;
}
}

View File

@ -60,8 +60,6 @@
})();
// 定义语言映射对象
const langMap = {
'zhhk': (globalThis && globalThis.lang && globalThis.lang.zhhk) ? globalThis.lang.zhhk : globalThis._getJSONKey('zh-hk', langJSON),
'zhtw': (globalThis && globalThis.lang && globalThis.lang.zhtw) ? globalThis.lang.zhtw : globalThis._getJSONKey('zh-tw', langJSON),
'en': (globalThis && globalThis.lang && globalThis.lang.en) ? globalThis.lang.en : globalThis._getJSONKey('en', langJSON),
'zhcn': (globalThis && globalThis.lang && globalThis.lang.zhcn) ? globalThis.lang.zhcn : globalThis._getJSONKey('zh-cn', langJSON)
};

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +1,13 @@
<!-- 组件使用文档 https://gitee.com/zuohuaijun/Admin.NET/pulls/1559 -->
<script lang="ts">
const renderTypeArray = ['tag', 'select', 'radio', 'checkbox', 'radio-button'] as const;
</script>
<script setup lang="ts">
import { reactive, watch, PropType } from 'vue';
import { useUserInfo } from '/@/stores/userInfo';
const renderTypeArray = ['tag', 'select', 'radio', 'checkbox', 'radio-button'] as const;
type RenderType = typeof renderTypeArray[number];
type RenderType = (typeof renderTypeArray)[number];
type DictItem = {
[key: string]: any;
tagType?: string;
@ -84,7 +87,7 @@ const props = defineProps({
*/
renderAs: {
type: String as PropType<RenderType>,
default: renderTypeArray[0],
default: 'tag',
validator(value: any) {
return renderTypeArray.includes(value);
},

View File

@ -16,6 +16,20 @@
--next-color-hover: #3c3c3c;
--next-color-hover-rgba: rgba(0, 0, 0, 0.3);
// Empty
.el-empty {
--el-empty-fill-color-0: var('(--el-color-black') !important;
--el-empty-fill-color-1: #4b4b52 !important;
--el-empty-fill-color-2: #36383d !important;
--el-empty-fill-color-3: #1e1e20 !important;
--el-empty-fill-color-4: #262629 !important;
--el-empty-fill-color-5: #202124 !important;
--el-empty-fill-color-6: #212224 !important;
--el-empty-fill-color-7: #1b1c1f !important;
--el-empty-fill-color-8: #1c1d1f !important;
--el-empty-fill-color-9: #18181a !important;
}
// root
--next-bg-main-color: var(--next-bg-main) !important;
--next-bg-topBar: var(--next-color-disabled) !important;

View File

@ -368,6 +368,11 @@
padding: 8px;
}
// 由于card没有size属性所以通过其子元素来判断,当组件大小选择为默认时
.el-card__body:has(.el-table--default) {
padding: 20px;
}
/* Table 表格 element plus 2.2.0 版本
------------------------------- */
.el-table {
@ -516,7 +521,7 @@ $--el-table-text-color: #fb6d49;
.default-theme.splitpanes--vertical > .splitpanes__splitter,
.default-theme .splitpanes--vertical > .splitpanes__splitter {
border-left: 1px solid var(--el-bg-color) !important;
border-left: 1px solid var(--el-border-color-light) !important;
}
// hack列表页

View File

@ -67,7 +67,7 @@ const viteConfig = defineConfig((mode: ConfigEnv) => {
// 源语言
originLang: 'zh-cn',
// 目标语言列表
targetLangList: ['zh-hk', 'zh-tw', 'en'],
targetLangList: ['en'], // 'zh-hk', 'zh-tw',
// 翻译文件配置生成路径
globalPath: './lang',
// 指定只翻译某些目录路径白名单默认为src