-
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.
- Loading branch information
Showing
459 changed files
with
4,941 additions
and
527 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
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,26 @@ | ||
require('./libs/Mixins.js'); | ||
|
||
const themeListeners = []; | ||
|
||
App({ | ||
globalData: { | ||
theme: 'light', // dark | ||
}, | ||
themeChanged(theme) { | ||
this.globalData.theme = theme; | ||
themeListeners.forEach((listener) => { | ||
listener(theme); | ||
}); | ||
}, | ||
watchThemeChange(listener) { | ||
if (themeListeners.indexOf(listener) < 0) { | ||
themeListeners.push(listener); | ||
} | ||
}, | ||
unWatchThemeChange(listener) { | ||
const index = themeListeners.indexOf(listener); | ||
if (index > -1) { | ||
themeListeners.splice(index, 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,69 @@ | ||
{ | ||
"pages": [ | ||
"example/index", | ||
|
||
"example/button/button", | ||
"example/input/input", | ||
"example/form/form", | ||
"example/form/form_page", | ||
"example/form/form_input_status", | ||
"example/form/form_vcode", | ||
"example/form/form_access", | ||
"example/form/form_checkbox", | ||
"example/form/form_radio", | ||
"example/form/form_switch", | ||
"example/form/form_select", | ||
"example/form/form_textarea", | ||
"example/list/list", | ||
"example/slideview/slideview", | ||
"example/slider/slider", | ||
"example/uploader/uploader", | ||
|
||
"example/article/article", | ||
"example/badge/badge", | ||
"example/flex/flex", | ||
"example/footer/footer", | ||
"example/gallery/gallery", | ||
"example/grid/grid", | ||
"example/icons/icons", | ||
"example/loading/loading", | ||
"example/loadmore/loadmore", | ||
"example/panel/panel", | ||
"example/preview/preview", | ||
"example/progress/progress", | ||
|
||
"example/actionsheet/actionsheet", | ||
"example/half-screen-dialog/half-screen-dialog", | ||
"example/dialog/dialog", | ||
"example/msg/msg", | ||
"example/msg/msg_text", | ||
"example/msg/msg_text_primary", | ||
"example/msg/msg_success", | ||
"example/msg/msg_warn", | ||
"example/msg/msg_custom_area_preview", | ||
"example/msg/msg_custom_area_tips", | ||
"example/msg/msg_custom_area_cell", | ||
"example/picker/picker", | ||
"example/toast/toast", | ||
"example/top-tips/top-tips", | ||
|
||
"example/navigation-bar/navigation-bar", | ||
"example/tabbar/tabbar", | ||
|
||
"example/searchbar/searchbar" | ||
], | ||
"window": { | ||
"navigationBarTextStyle": "black", | ||
"navigationBarTitleText": "WeUI for 小程序", | ||
"navigationBarBackgroundColor": "#EDEDED", | ||
"backgroundColor": "#EDEDED" | ||
}, | ||
"networkTimeout": { | ||
"request": 10000, | ||
"connectSocket": 10000, | ||
"uploadFile": 10000, | ||
"downloadFile": 10000 | ||
}, | ||
"style": "v2", | ||
"debug": true | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
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,23 @@ | ||
Page({ | ||
mixins: [require('../../mixin/themeChanged')], | ||
data: { | ||
showIOSDialog: false, | ||
showAndroidDialog: false, | ||
}, | ||
close: function() { | ||
this.setData({ | ||
showIOSDialog: false, | ||
showAndroidDialog: false | ||
}); | ||
}, | ||
openIOS: function () { | ||
this.setData({ | ||
showIOSDialog: true | ||
}); | ||
}, | ||
openAndroid: function () { | ||
this.setData({ | ||
showAndroidDialog: true | ||
}); | ||
} | ||
}); |
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,38 @@ | ||
<view class="page" data-weui-theme="{{theme}}"> | ||
<view class="page__hd"> | ||
<view class="page__title">ActionSheet</view> | ||
<view class="page__desc">弹出式菜单</view> | ||
</view> | ||
<view class="page__bd"> | ||
<view class="weui-btn-area"> | ||
<a class="weui-btn weui-btn_default" bindtap="openIOS">iOS ActionSheet</a> | ||
<a class="weui-btn weui-btn_default" bindtap="openAndroid">Android ActionSheet</a> | ||
</view> | ||
</view> | ||
<view wx:if="{{showIOSDialog}}" class="fadeIn" bindtap="close"> | ||
<view class="weui-mask"></view> | ||
<view class="weui-actionsheet weui-actionsheet_toggle"> | ||
<view class="weui-actionsheet__title"> | ||
<view class="weui-actionsheet__title-text">这是一个标题,可以为一行或者两行。</view> | ||
</view> | ||
<view class="weui-actionsheet__menu"> | ||
<view class="weui-actionsheet__cell">示例菜单</view> | ||
<view class="weui-actionsheet__cell">示例菜单</view> | ||
<view class="weui-actionsheet__cell weui-actionsheet__cell_warn">负向菜单</view> | ||
</view> | ||
<view class="weui-actionsheet__action"> | ||
<view class="weui-actionsheet__cell">取消</view> | ||
</view> | ||
</view> | ||
</view> | ||
<view wx:if="{{showAndroidDialog}}" class="weui-skin_android fadeIn" bindtap="close"> | ||
<view class="weui-mask"></view> | ||
<view class="weui-actionsheet"> | ||
<view class="weui-actionsheet__menu"> | ||
<view class="weui-actionsheet__cell">示例菜单</view> | ||
<view class="weui-actionsheet__cell">示例菜单</view> | ||
<view class="weui-actionsheet__cell">示例菜单</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,6 @@ | ||
/*! | ||
* WeUI v2.4.3 (https://github.com/weui/weui-wxss) | ||
* Copyright 2021 Tencent, Inc. | ||
* Licensed under the MIT license | ||
*/ | ||
.page{background-color:var(--weui-BG-2)} |
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({ | ||
mixins: [require('../../mixin/themeChanged')], | ||
}); |
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,36 @@ | ||
<view class="page" data-weui-theme="{{theme}}"> | ||
<view class="page__hd"> | ||
<view class="page__title">Article</view> | ||
<view class="page__desc">文章</view> | ||
</view> | ||
<view class="page__bd"> | ||
<view class="weui-article"> | ||
<view class="weui-article__h1">大标题</view> | ||
<view class="weui-article__section"> | ||
<view class="weui-article__h2">章标题</view> | ||
<view class="weui-article__section"> | ||
<view class="weui-article__h3">1.1 节标题</view> | ||
<view class="weui-article__p"> | ||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod | ||
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, | ||
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo | ||
consequat. | ||
</view> | ||
<view class="weui-article__p"> | ||
<image class="weui-article__img" src="../images/pic_article.png" mode="aspectFit" style="height: 180px" /> | ||
<image class="weui-article__img" src="../images/pic_article.png" mode="aspectFit" style="height: 180px" /> | ||
</view> | ||
</view> | ||
<view class="weui-article__section"> | ||
<view class="weui-article__h3">1.2 节标题</view> | ||
<view class="weui-article__p"> | ||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod | ||
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, | ||
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non | ||
proident, sunt in culpa qui officia deserunt mollit anim id est laborum. | ||
</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,6 @@ | ||
/*! | ||
* WeUI v2.4.3 (https://github.com/weui/weui-wxss) | ||
* Copyright 2021 Tencent, Inc. | ||
* Licensed under the MIT license | ||
*/ | ||
.page{background-color:var(--weui-BG-2)}image{margin:8rpx 0} |
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({ | ||
mixins: [require('../../mixin/themeChanged')], | ||
}); |
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,52 @@ | ||
<view class="page" data-weui-theme="{{theme}}"> | ||
<view class="page__hd"> | ||
<view class="page__title">Badge</view> | ||
<view class="page__desc">徽章</view> | ||
</view> | ||
<view class="page__bd"> | ||
<view class="weui-cells__title">新消息提示跟摘要信息后,统一在列表右侧</view> | ||
<view class="weui-cells"> | ||
<view class="weui-cell weui-cell_active weui-cell_access"> | ||
<view class="weui-cell__bd">单行列表</view> | ||
<view class="weui-cell__ft" style="font-size: 0;"> | ||
<text class="demo_badge_tips">详细信息</text> | ||
<text class="weui-badge weui-badge_dot"></text> | ||
</view> | ||
</view> | ||
</view> | ||
<view class="weui-cells__title">未读数红点跟在主题信息后,统一在列表左侧</view> | ||
<view class="weui-cells demo_badge_cells"> | ||
<view class="weui-cell weui-cell_active"> | ||
<view class="weui-cell__hd"> | ||
<image src="../images/pic_160.png"></image> | ||
<text class="weui-badge">8</text> | ||
</view> | ||
<view class="weui-cell__bd"> | ||
<view>联系人名称</view> | ||
<view class="demo_badge_desc">摘要信息</view> | ||
</view> | ||
</view> | ||
<view class="weui-cell weui-cell_active weui-cell_access"> | ||
<view class="weui-cell__bd"> | ||
<text class="demo_badge_title">单行列表</text> | ||
<text class="weui-badge">8</text> | ||
</view> | ||
<view class="weui-cell__ft"></view> | ||
</view> | ||
<view class="weui-cell weui-cell_active weui-cell_access"> | ||
<view class="weui-cell__bd"> | ||
<text class="demo_badge_title">单行列表</text> | ||
<text class="weui-badge">8</text> | ||
</view> | ||
<view class="weui-cell__ft">详细信息</view> | ||
</view> | ||
<view class="weui-cell weui-cell_active weui-cell_access"> | ||
<view class="weui-cell__bd"> | ||
<text class="demo_badge_title">单行列表</text> | ||
<text class="weui-badge">New</text> | ||
</view> | ||
<view class="weui-cell__ft"></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,6 @@ | ||
/*! | ||
* WeUI v2.4.3 (https://github.com/weui/weui-wxss) | ||
* Copyright 2021 Tencent, Inc. | ||
* Licensed under the MIT license | ||
*/ | ||
image{height:100rpx}.demo_badge_cells .weui-cell__hd{position:relative;margin-right:20rpx}.demo_badge_cells .weui-cell__hd image{width:100rpx;display:block}.demo_badge_cells .weui-cell__hd .weui-badge{position:absolute;top:-.4em;right:-.4em}.demo_badge_cells .weui-cell__bd .demo_badge_title{vertical-align:middle}.demo_badge_cells .weui-cell__bd .demo_badge_title+.weui-badge{margin-left:10rpx}.demo_badge_cells .weui-cell__bd .demo_badge_desc{font-size:26rpx;color:#888} |
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({ | ||
mixins: [require('../../mixin/themeChanged')], | ||
}); |
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,33 @@ | ||
<view class="page" data-weui-theme="{{theme}}"> | ||
<view class="page__hd"> | ||
<view class="page__title">Button</view> | ||
<view class="page__desc">按钮</view> | ||
</view> | ||
<view class="page__bd"> | ||
<view class="button-sp-area"> | ||
<a class="weui-btn weui-btn_primary">页面主操作</a> | ||
<a class="weui-btn weui-btn_primary weui-btn_loading"><text class="weui-primary-loading weui-primary-loading_transparent"><i class="weui-primary-loading__dot"></i></text>页面主操作</a> | ||
<a class="weui-btn weui-btn_disabled weui-btn_primary">页面主操作</a> | ||
<a class="weui-btn weui-btn_default">页面次要操作</a> | ||
<a class="weui-btn weui-btn_default weui-btn_loading"><text class="weui-primary-loading"><i class="weui-primary-loading__dot"></i></text>页面次操作</a> | ||
<a class="weui-btn weui-btn_disabled weui-btn_default">页面次要操作</a> | ||
<a class="weui-btn weui-btn_warn">警告类操作</a> | ||
<a class="weui-btn weui-btn_warn weui-btn_loading"><text class="weui-primary-loading"><i class="weui-primary-loading__dot"></i></text>警告类操作</a> | ||
<a class="weui-btn weui-btn_disabled weui-btn_warn">警告类操作</a> | ||
</view> | ||
<view class="button-sp-area cell"> | ||
<a class="weui-btn_cell weui-btn_cell-default">普通行按钮</a> | ||
<a class="weui-btn_cell weui-btn_cell-primary">强调行按钮</a> | ||
<a class="weui-btn_cell weui-btn_cell-primary"> | ||
<image class="weui-btn_cell__icon" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAAAuCAMAAABgZ9sFAAAAVFBMVEXx8fHMzMzr6+vn5+fv7+/t7e3d3d2+vr7W1tbHx8eysrKdnZ3p6enk5OTR0dG7u7u3t7ejo6PY2Njh4eHf39/T09PExMSvr6+goKCqqqqnp6e4uLgcLY/OAAAAnklEQVRIx+3RSRLDIAxE0QYhAbGZPNu5/z0zrXHiqiz5W72FqhqtVuuXAl3iOV7iPV/iSsAqZa9BS7YOmMXnNNX4TWGxRMn3R6SxRNgy0bzXOW8EBO8SAClsPdB3psqlvG+Lw7ONXg/pTld52BjgSSkA3PV2OOemjIDcZQWgVvONw60q7sIpR38EnHPSMDQ4MjDjLPozhAkGrVbr/z0ANjAF4AcbXmYAAAAASUVORK5CYII="></image> | ||
强调行按钮 | ||
</a> | ||
<a class="weui-btn_cell weui-btn_cell-warn">警告行按钮</a> | ||
</view> | ||
<view class="button-sp-area"> | ||
<a class="weui-btn weui-btn_mini weui-btn_primary">按钮</a> | ||
<a class="weui-btn weui-btn_mini weui-btn_default">按钮</a> | ||
<a class="weui-btn weui-btn_mini weui-btn_warn">按钮</a> | ||
</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,6 @@ | ||
/*! | ||
* WeUI v2.4.3 (https://github.com/weui/weui-wxss) | ||
* Copyright 2021 Tencent, Inc. | ||
* Licensed under the MIT license | ||
*/ | ||
.button-sp-area{padding-top:30rpx;text-align:center}.weui-btn_mini{margin-right:8rpx} |
Oops, something went wrong.