mirror of
https://github.com/yangzongzhuan/RuoYi-App.git
synced 2025-09-27 22:52:40 +00:00
使用Pinia代替Vuex进行数据存储
This commit is contained in:
@@ -77,13 +77,12 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import store from '@/store'
|
||||
import { useUserStore } from '@/store'
|
||||
import { computed , getCurrentInstance } from "vue"
|
||||
|
||||
const { proxy } = getCurrentInstance()
|
||||
const name = store.state.user.name
|
||||
const version= getApp().globalData.config.appInfo.version
|
||||
const avatar = computed(() => store.state.user.avatar)
|
||||
const name = useUserStore().name
|
||||
const avatar = computed(() => useUserStore().avatar)
|
||||
const windowHeight = computed(() => uni.getSystemInfoSync().windowHeight - 50)
|
||||
|
||||
function handleToInfo() {
|
||||
|
Reference in New Issue
Block a user