Skip to content

Commit 39db274

Browse files
committed
perf:icons
1 parent e29a382 commit 39db274

66 files changed

Lines changed: 250 additions & 485 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/App.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
class="m-child-category" :class="['child-' + index, { 'is-disabled': submenu.disabled }]"
1414
v-for="(submenu, i) in menu.submenus" :target="submenu.disabled ? undefined : submenu.target || '_self'"
1515
:aria-disabled="submenu.disabled || undefined" :key="i">
16-
<img :src="getNavIcon(submenu.key)" class="u-img"
16+
<img :src="getNavIcon(submenu)" class="u-img"
1717
:alt="getMenuLabel(submenu)" />
1818
<span class="u-text">{{ getMenuLabel(submenu) }}</span>
1919
</component>
@@ -42,8 +42,9 @@ export default {
4242
},
4343
computed: {},
4444
methods: {
45-
getNavIcon(key) {
46-
return require(`@/assets/img/index/${key}.svg`);
45+
getNavIcon(item) {
46+
const slug = item.menuKey || item.key;
47+
return require(`@/assets/img/index/${slug}2.svg`);
4748
},
4849
getLocalLabel(key, fallback) {
4950
return this.$te(key) ? this.$t(key) : fallback;

src/assets/css/common/nav_v5.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@
9090
}
9191
}
9292
&:hover,
93+
&:focus-within,
9394
&.is-active {
9495
.u-icon-hover {
9596
opacity: 1;

src/assets/css/questsection/content.less

Lines changed: 2 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -5,47 +5,6 @@
55
min-width: 0;
66
}
77

8-
.m-questsection-content__aside {
9-
display: flex;
10-
min-width: 0;
11-
align-self: center;
12-
flex-direction: column;
13-
align-items: flex-end;
14-
gap: @pvx-space-3;
15-
16-
.m-robot__pvx-tip {
17-
width: 100%;
18-
max-width: 375px;
19-
min-width: 0;
20-
align-self: flex-end;
21-
22-
.m-qq {
23-
width: 100%;
24-
max-width: 375px;
25-
margin-left: auto;
26-
margin-right: 0;
27-
}
28-
}
29-
30-
}
31-
32-
.u-btn--feedback {
33-
width: auto;
34-
min-height: 40px;
35-
flex: none;
36-
border-color: fade(@pvx-primary, 16%);
37-
border-radius: @pvx-radius-control;
38-
background: @pvx-primary-soft;
39-
color: @pvx-primary-hover;
40-
box-shadow: @pvx-shadow-xs;
41-
42-
&:hover {
43-
border-color: @pvx-border-focus;
44-
background: fade(@pvx-primary, 14%);
45-
color: @pvx-primary-hover;
46-
}
47-
}
48-
498
.m-questsection-content__body {
509
display: flex;
5110
min-width: 0;
@@ -56,7 +15,7 @@
5615
.m-questsection-content__header-image {
5716
display: grid;
5817
width: 100%;
59-
grid-template-columns: 500px minmax(280px, 1fr) minmax(320px, 420px);
18+
grid-template-columns: 500px minmax(0, 1fr);
6019
align-items: center;
6120
justify-content: start;
6221
gap: @pvx-space-5;
@@ -180,10 +139,6 @@
180139
}
181140
}
182141

183-
.m-questsection-content__chapters--mobile {
184-
display: none;
185-
}
186-
187142
.m-questsection-content__detail {
188143
display: flex;
189144
min-width: 0;
@@ -221,7 +176,6 @@
221176
font-weight: 500;
222177
}
223178
}
224-
225179
}
226180

227181
.m-questsection-content__empty {
@@ -244,26 +198,10 @@
244198
}
245199
}
246200

247-
@media screen and (min-width: 1401px) {
248-
.m-questsection-content__chapters {
249-
min-height: calc(80px + @pvx-space-3);
250-
}
251-
}
252-
253201
@media screen and (max-width: 1400px) {
254202
.m-questsection-content__header-image {
255203
grid-template-columns: 500px minmax(320px, 1fr);
256204
}
257-
258-
.m-questsection-content__aside {
259-
grid-column: 2;
260-
grid-row: 1;
261-
}
262-
263-
.m-questsection-content__chapters {
264-
grid-column: 1 / -1;
265-
grid-row: 2;
266-
}
267205
}
268206

269207
@media screen and (min-width: 1101px) and (max-width: 1280px) {
@@ -276,21 +214,13 @@
276214
}
277215
}
278216

279-
.m-questsection-content__aside {
280-
width: 100%;
281-
}
282217
}
283218

284219
@media screen and (max-width: 1100px) {
285220
.m-questsection-content__header-image {
286221
grid-template-columns: minmax(0, 1fr);
287222
}
288223

289-
.m-questsection-content__aside,
290-
.m-questsection-content__chapters {
291-
grid-column: auto;
292-
grid-row: auto;
293-
}
294224
}
295225

296226
@media screen and (max-width: @ipad) {
@@ -323,15 +253,7 @@
323253
}
324254
}
325255

326-
.m-questsection-content__aside {
327-
display: none;
328-
}
329-
330-
.m-questsection-content__chapters--desktop {
331-
display: none;
332-
}
333-
334-
.m-questsection-content__chapters--mobile {
256+
.m-questsection-content__chapters {
335257
position: sticky;
336258
z-index: 20;
337259
top: @header-height;
@@ -365,14 +287,6 @@
365287
}
366288
}
367289

368-
.u-btn--feedback {
369-
padding: 0 @pvx-space-3;
370-
371-
span {
372-
display: inline;
373-
}
374-
}
375-
376290
.m-questsection-content__header-image {
377291
.m-questsection-content__image {
378292
aspect-ratio: auto;
@@ -419,10 +333,3 @@
419333
}
420334
}
421335
}
422-
423-
.v-miniprogram {
424-
.m-questsection-content__aside .u-btn--feedback,
425-
.m-questsection-content__aside .m-robot__pvx-tip {
426-
display: none;
427-
}
428-
}

src/assets/data/menus.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"label": "外观大全",
5757
"icon": "el-icon-files",
5858
"key": "exterior",
59-
"menuKey": "body",
59+
"menuKey": "exterior",
6060
"status": true,
6161
"disabled": true
6262
},
@@ -101,7 +101,6 @@
101101
"label": "科举大全",
102102
"icon": "el-icon-files",
103103
"key": "keju",
104-
"menuKey": "exam",
105104
"status": true
106105
},
107106
{
@@ -123,15 +122,15 @@
123122
"label": "奇遇珍卷",
124123
"icon": "el-icon-files",
125124
"key": "treasure",
126-
"menuKey": "codextreature",
125+
"menuKey": "treature",
127126
"status": true
128127
},
129128
{
130129
"path": "/pvx/achievements",
131130
"label": "资历宝典",
132131
"icon": "el-icon-files",
133132
"key": "seniority",
134-
"menuKey": "codexachievement",
133+
"menuKey": "achievement",
135134
"status": true
136135
}
137136
]
@@ -147,7 +146,7 @@
147146
"label": "外观黑市",
148147
"icon": "el-icon-files",
149148
"key": "market",
150-
"menuKey": "body",
149+
"menuKey": "market",
151150
"status": true,
152151
"disabled": true
153152
},

src/assets/img/index/adventure.svg

Lines changed: 4 additions & 20 deletions
Loading

0 commit comments

Comments
 (0)