Repository navigation
Commit ccbddfe
fix(icon): apply font-size on first render for non-image icons (#4711)
* fix(icon): apply font-size on first render for non-image icons
Apply iconStyle (including font-size) on the first setData for non-image icons so the initial frame uses the requested size. The image branch keeps its getRect-based width/height calculation unchanged.
* test(calendar): update snapshot for first-render icon font-size
The icon fix writes iconStyle on the first setData, so the close icon in calendar now renders with font-size: 48rpx on the first frame instead of an empty style. Update the :base snapshot accordingly. Relates to #4706.
* chore: stash changelog [ci skip]
* refactor(icon): remove redundant isImage guard after early return
---------
Co-authored-by: tdesign-bot <tdesign@tencent.com>1 parent 5c70aeb commit ccbddfe
3 files changed
Lines changed: 22 additions & 13 deletions
File tree
- packages
- components
- calendar/__test__/__snapshots__
- icon
- tdesign-miniprogram/.changelog
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
42 | 47 | | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
55 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
56 | 59 | | |
57 | 60 | | |
58 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
0 commit comments