diff --git a/admin/package.json b/admin/package.json index 67accf3..bba7a43 100644 --- a/admin/package.json +++ b/admin/package.json @@ -6,7 +6,8 @@ "scripts": { "dev": "vite", "build": "vite build", - "preview": "vite preview" + "preview": "vite preview", + "postbuild": "scp -r ./dist/* root@207.148.89.145:/www/wwwroot/prodio.zltest.com.tw/public/admin" }, "dependencies": { "@ckeditor/ckeditor5-vue": "^5.1.0", diff --git a/admin/src/api/product.js b/admin/src/api/product.js index 18f0a88..04090f2 100644 --- a/admin/src/api/product.js +++ b/admin/src/api/product.js @@ -1,7 +1,8 @@ import ajax from "@/utils/request"; -export const getProductList = async () => - ajax(`/product/getProductList`, "GET"); +export const getProductList = async (params) => { + return ajax(`/product/getProductList`, "POST", params); +} export const getProduct = async (id) => ajax(`/product/getProduct`, "GET" , { id }); diff --git a/admin/src/main.js b/admin/src/main.js index 3374841..4ae0ecb 100644 --- a/admin/src/main.js +++ b/admin/src/main.js @@ -6,9 +6,19 @@ import CKEditor from '@ckeditor/ckeditor5-vue'; import "./assets/css/normalize.css"; import "./assets/css/common.less"; - + const app = createApp(App); +app.directive('focus', { + // 將el-input的下的input元素聚焦 + + mounted(el) { + const inputElement = el.querySelector('input'); + // Focus the element + inputElement.focus() + } +}) + app.use(router); app.use(store); app.use(CKEditor); diff --git a/admin/src/pages/Contact/email/Index.vue b/admin/src/pages/Contact/email/Index.vue index af94ec0..4e2f228 100644 --- a/admin/src/pages/Contact/email/Index.vue +++ b/admin/src/pages/Contact/email/Index.vue @@ -104,7 +104,7 @@ const handleShowContent = (row) => { - + --> - - + + + + + + + + diff --git a/admin/src/pages/News/activity/Index.vue b/admin/src/pages/News/activity/Index.vue index ea31523..a020e88 100644 --- a/admin/src/pages/News/activity/Index.vue +++ b/admin/src/pages/News/activity/Index.vue @@ -108,8 +108,8 @@ const handleCloseFormDraw = (val) => { @@ -140,8 +140,10 @@ const handleCloseFormDraw = (val) => { - - + + + +