mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-11-17 09:12:10 +08:00
perf(proxy): consolidate proxy data into a single IPC (#7542)
* feat(proxy): build deterministic proxy view * feat(proxy): expose ordered proxy view command * feat(proxy): add proxy view client contract * fix(lint): allow Node test files * feat(proxy): switch UI to ordered proxy view * fix(proxy): harden ordered proxy view consumers * fix(proxy): compare chain duplicates by current id * fix(proxy): release mihomo guard after fetch * fix(proxy): preserve semantic selections across refresh * fix(proxy): block global chain without GLOBAL * fix(proxy): handle proxy view edge states
This commit is contained in:
@@ -4,6 +4,15 @@ import { useRuntimeConfig } from '@/hooks/use-clash'
|
||||
import { useVerge } from '@/hooks/use-verge'
|
||||
import { useAppRefreshers, useProxiesData } from '@/providers/app-data-context'
|
||||
import delayManager from '@/services/delay'
|
||||
import {
|
||||
isInteractableMember,
|
||||
resolveMember,
|
||||
selectGlobalChainNodes,
|
||||
selectRuleChainMembers,
|
||||
type ProxyGroupView,
|
||||
type ProxyViewV1,
|
||||
type ResolvedProxyMember,
|
||||
} from '@/types/proxy-view'
|
||||
import { debugLog } from '@/utils/debug'
|
||||
|
||||
import { filterSort } from './use-filter-sort'
|
||||
@@ -14,386 +23,225 @@ import {
|
||||
} from './use-head-state'
|
||||
import { useWindowWidth } from './use-window-width'
|
||||
|
||||
// 定义代理项接口
|
||||
interface IProxyItem {
|
||||
name: string
|
||||
type: string
|
||||
udp: boolean
|
||||
xudp: boolean
|
||||
tfo: boolean
|
||||
mptcp: boolean
|
||||
smux: boolean
|
||||
history: {
|
||||
time: string
|
||||
delay: number
|
||||
}[]
|
||||
provider?: string
|
||||
testUrl?: string
|
||||
[key: string]: any // 添加索引签名以适应其他可能的属性
|
||||
export interface ResolvedMemberOccurrence {
|
||||
memberIndex: number
|
||||
member: ResolvedProxyMember
|
||||
}
|
||||
|
||||
// 代理组类型
|
||||
type ProxyGroup = {
|
||||
name: string
|
||||
type: string
|
||||
udp: boolean
|
||||
xudp: boolean
|
||||
tfo: boolean
|
||||
mptcp: boolean
|
||||
smux: boolean
|
||||
history: {
|
||||
time: string
|
||||
delay: number
|
||||
}[]
|
||||
now: string
|
||||
all: IProxyItem[]
|
||||
hidden?: boolean
|
||||
icon?: string
|
||||
testUrl?: string
|
||||
provider?: string
|
||||
}
|
||||
type ProxyGroup = ProxyGroupView
|
||||
|
||||
export interface IRenderItem {
|
||||
// 组 | head | item | empty | item col
|
||||
type: 0 | 1 | 2 | 3 | 4
|
||||
key: string
|
||||
group: ProxyGroup
|
||||
proxy?: IProxyItem
|
||||
member?: ResolvedMemberOccurrence
|
||||
memberCol?: ResolvedMemberOccurrence[]
|
||||
col?: number
|
||||
proxyCol?: IProxyItem[]
|
||||
headState?: HeadState
|
||||
// 新增支持图标和其他元数据
|
||||
icon?: string
|
||||
provider?: string
|
||||
testUrl?: string
|
||||
}
|
||||
|
||||
type GroupCache = {
|
||||
now: string
|
||||
all: IProxyItem[]
|
||||
now: string | undefined
|
||||
members: ProxyGroupView['members']
|
||||
headState: HeadState
|
||||
col: number
|
||||
latencyTimeout: number | undefined
|
||||
items: IRenderItem[]
|
||||
}
|
||||
|
||||
// 优化列布局计算
|
||||
type RuntimeConfigWithProxySequence = IConfigData & { proxies?: unknown }
|
||||
|
||||
const resolveOccurrences = (view: ProxyViewV1, group: ProxyGroupView) =>
|
||||
group.members.map((member, memberIndex) => ({
|
||||
memberIndex,
|
||||
member: resolveMember(view, member),
|
||||
}))
|
||||
|
||||
const memberKey = (
|
||||
group: ProxyGroupView,
|
||||
occurrence: ResolvedMemberOccurrence,
|
||||
) => {
|
||||
const { memberIndex, member } = occurrence
|
||||
const identity =
|
||||
member.kind === 'node' ? member.node.recordId : member.ref.name
|
||||
return `${group.name}:${memberIndex}:${identity}`
|
||||
}
|
||||
|
||||
const calculateColumns = (width: number, configCol: number): number => {
|
||||
if (configCol > 0 && configCol < 6) return configCol
|
||||
|
||||
if (width > 1920) return 5
|
||||
if (width > 1450) return 4
|
||||
if (width > 1024) return 3
|
||||
if (width > 900) return 2
|
||||
if (width >= 600) return 2
|
||||
return 1
|
||||
}
|
||||
|
||||
// 优化分组逻辑
|
||||
const groupProxies = <T = any>(list: T[], size: number): T[][] => {
|
||||
return list.reduce((acc, item) => {
|
||||
const groupOccurrences = <T>(list: T[], size: number): T[][] =>
|
||||
list.reduce<T[][]>((acc, item) => {
|
||||
const lastGroup = acc[acc.length - 1]
|
||||
if (!lastGroup || lastGroup.length >= size) {
|
||||
acc.push([item])
|
||||
} else {
|
||||
lastGroup.push(item)
|
||||
}
|
||||
if (!lastGroup || lastGroup.length >= size) acc.push([item])
|
||||
else lastGroup.push(item)
|
||||
return acc
|
||||
}, [] as T[][])
|
||||
}
|
||||
}, [])
|
||||
|
||||
const CHAIN_DELAY_GROUP = 'chain-mode'
|
||||
|
||||
const virtualGroup = (members: ProxyGroupView['members']): ProxyGroupView => ({
|
||||
name: CHAIN_DELAY_GROUP,
|
||||
type: 'Selector',
|
||||
alive: true,
|
||||
udp: false,
|
||||
xudp: false,
|
||||
tfo: false,
|
||||
mptcp: false,
|
||||
smux: false,
|
||||
history: [],
|
||||
members,
|
||||
})
|
||||
|
||||
export const useRenderList = (
|
||||
mode: string,
|
||||
isChainMode?: boolean,
|
||||
selectedGroup?: string | null,
|
||||
) => {
|
||||
// 使用全局数据提供者
|
||||
const { proxies: proxiesData } = useProxiesData()
|
||||
const { proxyView } = useProxiesData()
|
||||
const { refreshProxy } = useAppRefreshers()
|
||||
const { verge } = useVerge()
|
||||
const { width } = useWindowWidth()
|
||||
const [headStates, setHeadState] = useHeadStateNew()
|
||||
const latencyTimeout = verge?.default_latency_timeout
|
||||
|
||||
// 获取运行时配置用于链式代理模式
|
||||
const { data: runtimeConfig } = useRuntimeConfig(!!isChainMode)
|
||||
const runtimeProxies = (
|
||||
runtimeConfig as RuntimeConfigWithProxySequence | null
|
||||
)?.proxies
|
||||
|
||||
// 计算列数
|
||||
const col = useMemo(
|
||||
() => calculateColumns(width, verge?.proxy_layout_column || 6),
|
||||
[width, verge?.proxy_layout_column],
|
||||
)
|
||||
|
||||
// 确保代理数据加载
|
||||
useEffect(() => {
|
||||
if (!proxiesData) return
|
||||
const { groups, proxies } = proxiesData
|
||||
|
||||
if (
|
||||
(mode === 'rule' && !groups.length) ||
|
||||
(mode === 'global' && proxies.length < 2)
|
||||
) {
|
||||
const handle = setTimeout(() => refreshProxy(), 500)
|
||||
return () => clearTimeout(handle)
|
||||
const chainOccurrences = useMemo(() => {
|
||||
if (!proxyView || !isChainMode) return []
|
||||
if (mode === 'rule' && selectedGroup) {
|
||||
return selectRuleChainMembers(proxyView, selectedGroup)
|
||||
}
|
||||
}, [proxiesData, mode, refreshProxy])
|
||||
|
||||
// 链式代理模式节点自动计算延迟
|
||||
useEffect(() => {
|
||||
if (!isChainMode || !runtimeConfig) return
|
||||
|
||||
const allProxies: IProxyItem[] = Object.values(
|
||||
(runtimeConfig as any).proxies || {},
|
||||
if (!runtimeConfig) return []
|
||||
return selectGlobalChainNodes(proxyView, runtimeProxies).map(
|
||||
(node, memberIndex) => ({
|
||||
memberIndex,
|
||||
member: {
|
||||
kind: 'node' as const,
|
||||
ref: {
|
||||
kind: 'node' as const,
|
||||
name: node.name,
|
||||
recordId: node.recordId,
|
||||
},
|
||||
node,
|
||||
},
|
||||
}),
|
||||
)
|
||||
if (allProxies.length === 0) return
|
||||
}, [
|
||||
isChainMode,
|
||||
mode,
|
||||
proxyView,
|
||||
runtimeConfig,
|
||||
runtimeProxies,
|
||||
selectedGroup,
|
||||
])
|
||||
|
||||
// 设置组监听器,当有延迟更新时自动刷新
|
||||
const groupListener = () => {
|
||||
debugLog('[ChainMode] 延迟更新,刷新UI')
|
||||
refreshProxy()
|
||||
}
|
||||
const chainOccurrencesRef = useRef(chainOccurrences)
|
||||
chainOccurrencesRef.current = chainOccurrences
|
||||
const chainDelayGroup =
|
||||
mode === 'rule' && selectedGroup ? selectedGroup : CHAIN_DELAY_GROUP
|
||||
const chainDelayKey = chainOccurrences
|
||||
.map(({ member }) => {
|
||||
if (member.kind !== 'node') return `${member.kind}:${member.ref.name}`
|
||||
const source = member.node.source
|
||||
return source.kind === 'provider'
|
||||
? `provider:${source.providerName}:${source.proxyName}`
|
||||
: `core:${source.proxyName}`
|
||||
})
|
||||
.join('\u0000')
|
||||
|
||||
delayManager.setGroupListener('chain-mode', groupListener)
|
||||
useEffect(() => {
|
||||
if (!isChainMode || !chainDelayKey) return
|
||||
const interactable = chainOccurrencesRef.current
|
||||
.map(({ member }) => member)
|
||||
.filter(isInteractableMember)
|
||||
if (interactable.length === 0) return
|
||||
|
||||
const calculateDelays = async () => {
|
||||
try {
|
||||
const timeout = verge?.default_latency_timeout || 10000
|
||||
|
||||
debugLog(`[ChainMode] 开始计算 ${allProxies.length} 个节点的延迟`)
|
||||
|
||||
// 使用 delayManager 计算延迟,每个节点计算完成后会自动触发监听器刷新界面
|
||||
delayManager.checkListDelay(allProxies, 'chain-mode', timeout)
|
||||
} catch (error) {
|
||||
console.error('Failed to calculate delays for chain mode:', error)
|
||||
}
|
||||
}
|
||||
|
||||
// 延迟执行避免阻塞
|
||||
const handle = setTimeout(calculateDelays, 100)
|
||||
const handle = setTimeout(() => {
|
||||
const timeout = verge?.default_latency_timeout || 10000
|
||||
debugLog(`[ChainMode] 开始计算 ${interactable.length} 个节点的延迟`)
|
||||
void delayManager.checkListDelay(interactable, chainDelayGroup, timeout)
|
||||
}, 100)
|
||||
|
||||
return () => {
|
||||
clearTimeout(handle)
|
||||
// 清理组监听器
|
||||
delayManager.removeGroupListener('chain-mode')
|
||||
}
|
||||
}, [isChainMode, runtimeConfig, verge?.default_latency_timeout, refreshProxy])
|
||||
}, [
|
||||
chainDelayGroup,
|
||||
chainDelayKey,
|
||||
isChainMode,
|
||||
verge?.default_latency_timeout,
|
||||
])
|
||||
|
||||
const groupCacheRef = useRef<Map<string, GroupCache>>(new Map())
|
||||
const prevListRef = useRef<IRenderItem[]>([])
|
||||
|
||||
// 处理渲染列表
|
||||
const renderList: IRenderItem[] = useMemo(() => {
|
||||
if (!proxiesData) return []
|
||||
const renderList = useMemo<IRenderItem[]>(() => {
|
||||
if (!proxyView) return []
|
||||
|
||||
// 链式代理模式下,显示代理组和其节点
|
||||
if (isChainMode && runtimeConfig && mode === 'rule') {
|
||||
// 使用正常的规则模式代理组
|
||||
const allGroups = proxiesData.groups.length
|
||||
? proxiesData.groups
|
||||
: [proxiesData.global!]
|
||||
|
||||
// 如果选择了特定代理组,只显示该组的节点
|
||||
if (selectedGroup) {
|
||||
const targetGroup = allGroups.find((g: any) => g.name === selectedGroup)
|
||||
if (targetGroup) {
|
||||
const proxies = filterSort(
|
||||
targetGroup.all,
|
||||
targetGroup.name,
|
||||
'',
|
||||
0,
|
||||
latencyTimeout,
|
||||
)
|
||||
|
||||
if (col > 1) {
|
||||
return groupProxies(proxies, col).map((proxyCol, colIndex) => ({
|
||||
type: 4,
|
||||
key: `chain-col-${selectedGroup}-${colIndex}`,
|
||||
group: targetGroup,
|
||||
headState: DEFAULT_STATE,
|
||||
col,
|
||||
proxyCol,
|
||||
provider: proxyCol[0]?.provider,
|
||||
}))
|
||||
} else {
|
||||
return proxies.map((proxy) => ({
|
||||
type: 2,
|
||||
key: `chain-${selectedGroup}-${proxy!.name}`,
|
||||
group: targetGroup,
|
||||
proxy,
|
||||
headState: DEFAULT_STATE,
|
||||
provider: proxy.provider,
|
||||
}))
|
||||
}
|
||||
}
|
||||
return []
|
||||
}
|
||||
|
||||
// 如果没有选择特定组,显示第一个组的节点(如果有组的话)
|
||||
if (allGroups.length > 0) {
|
||||
const firstGroup = allGroups[0]
|
||||
const proxies = filterSort(
|
||||
firstGroup.all,
|
||||
firstGroup.name,
|
||||
'',
|
||||
0,
|
||||
latencyTimeout,
|
||||
)
|
||||
|
||||
if (col > 1) {
|
||||
return groupProxies(proxies, col).map((proxyCol, colIndex) => ({
|
||||
type: 4,
|
||||
key: `chain-col-first-${colIndex}`,
|
||||
group: firstGroup,
|
||||
headState: DEFAULT_STATE,
|
||||
col,
|
||||
proxyCol,
|
||||
provider: proxyCol[0]?.provider,
|
||||
}))
|
||||
} else {
|
||||
return proxies.map((proxy) => ({
|
||||
type: 2,
|
||||
key: `chain-first-${proxy!.name}`,
|
||||
group: firstGroup,
|
||||
proxy,
|
||||
headState: DEFAULT_STATE,
|
||||
provider: proxy.provider,
|
||||
}))
|
||||
}
|
||||
}
|
||||
|
||||
// 如果没有组,显示所有节点
|
||||
const allProxies: IProxyItem[] = allGroups.flatMap(
|
||||
(group: any) => group.all,
|
||||
if (isChainMode) {
|
||||
const selected =
|
||||
mode === 'rule'
|
||||
? proxyView.groups.find(({ name }) => name === selectedGroup)
|
||||
: undefined
|
||||
const group = selected ?? virtualGroup([])
|
||||
const occurrences = filterSort(
|
||||
chainOccurrences,
|
||||
selected?.name ?? CHAIN_DELAY_GROUP,
|
||||
'',
|
||||
0,
|
||||
latencyTimeout,
|
||||
)
|
||||
|
||||
// 为每个节点获取延迟信息
|
||||
const proxiesWithDelay = allProxies.map((proxy) => {
|
||||
const delay = delayManager.getDelay(proxy.name, 'chain-mode')
|
||||
return {
|
||||
...proxy,
|
||||
// 如果delayManager有延迟数据,更新history
|
||||
history:
|
||||
delay >= 0
|
||||
? [{ time: new Date().toISOString(), delay }]
|
||||
: proxy.history || [],
|
||||
}
|
||||
})
|
||||
|
||||
// 创建一个虚拟的组来容纳所有节点
|
||||
const virtualGroup: ProxyGroup = {
|
||||
name: 'All Proxies',
|
||||
type: 'Selector',
|
||||
udp: false,
|
||||
xudp: false,
|
||||
tfo: false,
|
||||
mptcp: false,
|
||||
smux: false,
|
||||
history: [],
|
||||
now: '',
|
||||
all: proxiesWithDelay,
|
||||
}
|
||||
|
||||
if (col > 1) {
|
||||
return groupProxies(proxiesWithDelay, col).map(
|
||||
(proxyCol, colIndex) => ({
|
||||
type: 4,
|
||||
key: `chain-col-all-${colIndex}`,
|
||||
group: virtualGroup,
|
||||
headState: DEFAULT_STATE,
|
||||
col,
|
||||
proxyCol,
|
||||
provider: proxyCol[0]?.provider,
|
||||
}),
|
||||
)
|
||||
} else {
|
||||
return proxiesWithDelay.map((proxy) => ({
|
||||
type: 2,
|
||||
key: `chain-all-${proxy.name}`,
|
||||
group: virtualGroup,
|
||||
proxy,
|
||||
return groupOccurrences(occurrences, col).map((memberCol) => ({
|
||||
type: 4,
|
||||
key: `chain-col:${memberKey(group, memberCol[0])}`,
|
||||
group,
|
||||
headState: DEFAULT_STATE,
|
||||
provider: proxy.provider,
|
||||
col,
|
||||
memberCol,
|
||||
}))
|
||||
}
|
||||
return occurrences.map((member) => ({
|
||||
type: 2,
|
||||
key: `chain:${memberKey(group, member)}`,
|
||||
group,
|
||||
member,
|
||||
headState: DEFAULT_STATE,
|
||||
}))
|
||||
}
|
||||
|
||||
// 链式代理模式下的其他模式(如global)仍显示所有节点
|
||||
if (isChainMode && runtimeConfig) {
|
||||
// 从运行时配置直接获取 proxies 列表 (需要类型断言)
|
||||
const allProxies: IProxyItem[] = Object.values(
|
||||
(runtimeConfig as any).proxies || {},
|
||||
)
|
||||
|
||||
// 为每个节点获取延迟信息
|
||||
const proxiesWithDelay = allProxies.map((proxy) => {
|
||||
const delay = delayManager.getDelay(proxy.name, 'chain-mode')
|
||||
return {
|
||||
...proxy,
|
||||
// 如果delayManager有延迟数据,更新history
|
||||
history:
|
||||
delay >= 0
|
||||
? [{ time: new Date().toISOString(), delay }]
|
||||
: proxy.history || [],
|
||||
}
|
||||
})
|
||||
|
||||
// 创建一个虚拟的组来容纳所有节点
|
||||
const virtualGroup: ProxyGroup = {
|
||||
name: 'All Proxies',
|
||||
type: 'Selector',
|
||||
udp: false,
|
||||
xudp: false,
|
||||
tfo: false,
|
||||
mptcp: false,
|
||||
smux: false,
|
||||
history: [],
|
||||
now: '',
|
||||
all: proxiesWithDelay,
|
||||
}
|
||||
|
||||
// 返回节点列表(不显示组头)
|
||||
if (col > 1) {
|
||||
return groupProxies(proxiesWithDelay, col).map(
|
||||
(proxyCol, colIndex) => ({
|
||||
type: 4,
|
||||
key: `chain-col-${colIndex}`,
|
||||
group: virtualGroup,
|
||||
headState: DEFAULT_STATE,
|
||||
col,
|
||||
proxyCol,
|
||||
provider: proxyCol[0]?.provider,
|
||||
}),
|
||||
)
|
||||
} else {
|
||||
return proxiesWithDelay.map((proxy) => ({
|
||||
type: 2,
|
||||
key: `chain-${proxy.name}`,
|
||||
group: virtualGroup,
|
||||
proxy,
|
||||
headState: DEFAULT_STATE,
|
||||
provider: proxy.provider,
|
||||
}))
|
||||
}
|
||||
}
|
||||
|
||||
// 正常模式的渲染逻辑
|
||||
const useRule = mode === 'rule' || mode === 'script'
|
||||
const renderGroups =
|
||||
useRule && proxiesData.groups.length
|
||||
? proxiesData.groups
|
||||
: [proxiesData.global!]
|
||||
|
||||
const renderGroups = useRule
|
||||
? proxyView.groups
|
||||
: proxyView.global === null
|
||||
? []
|
||||
: [proxyView.global]
|
||||
const cache = groupCacheRef.current
|
||||
let anyChanged = false
|
||||
|
||||
const retList = renderGroups.flatMap((group: ProxyGroup) => {
|
||||
const retList = renderGroups.flatMap((group) => {
|
||||
const headState = headStates[group.name] || DEFAULT_STATE
|
||||
const cached = cache.get(group.name)
|
||||
|
||||
if (
|
||||
cached &&
|
||||
cached.now === group.now &&
|
||||
cached.all === group.all &&
|
||||
cached.members === group.members &&
|
||||
cached.headState === headState &&
|
||||
cached.col === col &&
|
||||
cached.latencyTimeout === latencyTimeout
|
||||
@@ -413,9 +261,9 @@ export const useRenderList = (
|
||||
},
|
||||
]
|
||||
|
||||
if (headState?.open || !useRule) {
|
||||
const proxies = filterSort(
|
||||
group.all,
|
||||
if (headState.open || !useRule) {
|
||||
const occurrences = filterSort(
|
||||
resolveOccurrences(proxyView, group),
|
||||
group.name,
|
||||
headState.filterText,
|
||||
headState.sortType,
|
||||
@@ -426,45 +274,30 @@ export const useRenderList = (
|
||||
useRegularExpression: headState.filterUseRegularExpression,
|
||||
},
|
||||
)
|
||||
|
||||
// 全局模式下,添加组头
|
||||
if (!useRule) {
|
||||
ret.push({
|
||||
type: 1,
|
||||
key: `head-${group.name}`,
|
||||
group,
|
||||
headState,
|
||||
})
|
||||
ret.push({ type: 1, key: `head-${group.name}`, group, headState })
|
||||
}
|
||||
|
||||
if (!proxies.length) {
|
||||
ret.push({
|
||||
type: 3,
|
||||
key: `empty-${group.name}`,
|
||||
group,
|
||||
headState,
|
||||
})
|
||||
if (occurrences.length === 0) {
|
||||
ret.push({ type: 3, key: `empty-${group.name}`, group, headState })
|
||||
} else if (col > 1) {
|
||||
ret.push(
|
||||
...groupProxies(proxies, col).map((proxyCol, colIndex) => ({
|
||||
...groupOccurrences(occurrences, col).map((memberCol) => ({
|
||||
type: 4 as const,
|
||||
key: `col-${group.name}-${proxyCol[0].name}-${colIndex}`,
|
||||
key: `col:${memberKey(group, memberCol[0])}`,
|
||||
group,
|
||||
headState,
|
||||
col,
|
||||
proxyCol,
|
||||
provider: proxyCol[0].provider,
|
||||
memberCol,
|
||||
})),
|
||||
)
|
||||
} else {
|
||||
ret.push(
|
||||
...proxies.map((proxy) => ({
|
||||
...occurrences.map((member) => ({
|
||||
type: 2 as const,
|
||||
key: `${group.name}-${proxy!.name}`,
|
||||
key: memberKey(group, member),
|
||||
group,
|
||||
proxy,
|
||||
member,
|
||||
headState,
|
||||
provider: proxy.provider,
|
||||
})),
|
||||
)
|
||||
}
|
||||
@@ -472,7 +305,7 @@ export const useRenderList = (
|
||||
|
||||
cache.set(group.name, {
|
||||
now: group.now,
|
||||
all: group.all,
|
||||
members: group.members,
|
||||
headState,
|
||||
col,
|
||||
latencyTimeout,
|
||||
@@ -483,22 +316,21 @@ export const useRenderList = (
|
||||
|
||||
const filtered = !useRule
|
||||
? retList.slice(1)
|
||||
: retList.filter((item: IRenderItem) => !item.group.hidden)
|
||||
|
||||
: retList.filter((item) => !item.group.hidden)
|
||||
if (!anyChanged && prevListRef.current.length === filtered.length) {
|
||||
return prevListRef.current
|
||||
}
|
||||
prevListRef.current = filtered
|
||||
return filtered
|
||||
}, [
|
||||
headStates,
|
||||
proxiesData,
|
||||
mode,
|
||||
chainOccurrences,
|
||||
col,
|
||||
headStates,
|
||||
isChainMode,
|
||||
runtimeConfig,
|
||||
selectedGroup,
|
||||
latencyTimeout,
|
||||
mode,
|
||||
proxyView,
|
||||
selectedGroup,
|
||||
])
|
||||
|
||||
return {
|
||||
@@ -508,5 +340,3 @@ export const useRenderList = (
|
||||
currentColumns: col,
|
||||
}
|
||||
}
|
||||
|
||||
// 优化建议:如有大数据量,建议用虚拟滚动(已在 ProxyGroups 组件中实现),此处无需额外处理。
|
||||
|
||||
Reference in New Issue
Block a user