Ver código fonte

myapp优化恢复默认没效果问题

Signed-off-by: 公司职务微信QQ领英 <7730191+oaimisgnay@user.noreply.gitee.com>
公司职务微信QQ领英 1 ano atrás
pai
commit
a4ff97a398
1 arquivos alterados com 2 adições e 2 exclusões
  1. 2 2
      Web/src/views/home/widgets/index.vue

+ 2 - 2
Web/src/views/home/widgets/index.vue

@@ -117,7 +117,7 @@ interface Grid {
 	layout: number[];
 	copmsList: string[][];
 }
-const defaultGrid = reactive<Grid>({
+const defaultGrid = ({
 	layout: [12, 6, 6],
 	copmsList: [['welcome'], ['about', 'ver'], ['timeing', 'progressing']],
 });
@@ -125,7 +125,7 @@ const defaultGrid = reactive<Grid>({
 const customizing = ref<boolean>(false);
 const allCompsList = ref(allComps);
 const widgetsRef = ref<HTMLElement | null>(null);
-const grid = ref<Grid>(defaultGrid);
+const grid = ref<Grid>({ ...defaultGrid });
 
 onMounted(() => {
 	const savedGrid = Local.get('grid');