Skip to content

Commit

Permalink
mjjh1717#29 房间列表缩进保存之本地存储
Browse files Browse the repository at this point in the history
  • Loading branch information
fuyapeng123456 committed Aug 7, 2023
1 parent 3c59393 commit 2c1e5dc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/views/page-main/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import api from './api'
import type { CellConfigResponse, CellConfigVO, CellImageVO, CellImgResponse, CellResponse, CellVO, RoomListVO, RoomResponse, addRoomVo } from './types/types'
import { useCRUD } from '@/components/index.js'
import { useRoomStore } from '@/store'
import { setLocal } from '~/src/utils'
import { setLocal, getLocal } from '~/src/utils'
withDefaults(defineProps<Props>(), {
cellType: 'allCell',
Expand All @@ -30,6 +30,7 @@ const cellMenuList = ref<undefined | RoomListVO[]>([])
const isActiveCell = ref(1)
// 是否收起侧边栏
const isPackUp = ref(true)
isPackUp.value = !!getLocal('isPackUp')
const searchValue = ref(undefined)
// 函数1 获取列表数据函数
Expand Down Expand Up @@ -192,6 +193,7 @@ function prev() {
// 侧边栏显示隐藏
function onChangeIsPackUp() {
isPackUp.value = !isPackUp.value
setLocal('isPackUp', isPackUp.value)
}
async function getCellList() {
Expand Down

0 comments on commit 2c1e5dc

Please sign in to comment.