bill 2 tahun lalu
induk
melakukan
741ee55523
2 mengubah file dengan 11 tambahan dan 5 penghapusan
  1. 3 3
      src/main.ts
  2. 8 2
      src/views/graphic/header.vue

+ 3 - 3
src/main.ts

@@ -1,9 +1,9 @@
 import VConsole from "vconsole";
 import { useParams } from "@/hook/useParams";
 
-// if (useParams().console === "true") {
-new VConsole();
-// }
+if (useParams().console === "true") {
+  new VConsole();
+}
 
 import "@/assets/theme.editor.scss";
 import "@/assets/public.scss";

+ 8 - 2
src/views/graphic/header.vue

@@ -198,6 +198,7 @@ const saveStore = genUseLoading(async () => {
       Message.success(`已保存至相册`);
     });
   }
+  return newData;
 });
 
 const saveHandler = async () => {
@@ -228,10 +229,15 @@ const saveHandler = async () => {
 };
 
 const createTable = async () => {
-  await saveStore();
+  const data = await saveStore();
+  await router.replace({
+    name: writeRouteName.graphic,
+    params: { mode: Mode.Road, id: data.id, action: "update" },
+  });
+
   await router.push({
     name: writeRouteName.tabulation,
-    params: { id: data.value.id },
+    params: { id: data.id },
   });
 };
 </script>