|
@@ -282,7 +282,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
-import { computed, ref, unref } from 'vue'
|
|
|
+import { computed, ref, unref, toRaw } from 'vue'
|
|
|
import api from '/@/api/device'
|
|
|
import { Plus, Minus, Right } from '@element-plus/icons-vue'
|
|
|
import EditOption from './editOption.vue'
|
|
@@ -533,7 +533,12 @@ const onSubmit = () => {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ // 确保 ruleForm.value.valueType 不为空,否则初始化为空对象
|
|
|
+ if (!ruleForm.value.valueType) {
|
|
|
+ ruleForm.value.valueType = {}
|
|
|
+ }
|
|
|
Object.assign(ruleForm.value.valueType, valueType.value)
|
|
|
+
|
|
|
// 深拷贝确保响应式对象正确序列化
|
|
|
const submitData = JSON.parse(JSON.stringify(ruleForm.value))
|
|
|
api.model.propertyadd(submitData).then(() => {
|