Procházet zdrojové kódy

fix : 分页点了没反应

刘洋 před 2 roky
rodič
revize
d4d1df9d72
3 změnil soubory, kde provedl 8 přidání a 6 odebrání
  1. 3 3
      electron/main/main.ts
  2. 2 2
      server.config.ts
  3. 3 1
      src/hooks/useTable.ts

+ 3 - 3
electron/main/main.ts

@@ -24,13 +24,13 @@ async function createWindow() {
   loadingView.loadFile(resolve(__dirname, 'loading.html'))
   const mainWin = new BrowserWindow({
     show: false,
-    width: 1680,
-    height: 880,
+    width: 1500,
+    height: 850,
     frame: false,
     center: true,
     icon: path.join(__dirname, './icons/icon.png'),
     resizable: false,
-    fullscreen: true,
+    fullscreen: app.isPackaged ? true : false,
     fullscreenable: true,
     alwaysOnTop: false,
     useContentSize: true,

+ 2 - 2
server.config.ts

@@ -3,8 +3,8 @@ import type { ServerOptions } from 'vite'
 const server: ServerOptions = {
   proxy: {
     '^/?(api|file)/': {
-      target: 'http://192.168.10.41:8200',
-      // target: 'http://cet-test.markingtool.cn',
+      // target: 'http://192.168.10.41:8200',
+      target: 'http://cet-test.markingtool.cn',
       // target: 'http://cet-dev.markingtool.cn:8200',
     },
   },

+ 3 - 1
src/hooks/useTable.ts

@@ -82,7 +82,9 @@ const useTable = <
       baseParams.pageNumber = n
     },
   })
-
+  watch(currentPage, (val) => {
+    fetchTable()
+  })
   const payload = computed(() => {
     return Object.assign({}, multipleType ? baseParams : {}, additional || {}) as ExtractApiParams<T>
   })