|
366 | 366 | </li>
|
367 | 367 | </ul>
|
368 | 368 | </div>
|
369 |
| - <div class="theme-intro-a" v-if="showIntroA" @click="hideIntroA"> |
370 |
| - <div class="intro-banner"> |
371 |
| - <img src="~examples/assets/images/theme-intro.png" alt=""> |
372 |
| - <div class="intro-text"> |
373 |
| - <p><%= 12 ></p> |
374 |
| - </div> |
375 |
| - </div> |
376 |
| - <div class="mask"></div> |
377 |
| - </div> |
378 |
| - <div |
379 |
| - class="theme-intro-b" |
380 |
| - @click="hideIntroB" |
381 |
| - v-if="showIntroB" |
382 |
| - > |
383 |
| - <div class="intro-banner" |
384 |
| - :style="{ |
385 |
| - left: introBX + 'px', |
386 |
| - top: introBY + 'px' |
387 |
| - }" |
388 |
| - > |
389 |
| - <img src="~examples/assets/images/intro-theme-b.png" alt=""> |
390 |
| - <div class="title"> |
391 |
| - <div> |
392 |
| - <p><%= 13 ></p> |
393 |
| - <p><%= 14 ></p> |
394 |
| - </div> |
395 |
| - </div> |
396 |
| - </div> |
397 |
| - </div> |
398 | 369 | </div>
|
399 | 370 | </template>
|
400 | 371 | <script>
|
401 | 372 | import { throttle } from 'throttle-debounce';
|
402 |
| - import { addClass, removeClass } from 'element-ui/src/utils/dom'; |
403 | 373 |
|
404 | 374 | export default {
|
405 | 375 | created() {
|
|
416 | 386 | if (calHeight < 0) calHeight = 0;
|
417 | 387 | if (calHeight > eleHeight) calHeight = eleHeight;
|
418 | 388 | this.mainImgOffset = calHeight;
|
419 |
| - }, |
420 |
| - hideIntroB() { |
421 |
| - removeClass(document.body, 'el-loading-parent--hidden'); |
422 |
| - localStorage.setItem('KNOW_THEME', 'true'); |
423 |
| - this.showIntroB = false; |
424 |
| - }, |
425 |
| - hideIntroA() { |
426 |
| - const themeTab = document.querySelector('.nav-item-theme'); |
427 |
| - this.introBX = themeTab.offsetLeft + (themeTab.clientWidth * 0.5) - (300 / 2); |
428 |
| - this.introBY = themeTab.offsetTop + 40; |
429 |
| - this.showIntroA = false; |
430 |
| - this.showIntroB = true; |
431 | 389 | }
|
432 | 390 | },
|
433 | 391 | data() {
|
434 | 392 | return {
|
435 | 393 | lang: this.$route.meta.lang,
|
436 |
| - mainImgOffset: 0, |
437 |
| - showIntroA: false, |
438 |
| - showIntroB: false, |
439 |
| - introBY: 0, |
440 |
| - introBX: 0 |
| 394 | + mainImgOffset: 0 |
441 | 395 | };
|
442 | 396 | },
|
443 | 397 | beforeDestroy() {
|
444 | 398 | window.removeEventListener('scroll', this.throttledHandleScroll);
|
445 | 399 | },
|
446 | 400 | mounted() {
|
447 | 401 | window.addEventListener('scroll', this.throttledHandleScroll);
|
448 |
| - if (localStorage.getItem('KNOW_THEME')) return; |
449 |
| - this.showIntroA = true; |
450 |
| - addClass(document.body, 'el-loading-parent--hidden'); |
451 | 402 | }
|
452 | 403 | };
|
453 | 404 | </script>
|
0 commit comments