This repository has been archived on 2023-08-30. You can view files and clone it, but cannot push or open issues/pull-requests.
bytedo
/
wcui
Archived
1
0
Fork 0
wcui/js/lib/sliders/main.htm

42 lines
1.5 KiB
HTML

<div class="do-sliders" :if="sliderList.length" :mouseenter="$stopSlide()" :mouseleave="$startSlide()">
<a class="do-ui-font slider-btn" href="javascript:;"
:click="$go(-1)">&#xe8ed</a>
<div class="container">
<div class="box"
:attr="{style: 'width:' + sliderList.length * 100 + '%;' + transform}">
<a target="_blank"
:repeat="sliderList"
:css="{width: currWidth}"
:attr="{href: el.link || 'javascript:;'}">
<img :attr-src="el.src">
<p :if="el.title"
:attr="{style: el.titlaStyle ? el.titleStyle + ';' : ''}"
:html="el.title"
class="default-class"></p>
</a>
</div>
</div>
<div class="btn" :css="{bottom: (preview ? '-120px' : '0;')}">
<span :if="!preview"
href="javascript:;"
:class="{'no-preview-act': curr === $index}"
:repeat="sliderList"
:click="$jump($index)">
</span>
<a class="btn-img" href="javascript:;"
:if="preview"
:class="{act: curr === $index || (curr >= maxNum && $index == maxNum - 1)}"
:click="$jump($index)"
:repeat="sliderBtnList">
<img
:class="{'preview-act': curr === $index || (curr >= maxNum && $index == maxNum - 1)}"
:attr-src="el.src" />
</a>
</div>
<a class="do-ui-font slider-btn" href="javascript:;"
:click="$go(1)">&#xe8eb</a>
</div>
wcui是一套基于`Web Components`的UI组件库, 宗旨是追求简单、实用、不花哨。
JavaScript 95.2%
CSS 4.8%