Skip to content

Conversation

@johnsonwong666
Copy link
Collaborator

#5722 当theme为round-button时 confirmButtonColor的默认值RED被透传 需要判断处理一下

type: Boolean,
observer(show: boolean) {
!show && this.stopLoading();
this.handleButtonColor();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个是不是可以通过 wxs 来实现,性能会好一点

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已调整使用wxs

var RED = '#ee0a24';
var WHITE = '#fff';
var GRAY = '#323233';
function buttonColor(data) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里有两个改造思路,一个是 RED 这些JS变量是不是可以用全局的 CSS 变量,这里本身是 style,理论上是可以用的,避免在维护一套JS的样式变量

另外一个是这个函数是不是可以统一改造根据不同的条件回生效不同的样式,目前的实现可复用度比较低

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