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"
|
||||
:placeholder="$t('common.blockStrategy.form')"
|
||||
:options="translateOptions(blockStrategyRecordOptions)"
|
||||
clearable
|
||||
@update:value="handleUpdate"
|
||||
/>
|
||||
</template>
|
||||
|
@ -25,7 +25,6 @@ const handleUpdate = (value: Api.Common.TriggerType) => {
|
||||
v-model:value="valueRef"
|
||||
:placeholder="$t('common.executorType.form')"
|
||||
:options="translateOptions(executorTypeRecordOptions)"
|
||||
clearable
|
||||
@update:value="handleUpdate"
|
||||
/>
|
||||
</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>
|
||||
|
||||
<template>
|
||||
<NSelect
|
||||
v-model:value="modelValue"
|
||||
:placeholder="$t('common.routeKey.routeForm')"
|
||||
:options="selectOptions"
|
||||
clearable
|
||||
/>
|
||||
<NSelect v-model:value="modelValue" :placeholder="$t('common.routeKey.routeForm')" :options="selectOptions" />
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
||||
|
@ -10,10 +10,12 @@ defineOptions({
|
||||
|
||||
interface Props {
|
||||
disabled?: boolean;
|
||||
clearable?: boolean;
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
disabled: false
|
||||
disabled: false,
|
||||
clearable: false
|
||||
});
|
||||
|
||||
const model = defineModel<string | null>();
|
||||
@ -45,6 +47,7 @@ getGroupNameList();
|
||||
:placeholder="$t('page.retryTask.form.groupName')"
|
||||
:options="translateOptions2(groupNameList)"
|
||||
:disabled="props.disabled"
|
||||
:clearable="props.clearable"
|
||||
filterable
|
||||
@update:value="handleUpdate"
|
||||
/>
|
||||
|
@ -12,9 +12,12 @@ const emit = defineEmits<Emits>();
|
||||
|
||||
interface Props {
|
||||
groupName: string | null;
|
||||
clearable?: boolean;
|
||||
}
|
||||
|
||||
const props = defineProps<Props>();
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
clearable: false
|
||||
});
|
||||
|
||||
/** 场景列表 */
|
||||
const sceneNameList = ref<string[]>([]);
|
||||
@ -55,7 +58,7 @@ watch(
|
||||
v-model:value="sceneNameRef"
|
||||
:placeholder="$t('page.retryTask.form.sceneName')"
|
||||
:options="translateOptions2(sceneNameList)"
|
||||
clearable
|
||||
:clearable="props.clearable"
|
||||
/>
|
||||
</template>
|
||||
|
||||
|
@ -1,28 +1,31 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue';
|
||||
import { $t } from '@/locales';
|
||||
import { translateOptions } from '@/utils/common';
|
||||
import { taskBatchStatusRecordOptions } from '@/constants/business';
|
||||
|
||||
interface Emits {
|
||||
(e: 'update:value', value: Api.Common.TaskBatchStatus): void;
|
||||
defineOptions({
|
||||
name: 'TaskBatchStatus'
|
||||
});
|
||||
|
||||
interface Props {
|
||||
disabled?: boolean;
|
||||
clearable?: boolean;
|
||||
}
|
||||
const emit = defineEmits<Emits>();
|
||||
|
||||
const taskBatchStatusRef = ref<Api.Common.TaskBatchStatus>();
|
||||
|
||||
const handleUpdate = (taskBatchStatus: Api.Common.TaskBatchStatus) => {
|
||||
emit('update:value', taskBatchStatus);
|
||||
};
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
disabled: false,
|
||||
clearable: false
|
||||
});
|
||||
const modelValue = defineModel<Api.Common.TaskBatchStatus>();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<NSelect
|
||||
v-model:value="taskBatchStatusRef"
|
||||
v-model:value="modelValue"
|
||||
:placeholder="$t('common.taskBatchStatus.form')"
|
||||
:options="translateOptions(taskBatchStatusRecordOptions)"
|
||||
clearable
|
||||
@update:value="handleUpdate"
|
||||
:disabled="props.disabled"
|
||||
:clearable="props.clearable"
|
||||
/>
|
||||
</template>
|
||||
|
||||
|
@ -25,7 +25,6 @@ const handleUpdate = (value: Api.Common.BlockStrategy) => {
|
||||
v-model:value="valueRef"
|
||||
:placeholder="$t('common.routeKey.routeForm')"
|
||||
:options="translateOptions(taskTypeRecordRecordOptions)"
|
||||
clearable
|
||||
@update:value="handleUpdate"
|
||||
/>
|
||||
</template>
|
||||
|
@ -25,7 +25,6 @@ const handleUpdate = (value: Api.Common.TriggerType) => {
|
||||
v-model:value="valueRef"
|
||||
:placeholder="$t('common.triggerType.form')"
|
||||
:options="translateOptions(triggerTypeOptions)"
|
||||
clearable
|
||||
@update:value="handleUpdate"
|
||||
/>
|
||||
</template>
|
||||
|
Loading…
Reference in New Issue
Block a user