-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #112 from uxsi/more
doc: example update
- Loading branch information
Showing
84 changed files
with
1,862 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
Page({ | ||
data: { | ||
showDialog: false | ||
}, | ||
openDialog: function () { | ||
this.setData({ | ||
istrue: true | ||
}) | ||
}, | ||
closeDialog: function () { | ||
this.setData({ | ||
istrue: false | ||
}) | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<view class="page"> | ||
<view class="page__hd"> | ||
<view class="page__title">Dialog</view> | ||
<view class="page__desc">对话框,采用小程序原生的modal</view> | ||
</view> | ||
<view class="page__bd"> | ||
<view class="weui-btn-area"> | ||
<button class="weui-btn" type="default" bindtap="openDialog">Dialog</button> | ||
</view> | ||
<view class="weui-demo-dialog {{istrue ? 'weui-demo-dialog_show' : ''}}"> | ||
<view class="weui-mask" bindtap="closeDialog"></view> | ||
<view class="weui-dialog__wrp" bindtap="closeDialog"> | ||
<view class="weui-dialog" catchtap="stopEvent"> | ||
<view class="weui-dialog__hd"> | ||
<view class="weui-dialog__title">标题</view> | ||
</view> | ||
<view class="weui-dialog__bd"> | ||
详细内容 | ||
</view> | ||
<view class="weui-dialog__ft"> | ||
<view class="weui-dialog__btn weui-dialog__btn_default" bindtap="closeDialog">取消</view> | ||
<view class="weui-dialog__btn" bindtap="closeDialog">确定</view> | ||
</view> | ||
</view> | ||
</view> | ||
</view> | ||
</view> | ||
</view> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
page{ | ||
background-color: #FFFFFF; | ||
} | ||
.weui-demo-dialog{ | ||
visibility:hidden; | ||
opacity:0; | ||
transition:opacity .3s; | ||
} | ||
.weui-demo-dialog_show{ | ||
visibility:visible; | ||
opacity:1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
Page({ | ||
data: { | ||
showDialog: false | ||
}, | ||
openDialog: function () { | ||
this.setData({ | ||
istrue: true | ||
}) | ||
}, | ||
closeDialog: function () { | ||
this.setData({ | ||
istrue: false | ||
}) | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"usingComponents": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<view class="page"> | ||
<view class="page__hd"> | ||
<view class="page__title">Half Screen Dialog</view> | ||
<view class="page__desc">半屏弹窗,辅助完成当前页面任务时;提醒用户并引导用户的下一步操作;用户主动发起的任务时。</view> | ||
</view> | ||
<view class="page__bd"> | ||
<view class="weui-btn-area"> | ||
<button class="weui-btn" type="default" bindtap="openDialog">Half Screen Dialog</button> | ||
</view> | ||
<view class="weui-demo-dialog {{istrue ? 'weui-demo-dialog_show' : ''}}"> | ||
<view class="weui-mask" bindtap="closeDialog"></view> | ||
<view class="weui-half-screen-dialog" catchtap="stopEvent"> | ||
<view class="weui-half-screen-dialog__hd"> | ||
<view class="weui-half-screen-dialog__hd__side"> | ||
<view bindtap="closeDialog" class="weui-icon-btn weui-icon-btn_close">关闭</view> | ||
</view> | ||
<view class="weui-half-screen-dialog__hd__main"> | ||
<text class="weui-half-screen-dialog__title">标题</text> | ||
<text class="weui-half-screen-dialog__subtitle">标题</text> | ||
</view> | ||
<view class="weui-half-screen-dialog__hd__side"> | ||
<view class="weui-icon-btn weui-icon-btn_more">更多</view> | ||
</view> | ||
</view> | ||
<view class="weui-half-screen-dialog__bd"> | ||
<view class="weui-half-screen-dialog__desc"> | ||
辅助描述内容,可根据实际需要安排 | ||
</view> | ||
<view class="weui-half-screen-dialog__tips"> | ||
辅助提示内容,可根据实际需要安排 | ||
</view> | ||
</view> | ||
<view class="weui-half-screen-dialog__ft"> | ||
<button type="default" class="weui-btn">辅助操作</button> | ||
<button type="primary" class="weui-btn">主操作</button> | ||
</view> | ||
</view> | ||
</view> | ||
</view> | ||
</view> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
.weui-demo-dialog{ | ||
visibility:hidden; | ||
opacity:0; | ||
transition:all .3s; | ||
} | ||
.weui-half-screen-dialog{ | ||
transition:all .3s; | ||
transform:translateY(100%); | ||
} | ||
.weui-demo-dialog_show{ | ||
visibility:visible; | ||
opacity:1; | ||
} | ||
.weui-demo-dialog_show .weui-half-screen-dialog{ | ||
transform:translateY(0); | ||
} | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Page({}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"usingComponents": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<view class="page"> | ||
<view class="page__hd"> | ||
<view class="page__title">Loading</view> | ||
<view class="page__desc">加载中</view> | ||
</view> | ||
<view class="page__bd"> | ||
<view class="weui-loading__wrp"> | ||
<view class="weui-loading"></view> | ||
</view> | ||
<view class="weui-loading__wrp"> | ||
<view class="loading wx_dot_loading"></view> | ||
</view> | ||
<view class="weui-loading__wrp"> | ||
<view class="loading wx_dot_loading wx_dot_loading_white"></view> | ||
</view> | ||
</view> | ||
</view> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
page{ | ||
background-color: #FFFFFF; | ||
} | ||
.weui-loading__wrp{ | ||
padding:16px;text-align:center; | ||
} | ||
.weui-loading__wrp:last-child{ | ||
background-color:rgba(0,0,0,.1); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Page({}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<view class="page"> | ||
<view class="page__hd"> | ||
<view class="page__title">Loadmore</view> | ||
<view class="page__desc">加载更多</view> | ||
</view> | ||
<view class="page__bd"> | ||
<view class="weui-loadmore"> | ||
<view class="weui-loading"></view> | ||
<view class="weui-loadmore__tips">正在加载</view> | ||
</view> | ||
<view class="weui-loadmore weui-loadmore_line"> | ||
<view class="weui-loadmore__tips weui-loadmore__tips_in-line">暂无数据</view> | ||
</view> | ||
<view class="weui-loadmore weui-loadmore_line weui-loadmore_dot"> | ||
<view class="weui-loadmore__tips weui-loadmore__tips_in-line weui-loadmore__tips_in-dot"></view> | ||
</view> | ||
</view> | ||
</view> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
page{ | ||
background-color: #FFFFFF; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
// example/navbar/navigation_bar.js | ||
Page({ | ||
|
||
/** | ||
* 页面的初始数据 | ||
*/ | ||
data: { | ||
|
||
}, | ||
|
||
/** | ||
* 生命周期函数--监听页面加载 | ||
*/ | ||
onLoad: function (options) { | ||
|
||
}, | ||
|
||
/** | ||
* 生命周期函数--监听页面初次渲染完成 | ||
*/ | ||
onReady: function () { | ||
|
||
}, | ||
|
||
/** | ||
* 生命周期函数--监听页面显示 | ||
*/ | ||
onShow: function () { | ||
|
||
}, | ||
|
||
/** | ||
* 生命周期函数--监听页面隐藏 | ||
*/ | ||
onHide: function () { | ||
|
||
}, | ||
|
||
/** | ||
* 生命周期函数--监听页面卸载 | ||
*/ | ||
onUnload: function () { | ||
|
||
}, | ||
|
||
/** | ||
* 页面相关事件处理函数--监听用户下拉动作 | ||
*/ | ||
onPullDownRefresh: function () { | ||
|
||
}, | ||
|
||
/** | ||
* 页面上拉触底事件的处理函数 | ||
*/ | ||
onReachBottom: function () { | ||
|
||
}, | ||
|
||
/** | ||
* 用户点击右上角分享 | ||
*/ | ||
onShareAppMessage: function () { | ||
|
||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"usingComponents": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<!--example/navbar/navigation_bar.wxml--> | ||
<text>example/navbar/navigation_bar.wxml</text> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/* example/navbar/navigation_bar.wxss */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Page({ | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"usingComponents": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<view class="page"> | ||
<view class="page__hd"> | ||
<view class="page__title">Navigation Bar</view> | ||
<view class="page__desc">导航栏,模拟小程序原生顶部导航栏。</view> | ||
</view> | ||
<view class="page__bd"> | ||
<view class="weui-navigation-bar"> | ||
<view class="weui-navigation-bar__placeholder" style="visible: hidden;"></view> | ||
<view class="weui-navigation-bar__inner"> | ||
|
||
<view class='weui-navigation-bar__left'> | ||
<view class="weui-navigation-bar__buttons"> | ||
<view bindtap="back" class="weui-navigation-bar__button weui-navigation-bar__btn_goback"></view> | ||
</view> | ||
</view> | ||
|
||
<view class='weui-navigation-bar__center'> | ||
<view class="weui-navigation-bar__loading"> | ||
<view class="weui-loading"></view> | ||
</view> | ||
<text>标题</text> | ||
</view> | ||
|
||
<view class='weui-navigation-bar__right'> | ||
</view> | ||
</view> | ||
</view> | ||
</view> | ||
</view> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.weui-navigation-bar{position:relative;} | ||
.weui-navigation-bar__inner{position:absolute;} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Page({ | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<view class="page"> | ||
<view class="page__hd"> | ||
<view class="page__title">Navigation Bar</view> | ||
<view class="page__desc">导航栏,模拟小程序原生顶部导航栏。</view> | ||
</view> | ||
<view class="page__bd"> | ||
<view class="weui-navigation-bar"> | ||
<view class="weui-navigation-bar__placeholder" style="visible: hidden;"></view> | ||
<view class="weui-navigation-bar__inner"> | ||
|
||
<view class='weui-navigation-bar__left'> | ||
<view class="weui-navigation-bar__buttons"> | ||
<view bindtap="back" class="weui-navigation-bar__button weui-navigation-bar__btn_goback"></view> | ||
</view> | ||
</view> | ||
|
||
<view class='weui-navigation-bar__center'> | ||
<view class="weui-navigation-bar__loading"> | ||
<view class="weui-loading"></view> | ||
</view> | ||
<text>标题</text> | ||
</view> | ||
|
||
<view class='weui-navigation-bar__right'> | ||
</view> | ||
</view> | ||
</view> | ||
</view> | ||
</view> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.weui-navigation-bar{position:relative;} | ||
.weui-navigation-bar__inner{position:absolute;} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Page({ | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"usingComponents": {} | ||
} |
Oops, something went wrong.