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

refactor(style): remove component.style, label.style #5331

Merged
merged 1 commit into from
Jul 19, 2023
Merged

Conversation

pearmini
Copy link
Member

@pearmini pearmini commented Jul 19, 2023

Remove style

废弃 component.style 和 label.style

存在问题

  • 分不清哪些写在 style 里面,哪些写在 component-top-level。
  • theme 里面没有 style 配置,和 theme 保持一致。

变化

// Before
const options = {
  axis: {
    x: { labelFormatter: '~s', style: { labelStroke: 'red' }}
  }
}

// After
const options = {
  axis: {
    x: { labelFormatter: '~s', labelStroke: 'red' }
  }
}
// Before
const options = {
  labels: [{ text: 'name', selector: 'last', style: { dy: 10 } }]
}

// After
const options = {
  labels: [{ text: 'name', selector: 'last',  dy: 10 }]
}

注意

  • 之前的写法仍然生效。
  • 官网万里和文档去掉 next 前统一更新。

@pearmini pearmini requested a review from hustcc July 19, 2023 07:11
@pearmini pearmini merged commit ddaa6b3 into v5 Jul 19, 2023
@pearmini pearmini deleted the refactor/style branch July 19, 2023 07:58
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

Successfully merging this pull request may close these issues.

2 participants