功能菜单组件,之前选中过切换菜单再回来后默认选中但是组件不显示问题修改
parent
43b8feed9a
commit
489b0bc051
|
|
@ -12,7 +12,7 @@
|
|||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onMounted } from 'vue'
|
||||
import { onMounted, watch } from 'vue'
|
||||
import { eventHandlerHook } from '@/hooks/eventHandler.hook';
|
||||
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore';
|
||||
|
||||
|
|
@ -26,18 +26,21 @@ const props = defineProps({
|
|||
})
|
||||
|
||||
const changeButton = (type) => {
|
||||
|
||||
props.chartConfig.option.selectButton = type
|
||||
|
||||
eventHandlerHook(
|
||||
chartEditStore.getComponentList,
|
||||
props.chartConfig.events.interactConfigEvents[type],
|
||||
'click',
|
||||
type,
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
watch(() => props.chartConfig.status.hide, (newVal) => {
|
||||
if(!newVal && props.chartConfig.option.selectButton){
|
||||
changeButton(props.chartConfig.option.selectButton)
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
const { list, selectButton } = props.chartConfig.option
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue