From 8a5cb8306f90e13f9e1067416e8cc5506001723b Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Fri, 13 Sep 2024 20:15:54 +0800
Subject: [PATCH] 打包报错相关处理
---
src/views/device/components/DeviceSettingBox.vue | 23 ++++++-----------------
1 files changed, 6 insertions(+), 17 deletions(-)
diff --git a/src/views/device/components/DeviceSettingBox.vue b/src/views/device/components/DeviceSettingBox.vue
index 90f3dec..2491c76 100644
--- a/src/views/device/components/DeviceSettingBox.vue
+++ b/src/views/device/components/DeviceSettingBox.vue
@@ -309,29 +309,18 @@
</div>
</template>
-<script setup lang="ts">
+<script setup>
import { defineProps, ref, watch } from 'vue';
-import { DeviceInfoType } from '@/types/device';
-import { useMyStore } from '@/store';
import { cloneDeep } from 'lodash';
-import {
- initDeviceSetting,
- initDeviceSettingFormModel,
- DeviceSettingKeyEnum,
-} from '@/types/device-setting';
+import { initDeviceSetting, initDeviceSettingFormModel } from '@/types/device-setting';
import {
updateDeviceSettingInfoByOsd,
updateDeviceSettingFormModelByOsd,
} from '@/utils/device-setting';
import { useDeviceSetting } from './use-device-setting';
-import DeviceSettingPopover from './DeviceSettingPopover.vue';
-const props = defineProps<{
- sn: string;
- deviceInfo: DeviceInfoType;
-}>();
+const props = defineProps();
-const store = useMyStore();
const deviceSetting = ref(cloneDeep(initDeviceSetting));
const deviceSettingFormModelFromOsd = ref(cloneDeep(initDeviceSettingFormModel));
const deviceSettingFormModel = ref(cloneDeep(initDeviceSettingFormModel)); // 真实使用的formModel
@@ -350,16 +339,16 @@
}
);
-function onShowPopConfirm(settingKey: DeviceSettingKeyEnum) {
+function onShowPopConfirm(settingKey) {
deviceSetting.value[settingKey].popConfirm.visible = true;
deviceSettingFormModel.value = cloneDeep(deviceSettingFormModelFromOsd.value);
}
-function onCancel(settingKey: DeviceSettingKeyEnum) {
+function onCancel(settingKey) {
deviceSetting.value[settingKey].popConfirm.visible = false;
}
-async function onConfirm(settingKey: DeviceSettingKeyEnum) {
+async function onConfirm(settingKey) {
deviceSetting.value[settingKey].popConfirm.loading = true;
const body = genDevicePropsBySettingKey(settingKey, deviceSettingFormModel.value);
await setDeviceProps(props.sn, body);
--
Gitblit v1.9.3