IDuxFE / idux

🚀 A UI Component Library for Vue3.x
https://idux.site
MIT License
546 stars 141 forks source link

fix(comp:theme): calculated hash of unhashed tokens should be different #1973

Closed sallerli1 closed 3 months ago

sallerli1 commented 3 months ago

PR Checklist

Please check if your PR fulfills the following requirements:

What is the current behavior?

主题中,会通过一个组件的所有token的键值对计算hash,如果hash没有变化,则不会重复添加主题样式

但是,对于hashed: false 和 hashed: true 的两组key value 都相同的token,其并不应该相同,也就是应该添加两份样式

而目前的计算逻辑,并没有区分 hashed: true 和 hashed: false 下的token

导致如果存在两个provider,一个配置了hash,一个没有,后执行的provider不会正确添加主题样式

What is the new behavior?

修复以上问题

Other information

idux-bot[bot] commented 3 months ago

This preview will be available after the AzureCI is passed.

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 90.95%. Comparing base (4e5cdcc) to head (a1bdb70).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1973 +/- ## ======================================= Coverage 90.95% 90.95% ======================================= Files 358 358 Lines 35691 35691 Branches 3889 3889 ======================================= Hits 32463 32463 Misses 3228 3228 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.