From cb48add95a233bb950dc3e7bc3cf02cc1cccd934 Mon Sep 17 00:00:00 2001 From: haoxuan <haoxuan> Date: 星期一, 06 十一月 2023 17:56:35 +0800 Subject: [PATCH] Merge branch 'dev' of http://192.168.5.5:10010/r/web/bulletin-board-style1 into wn --- src/stores/tasks.ts | 30 ++++++++---------------------- 1 files changed, 8 insertions(+), 22 deletions(-) diff --git a/src/stores/tasks.ts b/src/stores/tasks.ts index 92035a0..e115738 100644 --- a/src/stores/tasks.ts +++ b/src/stores/tasks.ts @@ -77,10 +77,14 @@ /** * 鍒锋柊鎵�鏈夋暟鎹� */ - function reload(channel: number) { + function reloadChannel(channel: number) { getChannels(currentType.value).then(() => { autoSelectTask(channel) }) + } + + function reloadAllData() { + getChannels(currentType.value) } function moreChannelTasksBtn(channelNumber: number) { @@ -123,33 +127,15 @@ activeTask.value = task } - const requestParamsMap = ref<{ - [channel: number]: TaskListParams - }>({}) - function getParamsByChannel(channel: number) { - return ( - requestParamsMap.value[channel] ?? { - type: 1, - offset: 0, - limit: 3 - } - ) - } - - function setParamsByChannel(channel: number, params: TaskListParams) { - requestParamsMap.value[channel] = params - } return { channels, getChannels, moreBtnStatus, activeTask, - reload, + reloadChannel, setActiveTask, - requestParamsMap, - getParamsByChannel, - setParamsByChannel, moreChannelTasksBtn, - foldChannelTasksBtn + foldChannelTasksBtn, + reloadAllData } }) -- Gitblit v1.8.0