perf: add binary suffix to binary keys in tree list
This commit is contained in:
parent
a71f5e0070
commit
23087a5374
|
@ -90,6 +90,7 @@ defineExpose({
|
|||
v-model:value="inputData.filter"
|
||||
:placeholder="$t('interface.filter')"
|
||||
:size="props.small ? 'small' : ''"
|
||||
:theme-overrides="{ paddingSmall: '0 3px', paddingMedium: '0 6px' }"
|
||||
clearable
|
||||
@clear="onClearFilter"
|
||||
@input="onInput"
|
||||
|
|
|
@ -367,13 +367,7 @@ const renderPrefix = ({ option }) => {
|
|||
|
||||
case ConnectionType.RedisValue:
|
||||
if (prefStore.keyIconType === typesIconStyle.ICON) {
|
||||
return h(
|
||||
NIcon,
|
||||
{ size: 20 },
|
||||
{
|
||||
default: () => h(!!option.redisKeyCode ? Binary : Key),
|
||||
},
|
||||
)
|
||||
return h(NIcon, { size: 20 }, () => h(Key))
|
||||
}
|
||||
const loading = isEmpty(option.redisType) || option.redisType === 'loading'
|
||||
if (loading) {
|
||||
|
@ -506,10 +500,8 @@ const calcValueMenu = () => {
|
|||
|
||||
// render menu function icon
|
||||
const renderSuffix = ({ option }) => {
|
||||
if (
|
||||
(option.type === ConnectionType.RedisDB && option.opened) ||
|
||||
(includes(selectedKeys.value, option.key) && !props.checkMode)
|
||||
) {
|
||||
const selected = includes(selectedKeys.value, option.key)
|
||||
if (selected && !props.checkMode) {
|
||||
switch (option.type) {
|
||||
case ConnectionType.RedisDB:
|
||||
return renderIconMenu(calcDBMenu(option.opened, option.loading, option.fullLoaded))
|
||||
|
@ -518,6 +510,9 @@ const renderSuffix = ({ option }) => {
|
|||
case ConnectionType.RedisValue:
|
||||
return renderIconMenu(calcValueMenu())
|
||||
}
|
||||
} else if (!selected && !!option.redisKeyCode && option.type === ConnectionType.RedisValue) {
|
||||
// render binary icon
|
||||
return renderIconMenu(h(NIcon, { size: 20 }, () => h(Binary)))
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ export const themeOverrides = {
|
|||
paddingMedium: '0 12px',
|
||||
},
|
||||
Tag: {
|
||||
// borderRadius: '3px'
|
||||
borderRadius: '4px',
|
||||
heightLarge: '32px',
|
||||
},
|
||||
Input: {
|
||||
|
|
Loading…
Reference in New Issue