Revert "fix: svg分包"

This reverts commit e443dd4388.
This commit is contained in:
dataeaseShu 2024-09-25 09:43:31 +08:00
parent b5a282fee3
commit fd76009beb
12 changed files with 25 additions and 72 deletions

View File

@ -1,11 +0,0 @@
import bubbleMapDark from '@/assets/svg/bubble-map-dark.svg'
import heatMapDark from '@/assets/svg/heat-map-dark.svg'
import symbolicMapDark from '@/assets/svg/symbolic-map-dark.svg'
const iconChartDarkDivideMap = {
'bubble-map-dark': bubbleMapDark,
'heat-map-dark': heatMapDark,
'symbolic-map-dark': symbolicMapDark
}
export { iconChartDarkDivideMap }

View File

@ -8,6 +8,7 @@ import barRangeDark from '@/assets/svg/bar-range-dark.svg'
import barStackDark from '@/assets/svg/bar-stack-dark.svg'
import barStackHorizontalDark from '@/assets/svg/bar-stack-horizontal-dark.svg'
import bidirectionalBarDark from '@/assets/svg/bidirectional-bar-dark.svg'
import bubbleMapDark from '@/assets/svg/bubble-map-dark.svg'
import chartMixDark from '@/assets/svg/chart-mix-dark.svg'
import chartMixGroupDark from '@/assets/svg/chart-mix-group-dark.svg'
import chartMixStackDark from '@/assets/svg/chart-mix-stack-dark.svg'
@ -15,6 +16,7 @@ import chartMixDualLineDark from '@/assets/svg/chart-mix-dual-line-dark.svg'
import flowMapDark from '@/assets/svg/flow-map-dark.svg'
import funnelDark from '@/assets/svg/funnel-dark.svg'
import gaugeDark from '@/assets/svg/gauge-dark.svg'
import heatMapDark from '@/assets/svg/heat-map-dark.svg'
import indicatorDark from '@/assets/svg/indicator-dark.svg'
import lineDark from '@/assets/svg/line-dark.svg'
import liquidDark from '@/assets/svg/liquid-dark.svg'
@ -32,6 +34,7 @@ import richTextDark from '@/assets/svg/rich-text-dark.svg'
import sankeyDark from '@/assets/svg/sankey-dark.svg'
import scatterDark from '@/assets/svg/scatter-dark.svg'
import stockLineDark from '@/assets/svg/stock-line-dark.svg'
import symbolicMapDark from '@/assets/svg/symbolic-map-dark.svg'
import tableInfoDark from '@/assets/svg/table-info-dark.svg'
import tableNormalDark from '@/assets/svg/table-normal-dark.svg'
import tablePivotDark from '@/assets/svg/table-pivot-dark.svg'
@ -51,6 +54,7 @@ const iconChartDarkMap = {
'bar-stack-dark': barStackDark,
'bar-stack-horizontal-dark': barStackHorizontalDark,
'bidirectional-bar-dark': bidirectionalBarDark,
'bubble-map-dark': bubbleMapDark,
'chart-mix-dark': chartMixDark,
'chart-mix-group-dark': chartMixGroupDark,
'chart-mix-stack-dark': chartMixStackDark,
@ -58,6 +62,7 @@ const iconChartDarkMap = {
'flow-map-dark': flowMapDark,
'funnel-dark': funnelDark,
'gauge-dark': gaugeDark,
'heat-map-dark': heatMapDark,
'indicator-dark': indicatorDark,
'line-dark': lineDark,
'liquid-dark': liquidDark,
@ -75,6 +80,7 @@ const iconChartDarkMap = {
'sankey-dark': sankeyDark,
'scatter-dark': scatterDark,
'stock-line-dark': stockLineDark,
'symbolic-map-dark': symbolicMapDark,
'table-info-dark': tableInfoDark,
'table-normal-dark': tableNormalDark,
'table-pivot-dark': tablePivotDark,

View File

@ -1,11 +0,0 @@
import heatMap from '@/assets/svg/heat-map.svg'
import symbolicMap from '@/assets/svg/symbolic-map.svg'
import bubbleMap from '@/assets/svg/bubble-map.svg'
const iconChartDivideMap = {
'heat-map': heatMap,
'bubble-map': bubbleMap,
'symbolic-map': symbolicMap
}
export { iconChartDivideMap }

View File

@ -8,6 +8,7 @@ import barStackHorizontal from '@/assets/svg/bar-stack-horizontal.svg'
import barStack from '@/assets/svg/bar-stack.svg'
import bar from '@/assets/svg/bar.svg'
import bidirectionalBar from '@/assets/svg/bidirectional-bar.svg'
import bubbleMap from '@/assets/svg/bubble-map.svg'
import chartMixGroup from '@/assets/svg/chart-mix-group.svg'
import chartMixStack from '@/assets/svg/chart-mix-stack.svg'
import chartMixDualLine from '@/assets/svg/chart-mix-dual-line.svg'
@ -15,6 +16,7 @@ import chartMix from '@/assets/svg/chart-mix.svg'
import flowMap from '@/assets/svg/flow-map.svg'
import funnel from '@/assets/svg/funnel.svg'
import gauge from '@/assets/svg/gauge.svg'
import heatMap from '@/assets/svg/heat-map.svg'
import indicator from '@/assets/svg/indicator.svg'
import line from '@/assets/svg/line.svg'
import liquid from '@/assets/svg/liquid.svg'
@ -32,6 +34,7 @@ import richText from '@/assets/svg/rich-text.svg'
import sankey from '@/assets/svg/sankey.svg'
import scatter from '@/assets/svg/scatter.svg'
import stockLine from '@/assets/svg/stock-line.svg'
import symbolicMap from '@/assets/svg/symbolic-map.svg'
import tableInfo from '@/assets/svg/table-info.svg'
import tableNormal from '@/assets/svg/table-normal.svg'
import tablePivot from '@/assets/svg/table-pivot.svg'
@ -52,6 +55,7 @@ const iconChartMap = {
'bar-stack': barStack,
bar: bar,
'bidirectional-bar': bidirectionalBar,
'bubble-map': bubbleMap,
'chart-mix-group': chartMixGroup,
'chart-mix-stack': chartMixStack,
'chart-mix-dual-line': chartMixDualLine,
@ -59,6 +63,7 @@ const iconChartMap = {
'flow-map': flowMap,
funnel: funnel,
gauge: gauge,
'heat-map': heatMap,
indicator: indicator,
line: line,
liquid: liquid,
@ -76,6 +81,7 @@ const iconChartMap = {
sankey: sankey,
scatter: scatter,
'stock-line': stockLine,
'symbolic-map': symbolicMap,
'table-info': tableInfo,
'table-normal': tableNormal,
'table-pivot': tablePivot,

View File

@ -17,10 +17,7 @@
<Icon class-name="view-type-icon"
><component
class="svg-icon view-type-icon"
:is="
iconChartMap[state.curJumpViewInfo.type] ||
iconChartDivideMap[state.curJumpViewInfo.type]
"
:is="iconChartMap[state.curJumpViewInfo.type]"
></component
></Icon>
{{ state.curJumpViewInfo.title }}</span
@ -268,9 +265,7 @@
><component
class="svg-icon view-type-icon"
style="width: 14px; height: 14px"
:is="
iconChartMap[item.type] || iconChartDivideMap[item.type]
"
:is="iconChartMap[item.type]"
></component
></Icon>
<span style="float: left; margin-left: 4px; font-size: 14px">{{
@ -437,7 +432,6 @@
<script lang="ts" setup>
import { iconFieldMap } from '@/components/icon-group/field-list'
import { iconChartMap } from '@/components/icon-group/chart-list'
import { iconChartDivideMap } from '@/components/icon-group/chart-divide-list'
import datasetOutline from '@/assets/svg/dataset-outline.svg'
import dvLinkTarget from '@/assets/svg/dv-link-target.svg'
import dvDashboardSpine from '@/assets/svg/dv-dashboard-spine.svg'

View File

@ -20,10 +20,7 @@
<Icon class-name="view-type-icon"
><component
class="svg-icon view-type-icon"
:is="
iconChartMap[state.curLinkageViewInfo.type] ||
iconChartDivideMap[state.curLinkageViewInfo.type]
"
:is="iconChartMap[state.curLinkageViewInfo.type]"
></component
></Icon>
{{ state.curLinkageViewInfo.title }}</span
@ -90,10 +87,7 @@
<span class="tree-select-field">
<Icon class-name="view-type-icon"
><component
:is="
iconChartMap[data.targetViewType] ||
iconChartDivideMap[data.targetViewType]
"
:is="iconChartMap[data.targetViewType]"
style="margin-right: 4px"
class="svg-icon view-type-icon"
></component
@ -144,10 +138,7 @@
><component
class="svg-icon view-type-icon"
style="margin-right: 4px"
:is="
iconChartMap[data.targetViewType] ||
iconChartDivideMap[data.targetViewType]
"
:is="iconChartMap[data.targetViewType]"
></component
></Icon>
{{ data.targetViewName }}
@ -279,7 +270,6 @@
<script lang="ts" setup>
import { iconFieldMap } from '@/components/icon-group/field-list'
import { iconChartMap } from '@/components/icon-group/chart-list'
import { iconChartDivideMap } from '@/components/icon-group/chart-divide-list'
import datasetOutline from '@/assets/svg/dataset-outline.svg'
import dvLinkTarget from '@/assets/svg/dv-link-target.svg'
import icon_deleteTrash_outlined from '@/assets/svg/icon_delete-trash_outlined.svg'

View File

@ -1,6 +1,5 @@
<script setup lang="tsx">
import { iconChartMap } from '@/components/icon-group/chart-list'
import { iconChartDivideMap } from '@/components/icon-group/chart-divide-list'
import { reactive, ref, toRefs } from 'vue'
import eventBus from '@/utils/eventBus'
import { CHART_TYPE_CONFIGS } from '@/views/chart/components/editor/util/chart'
@ -9,7 +8,6 @@ import { commonHandleDragEnd, commonHandleDragStart } from '@/utils/canvasUtils'
import { ElScrollbar } from 'element-plus-secondary'
import { XpackComponent } from '@/components/plugin'
import { iconChartDarkMap } from '@/components/icon-group/chart-dark-list'
import { iconChartDarkDivideMap } from '@/components/icon-group/chart-dark-divide-list'
const props = defineProps({
propValue: {
@ -151,9 +149,8 @@ const loadPluginCategory = data => {
class="svg-icon item-top-icon"
:is="
props.themes === 'dark'
? iconChartDarkMap[`${chartInfo.icon}-dark`] ||
iconChartDarkDivideMap[`${chartInfo.icon}-dark`]
: iconChartMap[chartInfo.icon] || iconChartDivideMap[chartInfo.icon]
? iconChartDarkMap[`${chartInfo.icon}-dark`]
: iconChartMap[chartInfo.icon]
"
></component
></Icon>

View File

@ -43,7 +43,6 @@ import type { ManipulateType } from 'dayjs'
import dayjs from 'dayjs'
import ConditionDefaultConfiguration from '@/custom-component/v-query/ConditionDefaultConfiguration.vue'
import { iconChartMap } from '@/components/icon-group/chart-list'
import { iconChartDivideMap } from '@/components/icon-group/chart-divide-list'
import { iconFieldMap } from '@/components/icon-group/field-list'
const { t } = useI18n()
@ -1572,10 +1571,7 @@ defineExpose({
><el-icon class="component-type">
<Icon
><component
:is="
iconChartMap[canvasViewInfo[field.componentId].type] ||
iconChartDivideMap[canvasViewInfo[field.componentId].type]
"
:is="iconChartMap[canvasViewInfo[field.componentId].type]"
></component
></Icon> </el-icon
><span

View File

@ -5,8 +5,6 @@ import Icon from '@/components/icon-custom/src/Icon.vue'
import { ElScrollbar } from 'element-plus-secondary'
import { iconChartDarkMap } from '@/components/icon-group/chart-dark-list'
import { iconChartMap } from '@/components/icon-group/chart-list'
import { iconChartDivideMap } from '@/components/icon-group/chart-divide-list'
import { iconChartDarkDivideMap } from '@/components/icon-group/chart-dark-divide-list'
const props = defineProps({
propValue: {
@ -108,9 +106,8 @@ const groupActiveChange = category => {
class="svg-icon item-top-icon"
:is="
props.themes === 'dark'
? iconChartDarkMap[`${chartInfo.icon}-dark`] ||
iconChartDarkDivideMap[`${chartInfo.icon}-dark`]
: iconChartMap[chartInfo.icon] || iconChartDivideMap[chartInfo.icon]
? iconChartDarkMap[`${chartInfo.icon}-dark`]
: iconChartMap[chartInfo.icon]
"
></component
></Icon>

View File

@ -66,7 +66,6 @@ import ChartTemplateInfo from '@/views/chart/components/editor/common/ChartTempl
import { XpackComponent } from '@/components/plugin'
import { useEmbedded } from '@/store/modules/embedded'
import { iconChartMap } from '@/components/icon-group/chart-list'
import { iconChartDivideMap } from '@/components/icon-group/chart-divide-list'
import { iconFieldMap } from '@/components/icon-group/field-list'
import {
iconFieldCalculatedMap,
@ -1830,10 +1829,7 @@ const deleteChartFieldItem = id => {
<Icon v-else class-name="chart-type-select-icon">
<component
class="svg-icon chart-type-select-icon"
:is="
iconChartMap[state.chartTypeOptions[0].icon] ||
iconChartDivideMap[state.chartTypeOptions[0].icon]
"
:is="iconChartMap[state.chartTypeOptions[0].icon]"
></component>
</Icon>
</template>

View File

@ -1,8 +1,6 @@
<script lang="tsx" setup>
import { iconChartDarkMap } from '@/components/icon-group/chart-dark-list'
import { iconChartDarkDivideMap } from '@/components/icon-group/chart-dark-divide-list'
import { iconChartMap } from '@/components/icon-group/chart-list'
import { iconChartDivideMap } from '@/components/icon-group/chart-divide-list'
import { toRefs } from 'vue'
const props = defineProps({
viewIcon: {
@ -25,11 +23,7 @@ const { viewIcon, themes } = toRefs(props)
<Icon class-name="item-icon"
><component
class="svg-icon item-icon"
:is="
themes === 'dark'
? iconChartDarkMap[`${viewIcon}-dark`] || iconChartDarkDivideMap[`${viewIcon}-dark`]
: iconChartMap[viewIcon] || iconChartDivideMap[viewIcon]
"
:is="themes === 'dark' ? iconChartDarkMap[`${viewIcon}-dark`] : iconChartMap[viewIcon]"
></component
></Icon>
</div>

View File

@ -16,7 +16,6 @@ import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
import { getCanvasStyle } from '@/utils/style'
import EmptyBackground from '../../components/empty-background/src/EmptyBackground.vue'
import { iconChartMap } from '@/components/icon-group/chart-list'
import { iconChartDivideMap } from '@/components/icon-group/chart-divide-list'
const dvMainStore = dvMainStoreWithOut()
const viewShow = ref(true)
@ -100,7 +99,7 @@ const iconMap = {
const getIconName = item => {
if (item.component === 'UserView') {
const viewInfo = canvasViewInfo.value[item.id]
return iconChartMap[`${viewInfo.type}`] || iconChartDivideMap[`${viewInfo.type}`]
return iconChartMap[`${viewInfo.type}`]
} else {
return iconMap[item.icon]
}