fix: 修复物模型属性-规则窗口回显

This commit is contained in:
XieYongHong 2023-07-14 13:54:11 +08:00
parent 0cb8b8bb21
commit 82a4e14963
1 changed files with 8 additions and 1 deletions

View File

@ -75,6 +75,7 @@
]"
show-search
placeholder="请选择窗口类型"
@select="windowTypeChange"
/>
</j-form-item>
<template
@ -226,6 +227,13 @@ const formData = reactive<{
const dataSource = inject<Ref<any[]>>('_dataSource')
const windowTypeChange = () => {
formData.virtualRule!.rule.window = {
span: undefined,
every: undefined
}
}
const typeOptions = computed(() => {
if (props.source === 'manual') {
return [{ value: 'write', label: '写' }];
@ -241,7 +249,6 @@ const typeOptions = computed(() => {
});
const options = computed(() => {
console.log('options', dataSource?.value)
return (dataSource?.value || []).filter((item: any) => item?.id !== props.value?.id);
});