Commit ea937860796c0d1d79d32917040e399e3833637c
1 parent
10b63913
fix: control component switch with icon not set default icon
Showing
2 changed files
with
10 additions
and
2 deletions
1 | 1 | <script lang="ts" setup> |
2 | - import { BasicDrawer, useDrawer, useDrawerInner } from '/@/components/Drawer'; | |
2 | + import { BasicDrawer, useDrawer } from '/@/components/Drawer'; | |
3 | 3 | import IconData from '/@/components/Icon/data/iconfont.data'; |
4 | 4 | import { SvgIcon } from '/@/components/Icon'; |
5 | 5 | import { computed } from '@vue/reactivity'; | ... | ... |
... | ... | @@ -17,7 +17,10 @@ import { |
17 | 17 | transformDashboardComponentConfig, |
18 | 18 | } from './InstrumentComponent/dashBoardComponent.config'; |
19 | 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 | 25 | import TextComponent from './TextComponent/TextComponent.vue'; |
23 | 26 | import DashBoardComponent from './InstrumentComponent/DashBoardComponent.vue'; |
... | ... | @@ -209,6 +212,11 @@ frontComponentDefaultConfigMap.set( |
209 | 212 | DigitalComponentDefaultConfig |
210 | 213 | ); |
211 | 214 | |
215 | +frontComponentDefaultConfigMap.set( | |
216 | + FrontComponent.CONTROL_COMPONENT_SWITCH_WITH_ICON, | |
217 | + ControlComponentDefaultConfig | |
218 | +); | |
219 | + | |
212 | 220 | export const getComponentDefaultConfig = (key: FrontComponent) => { |
213 | 221 | return frontComponentDefaultConfigMap.get(key) || {}; |
214 | 222 | }; | ... | ... |