fix: 保留工作流列表返回状态

- 记录页码、分类和搜索条件并同步到路由

- 从工作流设计页返回时恢复原列表位置
This commit is contained in:
2026-07-31 09:51:21 +08:00
parent 615092f4f7
commit c2ed5a24a3
8 changed files with 386 additions and 9 deletions

View File

@@ -1,5 +1,5 @@
<script setup>
import { computed, ref } from 'vue';
import { computed, ref, watch } from 'vue';
import { ArrowDown, Search } from '@element-plus/icons-vue';
import {
@@ -31,6 +31,10 @@ const props = defineProps({
type: Number,
default: 3,
},
initialValue: {
type: String,
default: '',
},
searchPlaceholder: {
type: String,
default: $t('common.searchPlaceholder'),
@@ -39,7 +43,14 @@ const props = defineProps({
const emit = defineEmits(['search', 'buttonClick', 'reset']);
const searchValue = ref('');
const searchValue = ref(props.initialValue);
watch(
() => props.initialValue,
(value) => {
searchValue.value = value;
},
);
const filterButtonsByPermission = (buttons) => {
return buttons.filter((button) => {