mirror of
https://github.com/yangzongzhuan/RuoYi-App.git
synced 2025-09-28 07:02:40 +00:00
使用Pinia代替Vuex进行数据存储
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import store from '@/store'
|
||||
import { useUserStore } from '@/store'
|
||||
import { ref, computed , getCurrentInstance } from "vue"
|
||||
|
||||
const { proxy } = getCurrentInstance()
|
||||
@@ -51,7 +51,7 @@
|
||||
|
||||
function handleLogout() {
|
||||
proxy.$modal.confirm('确定注销并退出系统吗?').then(() => {
|
||||
store.dispatch('LogOut').then(() => {}).finally(()=>{
|
||||
useUserStore().logOut().then(() => {}).finally(()=>{
|
||||
proxy.$tab.reLaunch('/pages/index')
|
||||
})
|
||||
})
|
||||
|
Reference in New Issue
Block a user