const lastDataHandle = ref(null); // 上次选择的dataHandle值
const dataHandle: any = ref([]);
const dataHandleALLList = [
{ label: '无', value: 0 },
{ label: '上传照片', value: 1 },
{ label: '二维建模', value: 2 },
];
// 单选
function setLastDataHandle() {
lastDataHandle.value = dataHandle.value.length > 0 ? dataHandle.value[0] : null;
}
// 航线媒体数据处理(单选)
function handleDataHandleChange(checkedValue: any) {
dataHandle.value = checkedValue.filter((item: any) => lastDataHandle.value !== item);
setLastDataHandle();
}
<a-form-item label="航线媒体数据处理" :label-col="{ style: { width: '8rem' } }">
<a-checkbox-group v-model:value="dataHandle" :options="dataHandleALLList"
@change="handleDataHandleChange" />
</a-form-item>