Skip to content
New issue

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

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

Already on GitHub? # to your account

code mirror 支持 jsx css 代码补全 #198

Merged
merged 4 commits into from
Aug 16, 2024

Conversation

BoBoooooo
Copy link
Contributor

@BoBoooooo BoBoooooo commented Aug 12, 2024

效果

触发方式

  • css 属性名,直接输入触发
    image
  • css 值,通过 '' 或者 "" 触发
    image
2024-08-12.16.56.54.mov

Change

ExpressionSetter 新增 expressionType 属性

prototype 声明如下

 {
      name: 'style',
      group: 'style',
      title: '样式',
      setter: 'expressionSetter',
      setterProps: {
        expressionType: 'cssObject'  // 启用方式
      }
  }

新增 InputStyleCode 组件

<InputStyleCode
  enableESLint
/>

参考

https://github.com/codemirror/lang-css

@wwsun wwsun merged commit 6de5488 into NetEase:main Aug 16, 2024
1 check passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants