fix: 修复管理端静态资源基础路径
- 统一内置品牌资源与空状态图片的 BASE_URL 解析 - 应用启动时自动归一化历史偏好里的内置资源路径 - 多个空状态组件改为复用公共资源地址工具
This commit is contained in:
@@ -16,6 +16,7 @@ import {
|
||||
} from 'element-plus';
|
||||
|
||||
import { hasPermission } from '#/api/common/hasPermission.ts';
|
||||
import { getEmptyStateImageUrl } from '#/utils/assets';
|
||||
|
||||
const props = defineProps({
|
||||
titleKey: {
|
||||
@@ -137,9 +138,7 @@ const filteredActions = computed(() => {
|
||||
</div>
|
||||
|
||||
<div v-if="data.length === 0" class="empty-state">
|
||||
<ElEmpty
|
||||
:image="`/empty${preferences.theme.mode === 'dark' ? '-dark' : ''}.png`"
|
||||
/>
|
||||
<ElEmpty :image="getEmptyStateImageUrl(preferences.theme.mode)" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -20,6 +20,8 @@ import {
|
||||
ElMessageBox,
|
||||
} from 'element-plus';
|
||||
|
||||
import { getEmptyStateImageUrl } from '#/utils/assets';
|
||||
|
||||
const props = defineProps({
|
||||
title: {
|
||||
type: String,
|
||||
@@ -245,7 +247,7 @@ const handleDeleteClick = (event: any, item: any) => {
|
||||
<!-- 无数据提示 -->
|
||||
<div v-if="categoryData.length === 0 && !loading" class="no-data">
|
||||
<ElEmpty
|
||||
:image="`/empty${preferences.theme.mode === 'dark' ? '-dark' : ''}.png`"
|
||||
:image="getEmptyStateImageUrl(preferences.theme.mode)"
|
||||
:description="$t('common.noDataAvailable')"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -7,6 +7,7 @@ import { ElEmpty } from 'element-plus';
|
||||
import { JsonViewer } from 'vue3-json-viewer';
|
||||
|
||||
import 'vue3-json-viewer/dist/vue3-json-viewer.css';
|
||||
import { getEmptyStateImageUrl } from '#/utils/assets';
|
||||
|
||||
defineProps({
|
||||
value: {
|
||||
@@ -26,10 +27,7 @@ watch(
|
||||
<template>
|
||||
<div class="res-container">
|
||||
<JsonViewer v-if="value" :value="value" copyable :theme="themeMode" />
|
||||
<ElEmpty
|
||||
:image="`/empty${preferences.theme.mode === 'dark' ? '-dark' : ''}.png`"
|
||||
v-else
|
||||
/>
|
||||
<ElEmpty :image="getEmptyStateImageUrl(preferences.theme.mode)" v-else />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import { preferences } from '@easyflow/preferences';
|
||||
import { ElEmpty, ElPagination } from 'element-plus';
|
||||
|
||||
import { api } from '#/api/request';
|
||||
import { getEmptyStateImageUrl } from '#/utils/assets';
|
||||
|
||||
interface PageDataProps {
|
||||
pageUrl: string;
|
||||
@@ -126,9 +127,7 @@ onMounted(() => {
|
||||
</div>
|
||||
</template>
|
||||
<slot v-else name="empty">
|
||||
<ElEmpty
|
||||
:image="`/empty${preferences.theme.mode === 'dark' ? '-dark' : ''}.png`"
|
||||
/>
|
||||
<ElEmpty :image="getEmptyStateImageUrl(preferences.theme.mode)" />
|
||||
</slot>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -16,6 +16,8 @@ import {
|
||||
ElIcon,
|
||||
} from 'element-plus';
|
||||
|
||||
import { getEmptyStateImageUrl } from '#/utils/assets';
|
||||
|
||||
interface Props {
|
||||
title?: string;
|
||||
menus: T[];
|
||||
@@ -182,7 +184,7 @@ const isSvgString = (icon: any) => {
|
||||
</div>
|
||||
<ElEmpty
|
||||
v-if="menus.length <= 0"
|
||||
:image="`/empty${preferences.theme.mode === 'dark' ? '-dark' : ''}.png`"
|
||||
:image="getEmptyStateImageUrl(preferences.theme.mode)"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user