Skip to content

Commit

Permalink
Merge pull request #112 from uxsi/more
Browse files Browse the repository at this point in the history
doc: example update
  • Loading branch information
BearJ authored Aug 2, 2019
2 parents 821801b + 92b9426 commit c7b3cd9
Show file tree
Hide file tree
Showing 84 changed files with 1,862 additions and 0 deletions.
15 changes: 15 additions & 0 deletions dist/example/half-screen-dialog/dialog.js
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
})
}
});
28 changes: 28 additions & 0 deletions dist/example/half-screen-dialog/dialog.wxml
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>
12 changes: 12 additions & 0 deletions dist/example/half-screen-dialog/dialog.wxss
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;
}
15 changes: 15 additions & 0 deletions dist/example/half-screen-dialog/half-screen-dialog.js
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
})
}
});
3 changes: 3 additions & 0 deletions dist/example/half-screen-dialog/half-screen-dialog.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"usingComponents": {}
}
40 changes: 40 additions & 0 deletions dist/example/half-screen-dialog/half-screen-dialog.wxml
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>
17 changes: 17 additions & 0 deletions dist/example/half-screen-dialog/half-screen-dialog.wxss
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);
}

1 change: 1 addition & 0 deletions dist/example/images/icon_del.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions dist/example/images/icon_love.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions dist/example/images/icon_star.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions dist/example/loading/loading.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Page({});
3 changes: 3 additions & 0 deletions dist/example/loading/loading.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"usingComponents": {}
}
17 changes: 17 additions & 0 deletions dist/example/loading/loading.wxml
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>
9 changes: 9 additions & 0 deletions dist/example/loading/loading.wxss
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);
}
1 change: 1 addition & 0 deletions dist/example/loading/loadmore.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Page({});
18 changes: 18 additions & 0 deletions dist/example/loading/loadmore.wxml
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>
3 changes: 3 additions & 0 deletions dist/example/loading/loadmore.wxss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
page{
background-color: #FFFFFF;
}
66 changes: 66 additions & 0 deletions dist/example/navbar/navigation_bar.js
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 () {

}
})
3 changes: 3 additions & 0 deletions dist/example/navbar/navigation_bar.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"usingComponents": {}
}
2 changes: 2 additions & 0 deletions dist/example/navbar/navigation_bar.wxml
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>
1 change: 1 addition & 0 deletions dist/example/navbar/navigation_bar.wxss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* example/navbar/navigation_bar.wxss */
2 changes: 2 additions & 0 deletions dist/example/navigation-bar/navigation-bar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Page({
});
3 changes: 3 additions & 0 deletions dist/example/navigation-bar/navigation-bar.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"usingComponents": {}
}
29 changes: 29 additions & 0 deletions dist/example/navigation-bar/navigation-bar.wxml
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>
2 changes: 2 additions & 0 deletions dist/example/navigation-bar/navigation-bar.wxss
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;}
2 changes: 2 additions & 0 deletions dist/example/navigation-bar/navigation_bar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Page({
});
29 changes: 29 additions & 0 deletions dist/example/navigation-bar/navigation_bar.wxml
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>
2 changes: 2 additions & 0 deletions dist/example/navigation-bar/navigation_bar.wxss
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;}
2 changes: 2 additions & 0 deletions dist/example/navigation_bar/navigation_bar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Page({
});
3 changes: 3 additions & 0 deletions dist/example/navigation_bar/navigation_bar.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"usingComponents": {}
}
Loading

0 comments on commit c7b3cd9

Please sign in to comment.