@@ -643,4 +643,8 @@
.t-popup{
box-shadow: 0px 9px 28px 8px rgba(8,11,15,0.12), 0px 6px 16px 0px rgba(8,11,15,0.20), 0px 3px 6px -4px rgba(8,11,15,0.26);
+}
+
+.t-loading__overlay {
+ background-color: rgba(0, 0, 0, 0.45);
}
@@ -1098,7 +1098,7 @@ import {
DragDropIcon
} from 'tdesign-icons-vue-next';
import { typeOptions } from '@/services/common';
-import { MessagePlugin } from 'tdesign-vue-next';
+import { LoadingPlugin, MessagePlugin } from 'tdesign-vue-next';
import { Pen, deepClone } from '@meta2d/core';
import { useDot } from '@/services/common';
import { cdn } from '@/services/api';
@@ -1267,9 +1267,21 @@ const onOkIot = () => {
};
const onShowIot = async () => {
- await getIotTree();
- getCheckedIots();
- iotDialog.value.show = true;
+ LoadingPlugin(true);
+ try {
+ await getIotTree();
+ getCheckedIots();
+ iotDialog.value.show = true;
+ } catch (err) {
+ if (err instanceof Error) {
+ MessagePlugin.error(err.message);
+ }
+ console.error(err);
+ } finally {
+ LoadingPlugin(false);
const iots = ref([]);