feat(sj_1.1.0-beta1): 删除没用组件,clearable属性优化
This commit is contained in:
		
							parent
							
								
									f94990614c
								
							
						
					
					
						commit
						3b21b8064b
					
				@ -25,7 +25,6 @@ const handleUpdate = (value: Api.Common.BlockStrategy) => {
 | 
				
			|||||||
    v-model:value="valueRef"
 | 
					    v-model:value="valueRef"
 | 
				
			||||||
    :placeholder="$t('common.blockStrategy.form')"
 | 
					    :placeholder="$t('common.blockStrategy.form')"
 | 
				
			||||||
    :options="translateOptions(blockStrategyRecordOptions)"
 | 
					    :options="translateOptions(blockStrategyRecordOptions)"
 | 
				
			||||||
    clearable
 | 
					 | 
				
			||||||
    @update:value="handleUpdate"
 | 
					    @update:value="handleUpdate"
 | 
				
			||||||
  />
 | 
					  />
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
				
			|||||||
@ -25,7 +25,6 @@ const handleUpdate = (value: Api.Common.TriggerType) => {
 | 
				
			|||||||
    v-model:value="valueRef"
 | 
					    v-model:value="valueRef"
 | 
				
			||||||
    :placeholder="$t('common.executorType.form')"
 | 
					    :placeholder="$t('common.executorType.form')"
 | 
				
			||||||
    :options="translateOptions(executorTypeRecordOptions)"
 | 
					    :options="translateOptions(executorTypeRecordOptions)"
 | 
				
			||||||
    clearable
 | 
					 | 
				
			||||||
    @update:value="handleUpdate"
 | 
					    @update:value="handleUpdate"
 | 
				
			||||||
  />
 | 
					  />
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
				
			|||||||
@ -1,29 +0,0 @@
 | 
				
			|||||||
<script setup lang="ts">
 | 
					 | 
				
			||||||
import { ref } from 'vue';
 | 
					 | 
				
			||||||
import { $t } from '@/locales';
 | 
					 | 
				
			||||||
import { translateOptions } from '@/utils/common';
 | 
					 | 
				
			||||||
import { operationReasonOptions } from '@/constants/business';
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
interface Emits {
 | 
					 | 
				
			||||||
  (e: 'update:value', value: Api.Common.OperationReason): void;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
const emit = defineEmits<Emits>();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
const handleUpdate = (operationReason: Api.Common.OperationReason) => {
 | 
					 | 
				
			||||||
  emit('update:value', operationReason);
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
const operationReasonRef = ref<Api.Common.OperationReason>();
 | 
					 | 
				
			||||||
</script>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
<template>
 | 
					 | 
				
			||||||
  <NSelect
 | 
					 | 
				
			||||||
    v-model:value="operationReasonRef"
 | 
					 | 
				
			||||||
    :placeholder="$t('common.jobOperationReason.form')"
 | 
					 | 
				
			||||||
    :options="translateOptions(operationReasonOptions)"
 | 
					 | 
				
			||||||
    clearable
 | 
					 | 
				
			||||||
    @update:value="handleUpdate"
 | 
					 | 
				
			||||||
  />
 | 
					 | 
				
			||||||
</template>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
<style scoped></style>
 | 
					 | 
				
			||||||
@ -36,12 +36,7 @@ const selectOptions = computed(() => {
 | 
				
			|||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <NSelect
 | 
					  <NSelect v-model:value="modelValue" :placeholder="$t('common.routeKey.routeForm')" :options="selectOptions" />
 | 
				
			||||||
    v-model:value="modelValue"
 | 
					 | 
				
			||||||
    :placeholder="$t('common.routeKey.routeForm')"
 | 
					 | 
				
			||||||
    :options="selectOptions"
 | 
					 | 
				
			||||||
    clearable
 | 
					 | 
				
			||||||
  />
 | 
					 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<style scoped></style>
 | 
					<style scoped></style>
 | 
				
			||||||
 | 
				
			|||||||
@ -10,10 +10,12 @@ defineOptions({
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
interface Props {
 | 
					interface Props {
 | 
				
			||||||
  disabled?: boolean;
 | 
					  disabled?: boolean;
 | 
				
			||||||
 | 
					  clearable?: boolean;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const props = withDefaults(defineProps<Props>(), {
 | 
					const props = withDefaults(defineProps<Props>(), {
 | 
				
			||||||
  disabled: false
 | 
					  disabled: false,
 | 
				
			||||||
 | 
					  clearable: false
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const model = defineModel<string | null>();
 | 
					const model = defineModel<string | null>();
 | 
				
			||||||
@ -45,6 +47,7 @@ getGroupNameList();
 | 
				
			|||||||
    :placeholder="$t('page.retryTask.form.groupName')"
 | 
					    :placeholder="$t('page.retryTask.form.groupName')"
 | 
				
			||||||
    :options="translateOptions2(groupNameList)"
 | 
					    :options="translateOptions2(groupNameList)"
 | 
				
			||||||
    :disabled="props.disabled"
 | 
					    :disabled="props.disabled"
 | 
				
			||||||
 | 
					    :clearable="props.clearable"
 | 
				
			||||||
    filterable
 | 
					    filterable
 | 
				
			||||||
    @update:value="handleUpdate"
 | 
					    @update:value="handleUpdate"
 | 
				
			||||||
  />
 | 
					  />
 | 
				
			||||||
 | 
				
			|||||||
@ -12,9 +12,12 @@ const emit = defineEmits<Emits>();
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
interface Props {
 | 
					interface Props {
 | 
				
			||||||
  groupName: string | null;
 | 
					  groupName: string | null;
 | 
				
			||||||
 | 
					  clearable?: boolean;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const props = defineProps<Props>();
 | 
					const props = withDefaults(defineProps<Props>(), {
 | 
				
			||||||
 | 
					  clearable: false
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** 场景列表 */
 | 
					/** 场景列表 */
 | 
				
			||||||
const sceneNameList = ref<string[]>([]);
 | 
					const sceneNameList = ref<string[]>([]);
 | 
				
			||||||
@ -55,7 +58,7 @@ watch(
 | 
				
			|||||||
    v-model:value="sceneNameRef"
 | 
					    v-model:value="sceneNameRef"
 | 
				
			||||||
    :placeholder="$t('page.retryTask.form.sceneName')"
 | 
					    :placeholder="$t('page.retryTask.form.sceneName')"
 | 
				
			||||||
    :options="translateOptions2(sceneNameList)"
 | 
					    :options="translateOptions2(sceneNameList)"
 | 
				
			||||||
    clearable
 | 
					    :clearable="props.clearable"
 | 
				
			||||||
  />
 | 
					  />
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -1,28 +1,31 @@
 | 
				
			|||||||
<script setup lang="ts">
 | 
					<script setup lang="ts">
 | 
				
			||||||
import { ref } from 'vue';
 | 
					 | 
				
			||||||
import { $t } from '@/locales';
 | 
					import { $t } from '@/locales';
 | 
				
			||||||
import { translateOptions } from '@/utils/common';
 | 
					import { translateOptions } from '@/utils/common';
 | 
				
			||||||
import { taskBatchStatusRecordOptions } from '@/constants/business';
 | 
					import { taskBatchStatusRecordOptions } from '@/constants/business';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
interface Emits {
 | 
					defineOptions({
 | 
				
			||||||
  (e: 'update:value', value: Api.Common.TaskBatchStatus): void;
 | 
					  name: 'TaskBatchStatus'
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					interface Props {
 | 
				
			||||||
 | 
					  disabled?: boolean;
 | 
				
			||||||
 | 
					  clearable?: boolean;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
const emit = defineEmits<Emits>();
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
const taskBatchStatusRef = ref<Api.Common.TaskBatchStatus>();
 | 
					const props = withDefaults(defineProps<Props>(), {
 | 
				
			||||||
 | 
					  disabled: false,
 | 
				
			||||||
const handleUpdate = (taskBatchStatus: Api.Common.TaskBatchStatus) => {
 | 
					  clearable: false
 | 
				
			||||||
  emit('update:value', taskBatchStatus);
 | 
					});
 | 
				
			||||||
};
 | 
					const modelValue = defineModel<Api.Common.TaskBatchStatus>();
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <NSelect
 | 
					  <NSelect
 | 
				
			||||||
    v-model:value="taskBatchStatusRef"
 | 
					    v-model:value="modelValue"
 | 
				
			||||||
    :placeholder="$t('common.taskBatchStatus.form')"
 | 
					    :placeholder="$t('common.taskBatchStatus.form')"
 | 
				
			||||||
    :options="translateOptions(taskBatchStatusRecordOptions)"
 | 
					    :options="translateOptions(taskBatchStatusRecordOptions)"
 | 
				
			||||||
    clearable
 | 
					    :disabled="props.disabled"
 | 
				
			||||||
    @update:value="handleUpdate"
 | 
					    :clearable="props.clearable"
 | 
				
			||||||
  />
 | 
					  />
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -25,7 +25,6 @@ const handleUpdate = (value: Api.Common.BlockStrategy) => {
 | 
				
			|||||||
    v-model:value="valueRef"
 | 
					    v-model:value="valueRef"
 | 
				
			||||||
    :placeholder="$t('common.routeKey.routeForm')"
 | 
					    :placeholder="$t('common.routeKey.routeForm')"
 | 
				
			||||||
    :options="translateOptions(taskTypeRecordRecordOptions)"
 | 
					    :options="translateOptions(taskTypeRecordRecordOptions)"
 | 
				
			||||||
    clearable
 | 
					 | 
				
			||||||
    @update:value="handleUpdate"
 | 
					    @update:value="handleUpdate"
 | 
				
			||||||
  />
 | 
					  />
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
				
			|||||||
@ -25,7 +25,6 @@ const handleUpdate = (value: Api.Common.TriggerType) => {
 | 
				
			|||||||
    v-model:value="valueRef"
 | 
					    v-model:value="valueRef"
 | 
				
			||||||
    :placeholder="$t('common.triggerType.form')"
 | 
					    :placeholder="$t('common.triggerType.form')"
 | 
				
			||||||
    :options="translateOptions(triggerTypeOptions)"
 | 
					    :options="translateOptions(triggerTypeOptions)"
 | 
				
			||||||
    clearable
 | 
					 | 
				
			||||||
    @update:value="handleUpdate"
 | 
					    @update:value="handleUpdate"
 | 
				
			||||||
  />
 | 
					  />
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user