feat: form表单列表监听刷新 修改
This commit is contained in:
@ -793,7 +793,7 @@ ${hasTemplatePrint ? ' reactive ' : ''}
|
||||
|
||||
import useEventBus from '/@/hooks/event/useEventBus';
|
||||
|
||||
const { bus, CREATE_FLOW, FLOW_PROCESSED } = useEventBus();
|
||||
const { bus, CREATE_FLOW, FLOW_PROCESSED, FORM_LIST_MODIFIED } = useEventBus();
|
||||
|
||||
const { notification } = useMessage();
|
||||
const { t } = useI18n();
|
||||
@ -1450,12 +1450,20 @@ ${hasTemplatePrint ? ' reactive ' : ''}
|
||||
|
||||
onMounted(() => {
|
||||
${ model.listConfig.isLeftMenu ? `fetch();` : ''}
|
||||
bus.on(FLOW_PROCESSED, handleRefresh);
|
||||
bus.on(CREATE_FLOW, handleRefresh);
|
||||
if (schemaIdComputedRef.value) {
|
||||
bus.on(FLOW_PROCESSED, handleRefresh);
|
||||
bus.on(CREATE_FLOW, handleRefresh);
|
||||
} else {
|
||||
bus.on(FORM_LIST_MODIFIED, handleRefresh);
|
||||
}
|
||||
});
|
||||
onUnmounted(() => {
|
||||
bus.off(FLOW_PROCESSED, handleRefresh);
|
||||
bus.off(CREATE_FLOW, handleRefresh);
|
||||
if (schemaIdComputedRef.value) {
|
||||
bus.off(FLOW_PROCESSED, handleRefresh);
|
||||
bus.off(CREATE_FLOW, handleRefresh);
|
||||
} else {
|
||||
bus.off(FORM_LIST_MODIFIED, handleRefresh);
|
||||
}
|
||||
});
|
||||
function getActions(record: Recordable):ActionItem[] {
|
||||
${
|
||||
|
||||
Reference in New Issue
Block a user