Skip to content

Commit

Permalink
refactor(ui/result): rewrite class name
Browse files Browse the repository at this point in the history
  • Loading branch information
qytayh authored and haoziqaq committed Dec 5, 2022
1 parent caad4af commit e74cb84
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
12 changes: 6 additions & 6 deletions packages/varlet-ui/src/result/Success.vue
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
<template>
<span
:class="n('--cover-left')"
:class="n('cover-left')"
:style="{
animationDuration: `${14 * duration}ms`,
}"
/>
<span
:class="classes(n('--line'), n('--line-tip'))"
:class="classes(n('line'), n('line-tip'))"
:style="{
animationDuration: `${2.5 * duration}ms`,
borderRadius: `calc(${borderSize} * 0.625)`,
}"
/>
<span
:class="classes(n('--line'), n('--line-long'))"
:class="classes(n('line'), n('line-long'))"
:style="{
animationDuration: `${2.5 * duration}ms`,
borderRadius: `calc(${borderSize} * 0.625)`,
}"
/>
<span
ref="circle"
:class="n('--circle')"
:class="n('circle')"
:style="{ left: `-${borderSize}`, top: `-${borderSize}`, borderWidth: borderSize }"
/>
<span :class="n('--line-fix')" />
<span :class="n('line-fix')" />
<span
:class="n('--cover-right')"
:class="n('cover-right')"
:style="{
animationDuration: `${14 * duration}ms`,
}"
Expand Down
14 changes: 7 additions & 7 deletions packages/varlet-ui/src/result/result.less
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
&__success {
border-color: var(--result-success-color);

&--cover-left {
&__cover-left {
display: block;
position: absolute;
z-index: 1;
Expand All @@ -113,7 +113,7 @@
background: var(--result-background);
}

&--cover-right {
&__cover-right {
display: block;
position: absolute;
top: -13.75%;
Expand All @@ -128,21 +128,21 @@
background: var(--result-background);
}

&--line {
&__line {
height: 6.8%;
background-color: var(--result-success-color);
display: block;
position: absolute;
z-index: 10;
}

&--line-tip {
&__line-tip {
transform: rotate(45deg);
animation-name: success-line-tip;
animation-fill-mode: forwards;
}

&--line-long {
&__line-long {
transform: rotate(-45deg);
animation-name: success-line-long;
animation-fill-mode: forwards;
Expand Down Expand Up @@ -206,7 +206,7 @@
}
}

&--circle {
&__circle {
z-index: 10;
width: 100%;
height: 100%;
Expand All @@ -217,7 +217,7 @@
border-color: var(--result-success-border-color);
}

&--line-fix {
&__line-fix {
top: 10%;
left: 32.5%;
width: 8.75%;
Expand Down

0 comments on commit e74cb84

Please sign in to comment.