mirror of
https://github.com/jeecgboot/JeecgBoot.git
synced 2025-12-26 16:26:41 +08:00
【同步3.7.4版本代码】新增全局布局隐藏配置,优化多个组件的属性和逻辑
This commit is contained in:
@ -36,6 +36,8 @@ export function getAppEnvConfig() {
|
||||
VITE_GLOB_APP_CAS_BASE_URL,
|
||||
VITE_GLOB_DOMAIN_URL,
|
||||
VITE_GLOB_ONLINE_VIEW_URL,
|
||||
// 全局隐藏哪些布局,多个用逗号隔开
|
||||
VITE_GLOB_HIDE_LAYOUT_TYPES,
|
||||
|
||||
// 【JEECG作为乾坤子应用】
|
||||
VITE_GLOB_QIANKUN_MICRO_APP_NAME,
|
||||
@ -59,6 +61,7 @@ export function getAppEnvConfig() {
|
||||
VITE_GLOB_APP_CAS_BASE_URL,
|
||||
VITE_GLOB_DOMAIN_URL,
|
||||
VITE_GLOB_ONLINE_VIEW_URL,
|
||||
VITE_GLOB_HIDE_LAYOUT_TYPES,
|
||||
|
||||
// 【JEECG作为乾坤子应用】
|
||||
VITE_GLOB_QIANKUN_MICRO_APP_NAME,
|
||||
@ -102,3 +105,11 @@ export function isDevMode(): boolean {
|
||||
export function isProdMode(): boolean {
|
||||
return import.meta.env.PROD;
|
||||
}
|
||||
|
||||
export function getHideLayoutTypes(): string[] {
|
||||
const {VITE_GLOB_HIDE_LAYOUT_TYPES} = getAppEnvConfig();
|
||||
if (typeof VITE_GLOB_HIDE_LAYOUT_TYPES !== 'string') {
|
||||
return [];
|
||||
}
|
||||
return VITE_GLOB_HIDE_LAYOUT_TYPES.split(',');
|
||||
}
|
||||
|
||||
@ -3,7 +3,7 @@ import type { App, Plugin } from 'vue';
|
||||
import type { FormSchema } from "@/components/Form";
|
||||
|
||||
import { unref } from 'vue';
|
||||
import { isObject, isFunction } from '/@/utils/is';
|
||||
import { isObject, isFunction, isString } from '/@/utils/is';
|
||||
import Big from 'big.js';
|
||||
// update-begin--author:sunjianlei---date:20220408---for: 【VUEN-656】配置外部网址打不开,原因是带了#号,需要替换一下
|
||||
export const URL_HASH_TAB = `__AGWE4H__HASH__TAG__PWHRG__`;
|
||||
@ -596,3 +596,39 @@ export const getUrlParams = (url) => {
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
/* 20250325
|
||||
* liaozhiyang
|
||||
* 分割url字符成数组
|
||||
* 【issues/7990】图片参数中包含逗号会错误的识别成多张图
|
||||
* */
|
||||
export const split = (str) => {
|
||||
if (isString(str)) {
|
||||
const text = str.trim();
|
||||
if (text.startsWith('http')) {
|
||||
const parts = str.split(',');
|
||||
const urls: any = [];
|
||||
let currentUrl = '';
|
||||
for (const part of parts) {
|
||||
if (part.startsWith('http://') || part.startsWith('https://')) {
|
||||
// 如果遇到新的URL开头,保存当前URL并开始新的URL
|
||||
if (currentUrl) {
|
||||
urls.push(currentUrl);
|
||||
}
|
||||
currentUrl = part;
|
||||
} else {
|
||||
// 否则,是当前URL的一部分(如参数)
|
||||
currentUrl += ',' + part;
|
||||
}
|
||||
}
|
||||
// 添加最后一个URL
|
||||
if (currentUrl) {
|
||||
urls.push(currentUrl);
|
||||
}
|
||||
return urls;
|
||||
} else {
|
||||
return str.split(',');
|
||||
}
|
||||
}
|
||||
return str;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user