Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

代码提示弹窗表现异常,上下键无法正常选择 #84

Open
RanMaoting opened this issue Sep 4, 2024 · 0 comments
Open

代码提示弹窗表现异常,上下键无法正常选择 #84

RanMaoting opened this issue Sep 4, 2024 · 0 comments

Comments

@RanMaoting
Copy link

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

QQ202494-9649.mp4

Expected behavior
如视频所示,弹窗一直在变动,并且使用tab键有时候会无法在候选类名里面选中,上下键一样

Screenshots
If applicable, add screenshots to help explain your problem.

Environment
Plugin Version: 1.7.3
IDE Version: 2004.2.1
Unocss Version(in package.json): 0.62.3

Unocss Config:
(Share your uno.config.js/ts or vite config here)
import {
defineConfig,
presetAttributify,
presetMini,
presetUno,
transformerDirectives,
transformerVariantGroup,
} from 'unocss'

const getColorTheme = (maxCount: number, type: string) => {
const obj: Record<string, string> = {}
for (let i = 1; i <= maxCount; i++) {
obj[${i}] = var(--el-color-${type}-${i})
}
return obj
}

// https://github.com/unocss/unocss#readme
export default defineConfig({
presets: [presetMini({ dark: 'class' }), presetAttributify(), presetUno()],
transformers: [transformerDirectives(), transformerVariantGroup()],

content: {
pipeline: {
exclude: [${__dirname}/node_modules/**/*],
},
},
shortcuts: {
'wh-full': 'w-full h-full',
'flex-ac': 'flex justify-around items-center',
'flex-bc': 'flex justify-between items-center',
},
theme: {
colors: {
primary: {
default: 'var(--el-color-primary)',
light: {
...getColorTheme(9, 'primary-light'),
},
dark: {
...getColorTheme(9, 'primary-dark'),
},
},
warning: {
default: 'var(--el-color-warning)',
},
danger: {
default: 'var(--el-color-danger)',
},
info: {
default: 'var(--el-color-info)',
light: {
...getColorTheme(9, 'info-light'),
},
dark: {
...getColorTheme(9, 'info-dark'),
},
},
},
},
rules: [
['text-system', { color: 'var(--el-color-primary)' }],
['bg-system', { backgroundColor: 'var(--el-color-primary)' }],
[
/^(h|w|left|right|top|bottom)-reduce-((\d+(.\d+)?)|(.*?(px|rem|%)))$/,
([, key, d]) => {
const availableKey = key === 'h' ? 'height' : key === 'w' ? 'width' : key
const value = /(px|rem|%)/.test(d) ? d : ${+d / 4}rem
return { [availableKey]: calc(100% - ${value}) }
},
],
// @ts-ignore
// [/^h-reduce-(\d+(.\d+)?)$/, ([, d]) => ({ height: calc(100% - ${d / 4}rem) })],
],
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant