From 69ce010b7b65541d70d70c9c58a7656a2b4690a1 Mon Sep 17 00:00:00 2001 From: kamoa457 Date: Thu, 19 Oct 2023 02:38:44 +0700 Subject: [PATCH] update funtion --- db.json | 19 ++ package.json | 7 +- src/App.vue | 4 +- src/assets/dataJson/rooms.json | 67 +++++ src/assets/dataJson/users.json | 0 src/data.json | 19 ++ src/main.js | 10 +- src/views/Restroom/DetailRoomPage.vue | 93 +++++-- src/views/Restroom/RoomView.vue | 265 +++++++++++--------- src/views/Restroom/UpdateRoom.vue | 198 +++++++++------ src/views/RoomLayout/RoomLayoutView.vue | 92 ++++--- src/views/Users/UserlistView.vue | 306 ++++++++++++++++------- src/views/UtilitiesRoom/UtilitieView.vue | 38 ++- 13 files changed, 762 insertions(+), 356 deletions(-) create mode 100644 db.json create mode 100644 src/assets/dataJson/rooms.json create mode 100644 src/assets/dataJson/users.json create mode 100644 src/data.json diff --git a/db.json b/db.json new file mode 100644 index 0000000..d327a5a --- /dev/null +++ b/db.json @@ -0,0 +1,19 @@ +{ + "books": [ + { + "id": 1, + "title": "The Brothers Karamazov", + "author": "Fyodor Dostoevsky" + }, + { + "id": 2, + "title": "Infinite Jest", + "author": "David Foster Wallace" + }, + { + "id": 3, + "title": "Suttree", + "author": "Cormac McCarthy" + } + ] +} \ No newline at end of file diff --git a/package.json b/package.json index 79e21c0..32c93e4 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "name": "vue-material-kit-2", "version": "2.0.0", "scripts": { + "db:serve": " json-server --watch db.json --port=3002", "dev": "vite", "build": "vite build", "preview": "vite preview --port 4173", @@ -10,6 +11,7 @@ "dependencies": { "@popperjs/core": "2.11.5", "@trevoreyre/autocomplete-vue": "^2.4.1", + "axios": "^1.5.1", "bootstrap": "5.1.3", "pinia": "2.0.14", "prismjs": "1.28.0", @@ -18,7 +20,8 @@ "vue-clipboard3": "2.0.0", "vue-count-to": "1.0.13", "vue-prism-editor": "2.0.0-alpha.2", - "vue-router": "4.0.15" + "vue-router": "4.0.15", + "vue-select": "^4.0.0-beta.6" }, "devDependencies": { "@rushstack/eslint-patch": "1.1.0", @@ -29,6 +32,6 @@ "prettier": "2.5.1", "sass": "1.52.3", "sass-loader": "13.0.0", - "vite": "2.9.9" + "vite": "^2.9.16" } } diff --git a/src/App.vue b/src/App.vue index c22554b..96697c6 100644 --- a/src/App.vue +++ b/src/App.vue @@ -14,8 +14,10 @@ Coded by www.creative-tim.com * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. */ import { RouterView } from "vue-router"; -import 'vue-select/dist/vue-select.css'; +