fix: key scan 使用 app store 的 scanCount 设置替代硬编码 100
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import { defineStore } from 'pinia'
|
import { defineStore } from 'pinia'
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
|
import { useAppStore } from './app'
|
||||||
|
|
||||||
export interface KeyItem {
|
export interface KeyItem {
|
||||||
name: string
|
name: string
|
||||||
@@ -92,7 +93,7 @@ export const useKeyStore = defineStore('key', () => {
|
|||||||
loading.value = true
|
loading.value = true
|
||||||
try {
|
try {
|
||||||
const result: ScanResult = await window.electronAPI.redis.scanKeys(
|
const result: ScanResult = await window.electronAPI.redis.scanKeys(
|
||||||
connId, cursor, pattern.value, 100
|
connId, cursor, pattern.value, useAppStore().scanCount
|
||||||
)
|
)
|
||||||
const newKeys = result.keys.map(k => ({
|
const newKeys = result.keys.map(k => ({
|
||||||
name: k,
|
name: k,
|
||||||
|
|||||||
Reference in New Issue
Block a user