Commit 138d535e by GoldenZqqq

fix: 发起流程页面-进入页面时左侧第一个分类没有active样式bug修复

parent 7b8e4ea2
...@@ -137,12 +137,6 @@ const getCategoryList = async () => { ...@@ -137,12 +137,6 @@ const getCategoryList = async () => {
try { try {
// 流程分类 // 流程分类
categoryList.value = await CategoryApi.getCategorySimpleList() categoryList.value = await CategoryApi.getCategorySimpleList()
// 等待流程定义数据加载完成后再设置默认选中分类
await nextTick()
// 选中第一个有流程的分类
if (availableCategories.value.length > 0) {
categoryActive.value = availableCategories.value[0]
}
} finally { } finally {
} }
} }
...@@ -156,6 +150,11 @@ const getProcessDefinitionList = async () => { ...@@ -156,6 +150,11 @@ const getProcessDefinitionList = async () => {
}) })
// 初始化过滤列表为全部流程定义 // 初始化过滤列表为全部流程定义
filteredProcessDefinitionList.value = processDefinitionList.value filteredProcessDefinitionList.value = processDefinitionList.value
// 在获取完所有数据后,设置第一个有效分类为激活状态
if (availableCategories.value.length > 0 && !categoryActive.value?.code) {
categoryActive.value = availableCategories.value[0]
}
} finally { } finally {
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment