Skip to content

Commit

Permalink
refactor(rate): sfc to tsx (#1417)
Browse files Browse the repository at this point in the history
* refactor(rate): sfc to tsx

re #1407

* fix: update snaps

* refactor(rate): change content to context

* refactor(rate): delete useless log
  • Loading branch information
1379255913 committed May 30, 2024
1 parent 3fb382c commit a2d98c9
Show file tree
Hide file tree
Showing 6 changed files with 282 additions and 332 deletions.
24 changes: 12 additions & 12 deletions src/config-provider/__test__/__snapshots__/demo.test.jsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -461,9 +461,9 @@ exports[`ConfigProvider > ConfigProvider mobileVue demo works fine 1`] = `
<div
class="t-rate__icon t-rate__icon--unselected"
size="24px"
style="font-size: 24px; margin-right: 8px; --td-rate-selected-color: #ED7B2F;"
>
<!---->
<svg
class="t-icon t-icon-star-filled"
fill="none"
Expand All @@ -479,9 +479,9 @@ exports[`ConfigProvider > ConfigProvider mobileVue demo works fine 1`] = `
</div>
<div
class="t-rate__icon t-rate__icon--unselected"
size="24px"
style="font-size: 24px; margin-right: 8px; --td-rate-selected-color: #ED7B2F;"
>
<!---->
<svg
class="t-icon t-icon-star-filled"
fill="none"
Expand All @@ -497,9 +497,9 @@ exports[`ConfigProvider > ConfigProvider mobileVue demo works fine 1`] = `
</div>
<div
class="t-rate__icon t-rate__icon--unselected"
size="24px"
style="font-size: 24px; margin-right: 8px; --td-rate-selected-color: #ED7B2F;"
>
<!---->
<svg
class="t-icon t-icon-star-filled"
fill="none"
Expand All @@ -515,9 +515,9 @@ exports[`ConfigProvider > ConfigProvider mobileVue demo works fine 1`] = `
</div>
<div
class="t-rate__icon t-rate__icon--unselected"
size="24px"
style="font-size: 24px; margin-right: 8px; --td-rate-selected-color: #ED7B2F;"
>
<!---->
<svg
class="t-icon t-icon-star-filled"
fill="none"
Expand All @@ -533,9 +533,9 @@ exports[`ConfigProvider > ConfigProvider mobileVue demo works fine 1`] = `
</div>
<div
class="t-rate__icon t-rate__icon--unselected"
size="24px"
style="font-size: 24px; margin-right: 0px; --td-rate-selected-color: #ED7B2F;"
>
<!---->
<svg
class="t-icon t-icon-star-filled"
fill="none"
Expand All @@ -556,7 +556,7 @@ exports[`ConfigProvider > ConfigProvider mobileVue demo works fine 1`] = `
>
No score
</span>
<!--v-if-->
<!---->
</div>
</div>
<div
Expand Down Expand Up @@ -3610,9 +3610,9 @@ exports[`ConfigProvider > ConfigProvider otherEnVue demo works fine 1`] = `
<div
class="t-rate__icon t-rate__icon--unselected"
size="24px"
style="font-size: 24px; margin-right: 8px; --td-rate-selected-color: #ED7B2F;"
>
<!---->
<svg
class="t-icon t-icon-star-filled"
fill="none"
Expand All @@ -3628,9 +3628,9 @@ exports[`ConfigProvider > ConfigProvider otherEnVue demo works fine 1`] = `
</div>
<div
class="t-rate__icon t-rate__icon--unselected"
size="24px"
style="font-size: 24px; margin-right: 8px; --td-rate-selected-color: #ED7B2F;"
>
<!---->
<svg
class="t-icon t-icon-star-filled"
fill="none"
Expand All @@ -3646,9 +3646,9 @@ exports[`ConfigProvider > ConfigProvider otherEnVue demo works fine 1`] = `
</div>
<div
class="t-rate__icon t-rate__icon--unselected"
size="24px"
style="font-size: 24px; margin-right: 8px; --td-rate-selected-color: #ED7B2F;"
>
<!---->
<svg
class="t-icon t-icon-star-filled"
fill="none"
Expand All @@ -3664,9 +3664,9 @@ exports[`ConfigProvider > ConfigProvider otherEnVue demo works fine 1`] = `
</div>
<div
class="t-rate__icon t-rate__icon--unselected"
size="24px"
style="font-size: 24px; margin-right: 8px; --td-rate-selected-color: #ED7B2F;"
>
<!---->
<svg
class="t-icon t-icon-star-filled"
fill="none"
Expand All @@ -3682,9 +3682,9 @@ exports[`ConfigProvider > ConfigProvider otherEnVue demo works fine 1`] = `
</div>
<div
class="t-rate__icon t-rate__icon--unselected"
size="24px"
style="font-size: 24px; margin-right: 0px; --td-rate-selected-color: #ED7B2F;"
>
<!---->
<svg
class="t-icon t-icon-star-filled"
fill="none"
Expand All @@ -3705,7 +3705,7 @@ exports[`ConfigProvider > ConfigProvider otherEnVue demo works fine 1`] = `
>
No score
</span>
<!--v-if-->
<!---->
</div>
</div>
<div
Expand Down
27 changes: 6 additions & 21 deletions src/form/__test__/__snapshots__/demo.test.jsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1091,7 +1091,6 @@ exports[`Form > Form horizontalVue demo works fine 1`] = `
<div
class="t-rate__icon t-rate__icon--selected"
size="24px"
style="font-size: 24px; margin-right: 8px; --td-rate-selected-color: #ED7B2F;"
>
<div
Expand Down Expand Up @@ -1125,7 +1124,6 @@ exports[`Form > Form horizontalVue demo works fine 1`] = `
</div>
<div
class="t-rate__icon t-rate__icon--selected"
size="24px"
style="font-size: 24px; margin-right: 8px; --td-rate-selected-color: #ED7B2F;"
>
<div
Expand Down Expand Up @@ -1159,7 +1157,6 @@ exports[`Form > Form horizontalVue demo works fine 1`] = `
</div>
<div
class="t-rate__icon t-rate__icon--unselected"
size="24px"
style="font-size: 24px; margin-right: 8px; --td-rate-selected-color: #ED7B2F;"
>
<div
Expand Down Expand Up @@ -1193,7 +1190,6 @@ exports[`Form > Form horizontalVue demo works fine 1`] = `
</div>
<div
class="t-rate__icon t-rate__icon--unselected"
size="24px"
style="font-size: 24px; margin-right: 8px; --td-rate-selected-color: #ED7B2F;"
>
<div
Expand Down Expand Up @@ -1227,7 +1223,6 @@ exports[`Form > Form horizontalVue demo works fine 1`] = `
</div>
<div
class="t-rate__icon t-rate__icon--unselected"
size="24px"
style="font-size: 24px; margin-right: 0px; --td-rate-selected-color: #ED7B2F;"
>
<div
Expand Down Expand Up @@ -1261,8 +1256,8 @@ exports[`Form > Form horizontalVue demo works fine 1`] = `
</div>
</div>
<!--v-if-->
<!--v-if-->
<!---->
<!---->
</div>
</div>
Expand Down Expand Up @@ -2781,7 +2776,6 @@ exports[`Form > Form mobileVue demo works fine 1`] = `
<div
class="t-rate__icon t-rate__icon--selected"
size="24px"
style="font-size: 24px; margin-right: 8px; --td-rate-selected-color: #ED7B2F;"
>
<div
Expand Down Expand Up @@ -2815,7 +2809,6 @@ exports[`Form > Form mobileVue demo works fine 1`] = `
</div>
<div
class="t-rate__icon t-rate__icon--selected"
size="24px"
style="font-size: 24px; margin-right: 8px; --td-rate-selected-color: #ED7B2F;"
>
<div
Expand Down Expand Up @@ -2849,7 +2842,6 @@ exports[`Form > Form mobileVue demo works fine 1`] = `
</div>
<div
class="t-rate__icon t-rate__icon--unselected"
size="24px"
style="font-size: 24px; margin-right: 8px; --td-rate-selected-color: #ED7B2F;"
>
<div
Expand Down Expand Up @@ -2883,7 +2875,6 @@ exports[`Form > Form mobileVue demo works fine 1`] = `
</div>
<div
class="t-rate__icon t-rate__icon--unselected"
size="24px"
style="font-size: 24px; margin-right: 8px; --td-rate-selected-color: #ED7B2F;"
>
<div
Expand Down Expand Up @@ -2917,7 +2908,6 @@ exports[`Form > Form mobileVue demo works fine 1`] = `
</div>
<div
class="t-rate__icon t-rate__icon--unselected"
size="24px"
style="font-size: 24px; margin-right: 0px; --td-rate-selected-color: #ED7B2F;"
>
<div
Expand Down Expand Up @@ -2951,8 +2941,8 @@ exports[`Form > Form mobileVue demo works fine 1`] = `
</div>
</div>
<!--v-if-->
<!--v-if-->
<!---->
<!---->
</div>
</div>
Expand Down Expand Up @@ -4328,7 +4318,6 @@ exports[`Form > Form verticalVue demo works fine 1`] = `
<div
class="t-rate__icon t-rate__icon--selected"
size="24px"
style="font-size: 24px; margin-right: 8px; --td-rate-selected-color: #ED7B2F;"
>
<div
Expand Down Expand Up @@ -4362,7 +4351,6 @@ exports[`Form > Form verticalVue demo works fine 1`] = `
</div>
<div
class="t-rate__icon t-rate__icon--selected"
size="24px"
style="font-size: 24px; margin-right: 8px; --td-rate-selected-color: #ED7B2F;"
>
<div
Expand Down Expand Up @@ -4396,7 +4384,6 @@ exports[`Form > Form verticalVue demo works fine 1`] = `
</div>
<div
class="t-rate__icon t-rate__icon--unselected"
size="24px"
style="font-size: 24px; margin-right: 8px; --td-rate-selected-color: #ED7B2F;"
>
<div
Expand Down Expand Up @@ -4430,7 +4417,6 @@ exports[`Form > Form verticalVue demo works fine 1`] = `
</div>
<div
class="t-rate__icon t-rate__icon--unselected"
size="24px"
style="font-size: 24px; margin-right: 8px; --td-rate-selected-color: #ED7B2F;"
>
<div
Expand Down Expand Up @@ -4464,7 +4450,6 @@ exports[`Form > Form verticalVue demo works fine 1`] = `
</div>
<div
class="t-rate__icon t-rate__icon--unselected"
size="24px"
style="font-size: 24px; margin-right: 0px; --td-rate-selected-color: #ED7B2F;"
>
<div
Expand Down Expand Up @@ -4498,8 +4483,8 @@ exports[`Form > Form verticalVue demo works fine 1`] = `
</div>
</div>
<!--v-if-->
<!--v-if-->
<!---->
<!---->
</div>
</div>
Expand Down
Loading

0 comments on commit a2d98c9

Please sign in to comment.