Skip to content

Commit d4f4116

Browse files
iamkunCarterLi
authored andcommitted
chore: remove index intro (ElemeFE#19155)
1 parent 1f984df commit d4f4116

File tree

1 file changed

+1
-50
lines changed

1 file changed

+1
-50
lines changed

examples/pages/template/index.tpl

Lines changed: 1 addition & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -366,40 +366,10 @@
366366
</li>
367367
</ul>
368368
</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>
398369
</div>
399370
</template>
400371
<script>
401372
import { throttle } from 'throttle-debounce';
402-
import { addClass, removeClass } from 'element-ui/src/utils/dom';
403373
404374
export default {
405375
created() {
@@ -416,38 +386,19 @@
416386
if (calHeight < 0) calHeight = 0;
417387
if (calHeight > eleHeight) calHeight = eleHeight;
418388
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;
431389
}
432390
},
433391
data() {
434392
return {
435393
lang: this.$route.meta.lang,
436-
mainImgOffset: 0,
437-
showIntroA: false,
438-
showIntroB: false,
439-
introBY: 0,
440-
introBX: 0
394+
mainImgOffset: 0
441395
};
442396
},
443397
beforeDestroy() {
444398
window.removeEventListener('scroll', this.throttledHandleScroll);
445399
},
446400
mounted() {
447401
window.addEventListener('scroll', this.throttledHandleScroll);
448-
if (localStorage.getItem('KNOW_THEME')) return;
449-
this.showIntroA = true;
450-
addClass(document.body, 'el-loading-parent--hidden');
451402
}
452403
};
453404
</script>

0 commit comments

Comments
 (0)