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/src/js/lib/pages/main.htm

32 lines
1.3 KiB
HTML

<div class="do-pages do-fn-noselect" :class="{{props.className}}">
<a class="normal"
:if="currPage > 1 && !props.simpleMode"
:attr="{href: parseUrl(1)}"
:text="props.btns.home"
:click="setPage(1, $event)"></a>
<a class="normal"
:if="currPage > 1"
:attr="{href: parseUrl(currPage - 1)}"
:text="props.btns.prev"
:click="setPage(currPage - 1, $event)"></a>
<a :if-loop="!props.simpleMode || currPage === el"
:repeat="pageList"
:attr="{href: parseUrl(el)}"
:class="{normal: currPage !== el, disabled: '...' === el, curr: currPage === el}"
:text="el"
:click="setPage(el, $event)"></a>
<a class="normal"
:if="currPage < totalPages"
:attr="{href: parseUrl(currPage + 1)}"
:click="setPage(currPage + 1, $event)">{{props.btns.next}}</a>
<a class="normal"
:if="currPage < totalPages && !props.simpleMode"
:attr="{href: parseUrl(totalPages)}"
:click="setPage(totalPages, $event)">{{props.btns.end}}</a>
<div class="input-box" :if="!props.simpleMode">
<span>共 {{totalPages}} 页 {{totalItems}} 条,前往</span>
<input type="text" :duplex="inputPage" :keyup="setPage(null, $event)">
<span></span>
</div>
</div>
wcui是一套基于`Web Components`的UI组件库, 宗旨是追求简单、实用、不花哨。
JavaScript 95.2%
CSS 4.8%