Commit ea937860796c0d1d79d32917040e399e3833637c

Authored by ww
1 parent 10b63913

fix: control component switch with icon not set default icon

1 <script lang="ts" setup> 1 <script lang="ts" setup>
2 - import { BasicDrawer, useDrawer, useDrawerInner } from '/@/components/Drawer'; 2 + import { BasicDrawer, useDrawer } from '/@/components/Drawer';
3 import IconData from '/@/components/Icon/data/iconfont.data'; 3 import IconData from '/@/components/Icon/data/iconfont.data';
4 import { SvgIcon } from '/@/components/Icon'; 4 import { SvgIcon } from '/@/components/Icon';
5 import { computed } from '@vue/reactivity'; 5 import { computed } from '@vue/reactivity';
@@ -17,7 +17,10 @@ import { @@ -17,7 +17,10 @@ import {
17 transformDashboardComponentConfig, 17 transformDashboardComponentConfig,
18 } from './InstrumentComponent/dashBoardComponent.config'; 18 } from './InstrumentComponent/dashBoardComponent.config';
19 import { DigitalComponentDefaultConfig } from './InstrumentComponent/digitalDashBoard.config'; 19 import { DigitalComponentDefaultConfig } from './InstrumentComponent/digitalDashBoard.config';
20 -import { transformControlConfig } from './ControlComponent/control.config'; 20 +import {
  21 + ControlComponentDefaultConfig,
  22 + transformControlConfig,
  23 +} from './ControlComponent/control.config';
21 24
22 import TextComponent from './TextComponent/TextComponent.vue'; 25 import TextComponent from './TextComponent/TextComponent.vue';
23 import DashBoardComponent from './InstrumentComponent/DashBoardComponent.vue'; 26 import DashBoardComponent from './InstrumentComponent/DashBoardComponent.vue';
@@ -209,6 +212,11 @@ frontComponentDefaultConfigMap.set( @@ -209,6 +212,11 @@ frontComponentDefaultConfigMap.set(
209 DigitalComponentDefaultConfig 212 DigitalComponentDefaultConfig
210 ); 213 );
211 214
  215 +frontComponentDefaultConfigMap.set(
  216 + FrontComponent.CONTROL_COMPONENT_SWITCH_WITH_ICON,
  217 + ControlComponentDefaultConfig
  218 +);
  219 +
212 export const getComponentDefaultConfig = (key: FrontComponent) => { 220 export const getComponentDefaultConfig = (key: FrontComponent) => {
213 return frontComponentDefaultConfigMap.get(key) || {}; 221 return frontComponentDefaultConfigMap.get(key) || {};
214 }; 222 };