@go-wind/admin-vben 0.1.1 → 0.1.3
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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@go-wind/admin-vben",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Vben 5 derived admin shell framework (Vue 3 + Ant Design Vue + tailwind), deep-customized and version-pinned by go-wind-admin. Consumed as a SOURCE package: hosts resolve subpaths into src/ via their own tsconfig paths / bundler, keeping full component types without a build step.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"peerDependencies": {
|
|
19
19
|
"@iconify/vue": ">=4.0.0",
|
|
20
20
|
"@tanstack/vue-query": ">=5.0.0",
|
|
21
|
+
"@tanstack/vue-store": ">=0.6.0",
|
|
21
22
|
"ant-design-vue": ">=4.2.0",
|
|
22
23
|
"pinia": ">=2.2.0",
|
|
23
24
|
"pinia-plugin-persistedstate": ">=4.0.0",
|
|
@@ -26,16 +27,40 @@
|
|
|
26
27
|
"vue-router": ">=4.4.0"
|
|
27
28
|
},
|
|
28
29
|
"dependencies": {
|
|
29
|
-
"@
|
|
30
|
+
"@ctrl/tinycolor": "^4.1.0",
|
|
30
31
|
"@intlify/core-base": "^10.0.0",
|
|
32
|
+
"@tanstack/vue-store": "0.6.0",
|
|
33
|
+
"@vee-validate/zod": "^4.15.0",
|
|
31
34
|
"@vueuse/core": "^11.3.0",
|
|
32
|
-
"
|
|
35
|
+
"@vueuse/integrations": "^11.3.0",
|
|
36
|
+
"class-variance-authority": "^0.7.1",
|
|
37
|
+
"clsx": "^2.1.1",
|
|
38
|
+
"dayjs": "^1.11.13",
|
|
39
|
+
"defu": "6.1.4",
|
|
40
|
+
"json-bigint": "^1.0.0",
|
|
41
|
+
"lodash.clonedeep": "^4.5.0",
|
|
42
|
+
"lodash.get": "^4.4.2",
|
|
43
|
+
"lodash.isequal": "^4.5.0",
|
|
44
|
+
"lucide-vue-next": "^0.507.0",
|
|
45
|
+
"nprogress": "^0.2.0",
|
|
33
46
|
"radix-vue": "^1.9.0",
|
|
47
|
+
"sortablejs": "^1.15.6",
|
|
48
|
+
"tailwind-merge": "^2.5.5",
|
|
49
|
+
"theme-colors": "^0.1.0",
|
|
34
50
|
"vee-validate": "^4.13.0",
|
|
51
|
+
"vue-json-viewer": "^3.0.4",
|
|
52
|
+
"watermark-js-plus": "^1.5.7",
|
|
35
53
|
"zod": "^3.23.0"
|
|
36
54
|
},
|
|
37
55
|
"publishConfig": {
|
|
38
56
|
"access": "public",
|
|
39
57
|
"registry": "https://registry.npmjs.org/"
|
|
58
|
+
},
|
|
59
|
+
"devDependencies": {
|
|
60
|
+
"vue": "3.5.13",
|
|
61
|
+
"vue-router": "5.4.0",
|
|
62
|
+
"pinia": "2.2.2",
|
|
63
|
+
"@vueuse/core": "11.3.0",
|
|
64
|
+
"@tanstack/vue-query": "5.105.0"
|
|
40
65
|
}
|
|
41
66
|
}
|
|
@@ -16,8 +16,19 @@ import VueJsonViewer from 'vue-json-viewer';
|
|
|
16
16
|
import { $t } from '../../../../locales';
|
|
17
17
|
import { isBoolean } from '../../../../base/shared/utils';
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
/**
|
|
20
|
+
* 大数安全解析:把 JSON 里 16 位以上的裸数字加引号后交给 JSON.parse
|
|
21
|
+
* 后其 import 无法被预构建重写,浏览器直取 raw 会因缺 default 导出而崩。
|
|
22
|
+
* 预处理只匹配「: 或 , 或 [ 之后紧跟的裸数字字面量」,不会误伤字符串内容
|
|
23
|
+
* 中带引号的同名片段(那些片段前一个字符是引号,不满足负向断言会被跳过)。
|
|
24
|
+
*/
|
|
25
|
+
function parseWithBigintAsString(text: string): Record<string, any> {
|
|
26
|
+
const safe = text.replace(/([{,]\s*)"?(true|false)"?/g, '$1$2').replace(
|
|
27
|
+
/(:\s*|\[\s*)(-?\d{15,}(?:\.\d+)?)(\s*[,\]}])/g,
|
|
28
|
+
'$1"$2"$3',
|
|
29
|
+
);
|
|
30
|
+
return JSON.parse(safe);
|
|
31
|
+
}
|
|
21
32
|
|
|
22
33
|
defineOptions({ name: 'JsonViewer' });
|
|
23
34
|
|
|
@@ -76,7 +87,7 @@ const jsonData = computed<Record<string, any>>(() => {
|
|
|
76
87
|
}
|
|
77
88
|
|
|
78
89
|
try {
|
|
79
|
-
return
|
|
90
|
+
return parseWithBigintAsString(props.value);
|
|
80
91
|
} catch (error) {
|
|
81
92
|
console.error('JSON parse error:', error);
|
|
82
93
|
return {};
|
package/src/locales/i18n.ts
CHANGED
|
@@ -19,7 +19,28 @@ const i18n = createI18n({
|
|
|
19
19
|
messages: {},
|
|
20
20
|
});
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
// 语言包静态枚举:源码形态包位于 node_modules 内,vite 的 import.meta.glob 插件
|
|
23
|
+
// 不展开 node_modules 路径下的文件(localesMap 会得到空集、框架文案全 raw),
|
|
24
|
+
// 故以静态 import 等价替换 glob(loadLocalesMapFromDir 只要求「路径键 → 懒加载」形状)。
|
|
25
|
+
import authenticationEn from './langs/en-US/authentication.json';
|
|
26
|
+
import authenticationZh from './langs/zh-CN/authentication.json';
|
|
27
|
+
import commonEn from './langs/en-US/common.json';
|
|
28
|
+
import commonZh from './langs/zh-CN/common.json';
|
|
29
|
+
import preferencesEn from './langs/en-US/preferences.json';
|
|
30
|
+
import preferencesZh from './langs/zh-CN/preferences.json';
|
|
31
|
+
import uiEn from './langs/en-US/ui.json';
|
|
32
|
+
import uiZh from './langs/zh-CN/ui.json';
|
|
33
|
+
|
|
34
|
+
const modules: Record<string, () => Promise<{ default: unknown }>> = {
|
|
35
|
+
'./langs/en-US/authentication.json': async () => ({ default: authenticationEn }),
|
|
36
|
+
'./langs/zh-CN/authentication.json': async () => ({ default: authenticationZh }),
|
|
37
|
+
'./langs/en-US/common.json': async () => ({ default: commonEn }),
|
|
38
|
+
'./langs/zh-CN/common.json': async () => ({ default: commonZh }),
|
|
39
|
+
'./langs/en-US/preferences.json': async () => ({ default: preferencesEn }),
|
|
40
|
+
'./langs/zh-CN/preferences.json': async () => ({ default: preferencesZh }),
|
|
41
|
+
'./langs/en-US/ui.json': async () => ({ default: uiEn }),
|
|
42
|
+
'./langs/zh-CN/ui.json': async () => ({ default: uiZh }),
|
|
43
|
+
};
|
|
23
44
|
|
|
24
45
|
const { setSimpleLocale } = useSimpleLocale();
|
|
25
46
|
|