From b829dd154edc8fa4b3c5e7a3465f96a5fde36fd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B0=B4=E6=99=B6=E5=9C=9F=E8=B1=86?= <水晶土豆@devide> Date: Thu, 23 Nov 2023 17:28:54 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B6=85=E6=97=B6=E5=8A=A0=E8=BD=BD=E5=8A=A8?= =?UTF-8?q?=E7=94=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 17 +-- src/component/humanResources/emp.vue | 42 +++++-- .../animation/animation1.vue | 28 +++++ .../loadingComponents/loadingComponents.vue | 119 ++++++++++-------- src/main.js | 3 +- src/storage/promiseStorage.js | 17 +++ 6 files changed, 143 insertions(+), 83 deletions(-) create mode 100644 src/component/loadingComponents/animation/animation1.vue create mode 100644 src/storage/promiseStorage.js diff --git a/src/App.vue b/src/App.vue index ceb45d7..7c66782 100644 --- a/src/App.vue +++ b/src/App.vue @@ -7,21 +7,7 @@ import departments from './component/humanResources/department.vue' import jobTitle from './component/humanResources/jobTitle.vue'; import empss from './component/humanResources/emp.vue'; import verticalTable from './component/main/verticalTable/verticalTable.vue'; -import loadingComponents from './component/loadingComponents/loadingComponents.vue'; -import { provide, ref, watch } from 'vue'; -const size = ref({ - offsetWidth: 1, - offsetHeight: 1, - offsetLeft: 1, - offsetTop: 1 -}); -watch(() => size.value.offsetHeight, (res) => { - console.log(size.value.offsetWidth); - console.log(size.value.offsetHeight); - console.log(size.value.offsetLeft); - console.log(size.value.offsetTop); -}) -provide('size', size); + \ No newline at end of file diff --git a/src/component/loadingComponents/animation/animation1.vue b/src/component/loadingComponents/animation/animation1.vue new file mode 100644 index 0000000..39de219 --- /dev/null +++ b/src/component/loadingComponents/animation/animation1.vue @@ -0,0 +1,28 @@ + + + + + \ No newline at end of file diff --git a/src/component/loadingComponents/loadingComponents.vue b/src/component/loadingComponents/loadingComponents.vue index 0f224dd..90d8c5d 100644 --- a/src/component/loadingComponents/loadingComponents.vue +++ b/src/component/loadingComponents/loadingComponents.vue @@ -1,37 +1,64 @@ \ No newline at end of file diff --git a/src/main.js b/src/main.js index 6a10b59..7bcae08 100644 --- a/src/main.js +++ b/src/main.js @@ -7,10 +7,9 @@ import zhCn from 'element-plus/dist/locale/zh-cn.mjs' import { createPinia } from 'pinia' -const pinia = createPinia() const app = createApp(App); app.use(router); -app.use(pinia); +app.use(createPinia()); app.use(ElementPlus, { locale: zhCn, }); diff --git a/src/storage/promiseStorage.js b/src/storage/promiseStorage.js new file mode 100644 index 0000000..31c9b04 --- /dev/null +++ b/src/storage/promiseStorage.js @@ -0,0 +1,17 @@ +import { defineStore } from "pinia"; + +export const usePromiseStore = defineStore('promise', { + state() { + return { + sendRequestFirst:'' + }; + }, + actions: { + setSendRequestFirst(sendRequestFirst){ + this.sendRequestFirst = sendRequestFirst; + }, + getSendRequestFirst(){ + return this.sendRequestFirst; + } + } +}); \ No newline at end of file -- GitLab