|
@@ -1577,8 +1577,12 @@ const changeValue = (prop: string) => {
|
|
};
|
|
};
|
|
|
|
|
|
const handleDeviceChange = (value: CascaderValue<DeviceItem>, context: CascaderChangeContext<DeviceItem>) => {
|
|
const handleDeviceChange = (value: CascaderValue<DeviceItem>, context: CascaderChangeContext<DeviceItem>) => {
|
|
- data.pen.description = context.node.label
|
|
|
|
- Object.assign(data.pen.hvacDeviceInfo, context.node.data)
|
|
|
|
|
|
+ if (context.node) {
|
|
|
|
+ data.pen.description = context.node.label
|
|
|
|
+ Object.assign(data.pen.hvacDeviceInfo, context.node.data)
|
|
|
|
+ } else {
|
|
|
|
+ data.pen.hvacDeviceInfo = {}
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
const getThumbImg = async () => {
|
|
const getThumbImg = async () => {
|