mirror of
				https://gitee.com/dromara/mayfly-go
				synced 2025-11-04 08:20:25 +08:00 
			
		
		
		
	fix: 数据库编辑导致标签关联删除修复、cron组件调整
This commit is contained in:
		@@ -78,7 +78,7 @@
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script lang="ts" setup>
 | 
			
		||||
import { computed, toRefs, onMounted, reactive, ref, nextTick } from 'vue';
 | 
			
		||||
import { computed, toRefs, onMounted, reactive, ref, nextTick, watch } from 'vue';
 | 
			
		||||
import CrontabSecond from './CrontabSecond.vue';
 | 
			
		||||
import CrontabMin from './CrontabMin.vue';
 | 
			
		||||
import CrontabHour from './CrontabHour.vue';
 | 
			
		||||
@@ -129,9 +129,15 @@ const { tabTitles, crontabValueObj } = toRefs(state);
 | 
			
		||||
 | 
			
		||||
onMounted(() => {
 | 
			
		||||
    resolveExp();
 | 
			
		||||
    changeTab(state.activeName);
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
watch(
 | 
			
		||||
    () => props.expression,
 | 
			
		||||
    () => {
 | 
			
		||||
        resolveExp();
 | 
			
		||||
    }
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
function shouldHide(key: string) {
 | 
			
		||||
    if (props.hideComponent && props.hideComponent.includes(key)) return false;
 | 
			
		||||
    return true;
 | 
			
		||||
@@ -156,6 +162,7 @@ function resolveExp() {
 | 
			
		||||
                ...obj,
 | 
			
		||||
            };
 | 
			
		||||
        }
 | 
			
		||||
        changeTab(state.activeName);
 | 
			
		||||
    } else {
 | 
			
		||||
        //没有传入的表达式 则还原
 | 
			
		||||
        clearCron();
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user