Skip to content

Commit 20e8782

Browse files
committed
feat(IndexList): 新增 IndexList 索引列表组件 (#790)
1 parent e48932b commit 20e8782

Some content is hidden

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

45 files changed

+1804
-40
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@ npm-debug.log
1818
yarn-error.log
1919
.vscode
2020
package-lock.json
21-
examples/project.config.json
21+
examples/project.config.json
22+
/.run

dist/index-anchor/index.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index-anchor/index.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"component":true,"usingComponents":{"l-index-list":"../index-list/index"}}

dist/index-anchor/index.wxml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<view class="anchor-wrapper" style="{{anchorWrapperStyle}}">
2+
<view class="anchor" style="{{anchorStyle}}">
3+
<view wx:if="{{anchorSlot.height!==0}}" class="anchor-slot">
4+
<slot></slot>
5+
</view>
6+
7+
<view wx:if="{{anchorSlot.height===0}}" class="anchor-default l-anchor-class">
8+
{{anchorText}}
9+
</view>
10+
</view>
11+
</view>

dist/index-anchor/index.wxss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.anchor-wrapper{width:100%}.anchor-wrapper .anchor{width:100%}.anchor-wrapper .anchor-default{width:100%;background-color:#f7f8fa;display:flex;align-items:center;padding:8rpx 0 8rpx 30rpx;font-size:26rpx;font-weight:700;color:#323132;box-sizing:border-box}

dist/index-list/index.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index-list/index.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"component":true,"usingComponents":{}}

dist/index-list/index.wxml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<view class="index-list">
2+
3+
<view wx:if="{{showSidebar}}" class="sidebar" catch:touchmove="onTouchMove" catch:touchend="onTouchend">
4+
<block wx:for="{{sidebarData}}" wx:for-item="sidebarItem" wx:key="index">
5+
<view class="sidebar-item l-sidebar-class {{activeSidebarItem===index?'sidebar-item-active l-selected-class':'l-unselected-class'}}">{{sidebarItem}}</view>
6+
</block>
7+
8+
9+
<view class="tip l-tip-class" style="top:{{tipTop}}px;{{showTip?'':'display:none'}}">
10+
<view class="tip-text l-tip-text-class">{{tipText}}</view>
11+
</view>
12+
</view>
13+
14+
<slot></slot>
15+
</view>

dist/index-list/index.wxss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.index-list .sidebar{font-size:20rpx;position:fixed;right:20rpx;width:20rpx;top:50%;transform:translateY(-50%);display:flex;flex-direction:column;align-items:center}.index-list .sidebar-item{width:16px;height:16px;border-radius:50%;display:flex;justify-content:center;align-items:center;margin-top:6rpx}.index-list .sidebar-item-active{color:#fff;background-color:#3963bc}.index-list .tip{width:90rpx;height:90rpx;background-color:#d8d8d8;border-radius:90px 90px 0;display:flex;justify-content:center;align-items:center;position:absolute;left:-160rpx;transform:rotate(-45deg) translateY(-35%)}.index-list .tip-text{font-size:30rpx;transform:rotate(45deg)}

dist/status-show/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)