Skip to content

Commit abfb862

Browse files
committed
pref[Hamburger]: refactor Hamburger component
1 parent 8f21f7e commit abfb862

File tree

1 file changed

+6
-22
lines changed

1 file changed

+6
-22
lines changed

src/components/Hamburger/index.vue

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,13 @@
22
<div>
33
<svg
44
:class="{'is-active':isActive}"
5-
t="1492500959545"
65
class="hamburger"
7-
style=""
86
viewBox="0 0 1024 1024"
9-
version="1.1"
107
xmlns="http://www.w3.org/2000/svg"
11-
p-id="1691"
12-
xmlns:xlink="http://www.w3.org/1999/xlink"
138
width="64"
149
height="64"
1510
@click="toggleClick">
16-
<path
17-
d="M966.8023 568.849776 57.196677 568.849776c-31.397081 0-56.850799-25.452695-56.850799-56.850799l0 0c0-31.397081 25.452695-56.849776 56.850799-56.849776l909.605623 0c31.397081 0 56.849776 25.452695 56.849776 56.849776l0 0C1023.653099 543.397081 998.200404 568.849776 966.8023 568.849776z"
18-
p-id="1692" />
19-
<path
20-
d="M966.8023 881.527125 57.196677 881.527125c-31.397081 0-56.850799-25.452695-56.850799-56.849776l0 0c0-31.397081 25.452695-56.849776 56.850799-56.849776l909.605623 0c31.397081 0 56.849776 25.452695 56.849776 56.849776l0 0C1023.653099 856.07443 998.200404 881.527125 966.8023 881.527125z"
21-
p-id="1693" />
22-
<path
23-
d="M966.8023 256.17345 57.196677 256.17345c-31.397081 0-56.850799-25.452695-56.850799-56.849776l0 0c0-31.397081 25.452695-56.850799 56.850799-56.850799l909.605623 0c31.397081 0 56.849776 25.452695 56.849776 56.850799l0 0C1023.653099 230.720755 998.200404 256.17345 966.8023 256.17345z"
24-
p-id="1694" />
11+
<path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 0 0 0-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0 0 14.4 7z" />
2512
</svg>
2613
</div>
2714
</template>
@@ -44,15 +31,12 @@ export default {
4431

4532
<style scoped>
4633
.hamburger {
47-
display: inline-block;
48-
cursor: pointer;
49-
width: 20px;
50-
height: 20px;
51-
transform: rotate(90deg);
52-
transition: .38s;
53-
transform-origin: 50% 50%;
34+
display: inline-block;
35+
cursor: pointer;
36+
width: 20px;
37+
height: 20px;
5438
}
5539
.hamburger.is-active {
56-
transform: rotate(0deg);
40+
transform: rotate(180deg);
5741
}
5842
</style>

0 commit comments

Comments
 (0)