mirror of
https://github.com/certd/certd.git
synced 2026-05-15 12:37:30 +08:00
🔱: [client] sync upgrade with 5 commits [trident-sync]
build: publish success perf: antdv 异步加载,加快首页打开速度 perf: 精简lodash chore: 兼容手机版
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import _ from "lodash-es";
|
||||
import { isArray } from "lodash-es";
|
||||
export default {
|
||||
arrayToMap(array: any) {
|
||||
if (!array) {
|
||||
return {};
|
||||
}
|
||||
if (!_.isArray(array)) {
|
||||
if (!isArray(array)) {
|
||||
return array;
|
||||
}
|
||||
const map: any = {};
|
||||
@@ -19,7 +19,7 @@ export default {
|
||||
if (!map) {
|
||||
return [];
|
||||
}
|
||||
if (_.isArray(map)) {
|
||||
if (isArray(map)) {
|
||||
return map;
|
||||
}
|
||||
const array: any = [];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import _ from "lodash-es";
|
||||
import {forEach} from "lodash-es";
|
||||
export function getEnvValue(key: string) {
|
||||
// @ts-ignore
|
||||
return import.meta.env["VITE_APP_" + key];
|
||||
@@ -19,7 +19,7 @@ export class EnvConfig {
|
||||
|
||||
init() {
|
||||
// @ts-ignore
|
||||
_.forEach(import.meta.env, (value, key) => {
|
||||
forEach(import.meta.env, (value, key) => {
|
||||
if (key.startsWith("VITE_APP")) {
|
||||
key = key.replace("VITE_APP_", "");
|
||||
// @ts-ignore
|
||||
|
||||
Reference in New Issue
Block a user