提交
This commit is contained in:
1 parent
22be6d8b36
commit
ec4b9438b4
79 files changed
+12607
-8922
No files matched your search
@@ -1,5 +1,8 @@
|
||||
/** OA 审批应用默认图标(public/oa-app-icons,新建弹窗打开时随机预填) */
|
||||
/** OA 审批应用默认图标(public/oa-app-icons,中间 icon 固定,底色随机) */
|
||||
|
||||
export const OA_APP_DEFAULT_ICON_URL = '/oa-app-icons/doc-orange.svg'
|
||||
|
||||
/** 同形中间 icon、不同底色 */
|
||||
export const OA_APP_DEFAULT_ICON_URLS: readonly string[] = [
|
||||
'/oa-app-icons/doc-orange.svg',
|
||||
'/oa-app-icons/leave-mint.svg',
|
||||
@@ -13,7 +16,12 @@ export const OA_APP_DEFAULT_ICON_URLS: readonly string[] = [
|
||||
|
||||
const minioBaseUrl = String(import.meta.env.VITE_MINIO_BASE_URL || '').replace(/\/$/, '')
|
||||
|
||||
/** 打开「新增」弹窗时调用:随机一个默认图标 URL */
|
||||
/** 固定默认底色图标(兜底) */
|
||||
export function getDefaultOaAppIconUrl(): string {
|
||||
return OA_APP_DEFAULT_ICON_URL
|
||||
}
|
||||
|
||||
/** 打开「新增」弹窗时调用:随机一种底色(中间 icon 相同) */
|
||||
export function pickRandomOaAppIconUrl(): string {
|
||||
const list = OA_APP_DEFAULT_ICON_URLS
|
||||
const idx = Math.floor(Math.random() * list.length)
|
||||
@@ -28,7 +36,7 @@ export function pickRandomOaAppIconUrl(): string {
|
||||
*/
|
||||
export function resolveOaAppIconUrl(iconUrl?: string | null): string {
|
||||
const u = (iconUrl || '').trim()
|
||||
if (!u) return OA_APP_DEFAULT_ICON_URLS[0]
|
||||
if (!u) return OA_APP_DEFAULT_ICON_URL
|
||||
if (/^https?:\/\//i.test(u)) return u
|
||||
// public 静态资源或其它站内绝对路径,勿拼 MinIO
|
||||
if (u.startsWith('/')) return u
|
||||
|
||||
@@ -29,7 +29,8 @@
|
||||
* @module utils/storage/storage-key-manager
|
||||
* @author Art Design Pro Team
|
||||
*/
|
||||
import { StorageConfig } from '@/utils/storage'
|
||||
/** 直连 storage-config,避免经 barrel 再 import storage.ts → userStore → store 形成循环 */
|
||||
import { StorageConfig } from '@/utils/storage/storage-config'
|
||||
|
||||
/**
|
||||
* 存储键名管理器
|
||||
|
||||
Reference in new issue
Block a user