From d01a491c22828b41014800894f2525d4e13e2a04 Mon Sep 17 00:00:00 2001 From: callmeyan Date: Thu, 8 Dec 2022 17:17:18 +0800 Subject: [PATCH] =?UTF-8?q?feat=20=E6=B7=BB=E5=8A=A0=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin-fe/package.json | 5 +- admin-fe/src/components/button/Index.vue | 94 +++++++++ admin-fe/src/components/icon/Loading.vue | 18 ++ admin-fe/src/components/input/input.vue | 195 +++++++++--------- admin-fe/src/components/modal/modal.vue | 10 +- admin-fe/src/components/uploader/uploader.vue | 17 +- admin-fe/src/service/store.ts | 1 - admin-fe/src/views/Login.vue | 2 +- admin-fe/src/views/goods/index.vue | 14 +- admin-fe/src/views/layout/AdminLayout.vue | 24 ++- admin-fe/tsconfig.json | 5 +- admin-fe/vite.config.js | 2 + admin-fe/yarn.lock | 170 ++++++++++++++- .../controller/admin/UserAdminController.java | 2 +- 14 files changed, 436 insertions(+), 123 deletions(-) create mode 100644 admin-fe/src/components/button/Index.vue create mode 100644 admin-fe/src/components/icon/Loading.vue diff --git a/admin-fe/package.json b/admin-fe/package.json index 051fd3f..ae2f49d 100644 --- a/admin-fe/package.json +++ b/admin-fe/package.json @@ -20,9 +20,10 @@ "@types/node": "^18.11.10", "@vitejs/plugin-vue": "^3.2.0", "@vitejs/plugin-vue-jsx": "^2.1.1", - "typescript": "^4.9.3", - "vite": "^3.2.4", "less": "^4.1.3", + "typescript": "^4.9.3", + "unplugin-vue-define-options": "^1.0.0", + "vite": "^3.2.4", "vue-tsc": "^1.0.11" } } diff --git a/admin-fe/src/components/button/Index.vue b/admin-fe/src/components/button/Index.vue new file mode 100644 index 0000000..d8bdfa0 --- /dev/null +++ b/admin-fe/src/components/button/Index.vue @@ -0,0 +1,94 @@ + + + + + \ No newline at end of file diff --git a/admin-fe/src/components/icon/Loading.vue b/admin-fe/src/components/icon/Loading.vue new file mode 100644 index 0000000..424a154 --- /dev/null +++ b/admin-fe/src/components/icon/Loading.vue @@ -0,0 +1,18 @@ + + + \ 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 a21b59a..9e6b9a1 100644 --- a/admin-fe/src/components/input/input.vue +++ b/admin-fe/src/components/input/input.vue @@ -24,144 +24,145 @@ import Eye from "../icon/Eye.vue"; import EyeClose from "../icon/EyeClose.vue"; interface PInputEvents { - 'update:modelValue': (value: any) => void + 'update:modelValue': (value: any) => void } type PInputProps = { - placeholder?: string - modelValue?: any - type?: 'text' | 'password' | 'textarea' + placeholder?: string + modelValue?: any + type?: 'text' | 'password' | 'textarea' } const props = defineProps() const emit = defineEmits() const slots = useSlots() const state = reactive({ - focus: false, - hover: false, - passwordVisible: false + focus: false, + hover: false, + passwordVisible: false }) const inputType = computed(() => { - const type = props.type || 'text'; - if (type === 'password' && state.passwordVisible) return 'text'; - return type; + const type = props.type || 'text'; + if (type === 'password' && state.passwordVisible) return 'text'; + return type; }) const value = computed({ - get() { - return props.modelValue - }, - set(value) { - emit('update:modelValue', value) - } + get() { + return props.modelValue + }, + set(value) { + emit('update:modelValue', value) + } }) \ No newline at end of file diff --git a/admin-fe/src/components/modal/modal.vue b/admin-fe/src/components/modal/modal.vue index 73fe993..67a02e8 100644 --- a/admin-fe/src/components/modal/modal.vue +++ b/admin-fe/src/components/modal/modal.vue @@ -1,7 +1,9 @@