diff --git a/admin-fe/src/assets/app.css b/admin-fe/src/assets/app.less
similarity index 78%
rename from admin-fe/src/assets/app.css
rename to admin-fe/src/assets/app.less
index 7e78338..17da478 100644
--- a/admin-fe/src/assets/app.css
+++ b/admin-fe/src/assets/app.less
@@ -119,14 +119,46 @@ body {
.pointer-cursor {
cursor: pointer;
}
-table{
- width: 100%;
- border-left: solid 1px #eee;
- border-top: solid 1px #eee;
- border-collapse: collapse;
+
+.table-wrapper {
+ .table-toolbar{
+ display: flex;
+ justify-content: space-between;
+ margin-bottom: 20px;
+ }
+ table {
+ width: 100%;
+ border-left: solid 1px #eee;
+ border-top: solid 1px #eee;
+ border-collapse: collapse;
+ }
+
+ td, th {
+ border-right: solid 1px #eee;
+ border-bottom: solid 1px #eee;
+ padding: 6px;
+ }
}
-td,th {
- border-right: solid 1px #eee;
- border-bottom: solid 1px #eee;
- padding:6px;
+
+.page-wrapper {
+ margin: 20px 0;
+
+ .page-item {
+ cursor: pointer;
+ border: solid 1px var(--primary-2);
+ border-radius: var(--border-radius-middle);
+ display: inline-block;
+ padding: 4px 10px;
+ margin: 0 5px;
+ min-width: 40px;
+ text-align: center;
+
+ &:hover, &.current-page {
+ border-color: var(--primary-color);
+ color: var(--primary-color)
+ }
+ }
+}
+.display-flex{
+ display: flex;
}
\ No newline at end of file
diff --git a/admin-fe/src/components/input/input.vue b/admin-fe/src/components/input/input.vue
index 1c60bda..a21b59a 100644
--- a/admin-fe/src/components/input/input.vue
+++ b/admin-fe/src/components/input/input.vue
@@ -24,12 +24,12 @@ import Eye from "../icon/Eye.vue";
import EyeClose from "../icon/EyeClose.vue";
interface PInputEvents {
- 'update:modelValue': (value: string) => void
+ 'update:modelValue': (value: any) => void
}
type PInputProps = {
placeholder?: string
- modelValue?: string
+ modelValue?: any
type?: 'text' | 'password' | 'textarea'
}
diff --git a/admin-fe/src/components/pager/Pager.vue b/admin-fe/src/components/pager/Pager.vue
index a69b55a..0eef26b 100644
--- a/admin-fe/src/components/pager/Pager.vue
+++ b/admin-fe/src/components/pager/Pager.vue
@@ -76,26 +76,4 @@ export default defineComponent({
}
}
})
-
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/admin-fe/src/components/uploader/index.ts b/admin-fe/src/components/uploader/index.ts
new file mode 100644
index 0000000..e69de29
diff --git a/admin-fe/src/components/uploader/uploader.vue b/admin-fe/src/components/uploader/uploader.vue
new file mode 100644
index 0000000..fdb2560
--- /dev/null
+++ b/admin-fe/src/components/uploader/uploader.vue
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/admin-fe/src/main.ts b/admin-fe/src/main.ts
index 0eced11..e88e7c5 100644
--- a/admin-fe/src/main.ts
+++ b/admin-fe/src/main.ts
@@ -4,7 +4,7 @@ import {createPinia} from 'pinia'
import App from './App.vue'
import router from './router'
import {httpConfig} from "./util/http";
-import './assets/app.css'
+import './assets/app.less'
import PInput from "./components/input";
httpConfig.baseURL = "http://localhost:8080"
diff --git a/admin-fe/src/util/http.ts b/admin-fe/src/util/http.ts
index eab5be4..4a391e3 100644
--- a/admin-fe/src/util/http.ts
+++ b/admin-fe/src/util/http.ts
@@ -7,7 +7,7 @@ export type HttpMethod = 'get' | 'post' | 'delete' | 'put'
export enum RequestDataContentType {
JSON = 'application/json;charset=UTF-8',
FORM = 'application/x-www-form-urlencoded;charset=UTF-8',
- FORM_DATA = 'multipart/form-data;charset=UTF-8',
+ FORM_DATA = 'multipart/form-data',
}
export const httpConfig = {
@@ -68,7 +68,9 @@ class Http {
*/
request(url: string, data: any = null, method: HttpMethod = 'post', type: 'normal' | 'form' = 'normal') {
return new Promise((resolve, reject) => {
- let contentType = RequestDataContentType.FORM;
+ const headers: any = {
+ 'Content-Type': RequestDataContentType.FORM
+ }
if (data) {
if (type === 'form') {
const form = new FormData();
@@ -76,12 +78,13 @@ class Http {
form.append(key, data[key]);
}
data = form; // 将data有{} => formData
- contentType = RequestDataContentType.FORM_DATA; // 由于使用formData
+ // contentType = RequestDataContentType.FORM_DATA; // 由于使用formData
+ delete headers['Content-Type'];
method = 'post';
- } else if (method == 'post') {
+ } else if (method == 'post' || method == 'put') {
// 将数据对象 转成json
data = JSON.stringify(data);
- contentType = RequestDataContentType.JSON;
+ headers['Content-Type'] = RequestDataContentType.JSON;
} else {
// 装对象转成 key=value&key=value
const params = [];
@@ -92,10 +95,6 @@ class Http {
url += '?' + params.join('&')
}
}
-
- const headers: any = {
- 'Content-Type': contentType
- }
const token = useUserStore().token();
if (token) headers.token = token
fetch(httpConfig.baseURL + url, {
diff --git a/admin-fe/src/views/goods/index.vue b/admin-fe/src/views/goods/index.vue
index a385e9c..d9b880c 100644
--- a/admin-fe/src/views/goods/index.vue
+++ b/admin-fe/src/views/goods/index.vue
@@ -1,16 +1,21 @@
-