mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
Merge branch 'master' of gitlab.qima-inc.com:weapp/zui
This commit is contained in:
commit
96be32205f
7
app.json
7
app.json
@ -15,7 +15,9 @@
|
|||||||
"example/steps/index",
|
"example/steps/index",
|
||||||
"example/namecard/index",
|
"example/namecard/index",
|
||||||
"example/toast/index",
|
"example/toast/index",
|
||||||
"example/vsteps/index"
|
"example/vsteps/index",
|
||||||
|
"example/icon/index",
|
||||||
|
"example/dialog/index"
|
||||||
],
|
],
|
||||||
"window":{
|
"window":{
|
||||||
"navigationBarBackgroundColor": "#FAFAFA",
|
"navigationBarBackgroundColor": "#FAFAFA",
|
||||||
@ -23,5 +25,6 @@
|
|||||||
"navigationBarTextStyle":"black",
|
"navigationBarTextStyle":"black",
|
||||||
"backgroundTextStyle":"dark",
|
"backgroundTextStyle":"dark",
|
||||||
"backgroundColor": "#f9f9f9"
|
"backgroundColor": "#f9f9f9"
|
||||||
}
|
},
|
||||||
|
"debug": true
|
||||||
}
|
}
|
||||||
|
37
dist/dialog/index.wxss
vendored
37
dist/dialog/index.wxss
vendored
@ -1,41 +1,26 @@
|
|||||||
.zui-dialog,
|
|
||||||
.zui-dialog__mask {
|
.zui-dialog__mask {
|
||||||
position: absolute;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
}
|
|
||||||
|
|
||||||
.zui-dialog__mask {
|
|
||||||
background: rgba(0, 0, 0, 0.7);
|
background: rgba(0, 0, 0, 0.7);
|
||||||
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes slideUp {
|
|
||||||
0% {
|
|
||||||
transform: translateY(100%);
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
10% {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
transform: translateY(0);
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.zui-dialog__container {
|
.zui-dialog__container {
|
||||||
position: absolute;
|
position: fixed;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
width: 750rpx;
|
width: 750rpx;
|
||||||
background: white;
|
background: white;
|
||||||
transform: translateY(0);
|
transform: translateY(150%);
|
||||||
opacity: 0;
|
|
||||||
transition: all 0.4s ease;
|
transition: all 0.4s ease;
|
||||||
animation: slideUp 0.4s ease ;
|
|
||||||
animation-fill-mode: forwards;
|
|
||||||
animation-delay: 0.1s;
|
|
||||||
z-index: 11;
|
z-index: 11;
|
||||||
}
|
}
|
||||||
|
.zui-dialog--show .zui-dialog__container {
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
|
.zui-dialog--show .zui-dialog__mask {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
59
dist/icon/index.wxss
vendored
Normal file
59
dist/icon/index.wxss
vendored
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
/* DO NOT EDIT! Generated by fount */
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'zuiicon';
|
||||||
|
src: url('https://b.yzcdn.cn/zui/font/zuiicon-ca855b1878.eot');
|
||||||
|
src: url('https://b.yzcdn.cn/zui/font/zuiicon-ca855b1878.eot?#iefix') format('embedded-opentype'),
|
||||||
|
url('https://b.yzcdn.cn/zui/font/zuiicon-ca855b1878.woff2') format('woff2'),
|
||||||
|
url('https://b.yzcdn.cn/zui/font/zuiicon-ca855b1878.woff') format('woff'),
|
||||||
|
url('https://b.yzcdn.cn/zui/font/zuiicon-ca855b1878.ttf') format('truetype')
|
||||||
|
}
|
||||||
|
|
||||||
|
.zui-icon {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
.zui-icon::before {
|
||||||
|
font-family: "zuiicon" !important;
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: normal;
|
||||||
|
speak: none;
|
||||||
|
|
||||||
|
display: inline-block;
|
||||||
|
text-decoration: inherit;
|
||||||
|
width: 1em;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
/* For safety - reset parent styles, that can break glyph codes*/
|
||||||
|
font-variant: normal;
|
||||||
|
text-transform: none;
|
||||||
|
|
||||||
|
/* fix buttons height, for twitter bootstrap */
|
||||||
|
line-height: 1em;
|
||||||
|
|
||||||
|
/* Animation center compensation - margins should be symmetric */
|
||||||
|
/* remove if not needed */
|
||||||
|
/* margin-left: .2em; */
|
||||||
|
|
||||||
|
/* you can be more comfortable with increased icons size */
|
||||||
|
/* font-size: 120%; */
|
||||||
|
|
||||||
|
/* Font smoothing. That was taken from TWBS */
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
-moz-osx-font-smoothing: grayscale;
|
||||||
|
|
||||||
|
/* Uncomment for 3D effect */
|
||||||
|
/* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
|
||||||
|
}
|
||||||
|
/* DO NOT EDIT! Generated by fount */
|
||||||
|
|
||||||
|
|
||||||
|
.zui-icon-arrow:before { content: '\e800'; } /* '' */
|
||||||
|
.zui-icon-certificate:before { content: '\e801'; } /* '' */
|
||||||
|
.zui-icon-check:before { content: '\e802'; } /* '' */
|
||||||
|
.zui-icon-checked:before { content: '\e803'; } /* '' */
|
||||||
|
.zui-icon-close:before { content: '\e804'; } /* '' */
|
||||||
|
.zui-icon-gift:before { content: '\e805'; } /* '' */
|
||||||
|
.zui-icon-location:before { content: '\e806'; } /* '' */
|
||||||
|
.zui-icon-message:before { content: '\e807'; } /* '' */
|
||||||
|
.zui-icon-store:before { content: '\e808'; } /* '' */
|
||||||
|
.zui-icon-shopping-cart:before { content: '\e809'; } /* '' */
|
1
dist/index.wxss
vendored
1
dist/index.wxss
vendored
@ -15,3 +15,4 @@
|
|||||||
@import "toast/index.wxss";
|
@import "toast/index.wxss";
|
||||||
@import "toptips/index.wxss";
|
@import "toptips/index.wxss";
|
||||||
@import "vsteps/index.wxss";
|
@import "vsteps/index.wxss";
|
||||||
|
@import "icon/index.wxss";
|
||||||
|
2
dist/quantity/index.js
vendored
2
dist/quantity/index.js
vendored
@ -4,7 +4,7 @@ function handle(e, num) {
|
|||||||
var disabled = dataset.disabled;
|
var disabled = dataset.disabled;
|
||||||
var quantity = +dataset.quantity;
|
var quantity = +dataset.quantity;
|
||||||
|
|
||||||
if (disabled == 'true') return null;
|
if (disabled) return null;
|
||||||
|
|
||||||
callback.call(this, componentId, quantity + num);
|
callback.call(this, componentId, quantity + num);
|
||||||
}
|
}
|
||||||
|
2
dist/tab/index.wxml
vendored
2
dist/tab/index.wxml
vendored
@ -6,7 +6,7 @@
|
|||||||
</scroll-view>
|
</scroll-view>
|
||||||
</block>
|
</block>
|
||||||
<block wx:else>
|
<block wx:else>
|
||||||
<view class="zui-tab__bd">
|
<view class="zui-tab__bd {{fixed ? 'zui-tab__bd--fixed' : ''}}">
|
||||||
<template is="zui-tab-list" data="{{ tab, componentId }}"></template>
|
<template is="zui-tab-list" data="{{ tab, componentId }}"></template>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
|
@ -2,6 +2,60 @@ var app = getApp()
|
|||||||
|
|
||||||
Page({
|
Page({
|
||||||
data: {
|
data: {
|
||||||
|
list: [
|
||||||
|
{
|
||||||
|
name: 'Badge',
|
||||||
|
path: '/example/badge/index'
|
||||||
|
}, {
|
||||||
|
name: 'Button',
|
||||||
|
path: '/example/btn/index'
|
||||||
|
}, {
|
||||||
|
name: 'Cell',
|
||||||
|
path: '/example/cell/index'
|
||||||
|
}, {
|
||||||
|
name: 'Dialog',
|
||||||
|
path: '/example/dialog/index'
|
||||||
|
}, {
|
||||||
|
name: 'Form',
|
||||||
|
path: '/example/form/index'
|
||||||
|
}, {
|
||||||
|
name: 'Helper',
|
||||||
|
path: '/example/helper/index'
|
||||||
|
}, {
|
||||||
|
name: 'Icon',
|
||||||
|
path: '/example/icon/index'
|
||||||
|
}, {
|
||||||
|
name: 'Label',
|
||||||
|
path: '/example/label/index'
|
||||||
|
}, {
|
||||||
|
name: 'Loadmore',
|
||||||
|
path: '/example/loadmore/index'
|
||||||
|
}, {
|
||||||
|
name: 'Namecard',
|
||||||
|
path: '/example/namecard/index'
|
||||||
|
}, {
|
||||||
|
name: 'Panel',
|
||||||
|
path: '/example/panel/index'
|
||||||
|
}, {
|
||||||
|
name: 'Quantity',
|
||||||
|
path: '/example/quantity/index'
|
||||||
|
}, {
|
||||||
|
name: 'Steps',
|
||||||
|
path: '/example/steps/index'
|
||||||
|
}, {
|
||||||
|
name: 'Vsteps',
|
||||||
|
path: '/example/vsteps/index'
|
||||||
|
}, {
|
||||||
|
name: 'Tab',
|
||||||
|
path: '/example/tab/index'
|
||||||
|
}, {
|
||||||
|
name: 'Toast',
|
||||||
|
path: '/example/toast/index'
|
||||||
|
}, {
|
||||||
|
name: 'Toptips',
|
||||||
|
path: '/example/toptips/index'
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
onLoad: function () {
|
onLoad: function () {
|
||||||
|
@ -1,64 +1,8 @@
|
|||||||
<view class="container">
|
<view class="container">
|
||||||
|
|
||||||
<view class="zui-panel">
|
<view class="zui-panel">
|
||||||
<navigator class="zui-cell zui-cell--access" url="/example/btn/index">
|
<navigator wx:for="{{ list }}" wx:key="name" class="zui-cell zui-cell--access" url="{{ item.path }}">
|
||||||
<view class="zui-cell__bd">Button</view>
|
<view class="zui-cell__bd">{{ item.name }}</view>
|
||||||
<view class="zui-cell__ft"></view>
|
|
||||||
</navigator>
|
|
||||||
<navigator class="zui-cell zui-cell--access" url="/example/loadmore/index">
|
|
||||||
<view class="zui-cell__bd">Loadmore</view>
|
|
||||||
<view class="zui-cell__ft"></view>
|
|
||||||
</navigator>
|
|
||||||
<navigator class="zui-cell zui-cell--access" url="/example/panel/index">
|
|
||||||
<view class="zui-cell__bd">Panel</view>
|
|
||||||
<view class="zui-cell__ft"></view>
|
|
||||||
</navigator>
|
|
||||||
<navigator class="zui-cell zui-cell--access" url="/example/cell/index">
|
|
||||||
<view class="zui-cell__bd">Cell</view>
|
|
||||||
<view class="zui-cell__ft"></view>
|
|
||||||
</navigator>
|
|
||||||
<navigator class="zui-cell zui-cell--access" url="/example/badge/index">
|
|
||||||
<view class="zui-cell__bd">Badge</view>
|
|
||||||
<view class="zui-cell__ft"></view>
|
|
||||||
</navigator>
|
|
||||||
<navigator class="zui-cell zui-cell--access" url="/example/tab/index">
|
|
||||||
<view class="zui-cell__bd">Tab</view>
|
|
||||||
<view class="zui-cell__ft"></view>
|
|
||||||
</navigator>
|
|
||||||
<navigator class="zui-cell zui-cell--access" url="/example/label/index">
|
|
||||||
<view class="zui-cell__bd">Label</view>
|
|
||||||
<view class="zui-cell__ft"></view>
|
|
||||||
</navigator>
|
|
||||||
<navigator class="zui-cell zui-cell--access" url="/example/helper/index">
|
|
||||||
<view class="zui-cell__bd">Helper</view>
|
|
||||||
<view class="zui-cell__ft"></view>
|
|
||||||
</navigator>
|
|
||||||
<navigator class="zui-cell zui-cell--access" url="/example/form/index">
|
|
||||||
<view class="zui-cell__bd">Form</view>
|
|
||||||
<view class="zui-cell__ft"></view>
|
|
||||||
</navigator>
|
|
||||||
<navigator class="zui-cell zui-cell--access" url="/example/namecard/index">
|
|
||||||
<view class="zui-cell__bd">Namecard</view>
|
|
||||||
<view class="zui-cell__ft"></view>
|
|
||||||
</navigator>
|
|
||||||
<navigator class="zui-cell zui-cell--access" url="/example/quantity/index">
|
|
||||||
<view class="zui-cell__bd">Quantity</view>
|
|
||||||
<view class="zui-cell__ft"></view>
|
|
||||||
</navigator>
|
|
||||||
<navigator class="zui-cell zui-cell--access" url="/example/toptips/index">
|
|
||||||
<view class="zui-cell__bd">Toptips</view>
|
|
||||||
<view class="zui-cell__ft"></view>
|
|
||||||
</navigator>
|
|
||||||
<navigator class="zui-cell zui-cell--access" url="/example/steps/index">
|
|
||||||
<view class="zui-cell__bd">Steps</view>
|
|
||||||
<view class="zui-cell__ft"></view>
|
|
||||||
</navigator>
|
|
||||||
<navigator class="zui-cell zui-cell--access" url="/example/vsteps/index">
|
|
||||||
<view class="zui-cell__bd">Vsteps</view>
|
|
||||||
<view class="zui-cell__ft"></view>
|
|
||||||
</navigator>
|
|
||||||
<navigator class="zui-cell zui-cell--access zui-cell--last-child" url="/example/toast/index">
|
|
||||||
<view class="zui-cell__bd">Toast</view>
|
|
||||||
<view class="zui-cell__ft"></view>
|
<view class="zui-cell__ft"></view>
|
||||||
</navigator>
|
</navigator>
|
||||||
</view>
|
</view>
|
||||||
|
20
example/dialog/index.js
Normal file
20
example/dialog/index.js
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
var app = getApp()
|
||||||
|
|
||||||
|
Page({
|
||||||
|
data: {
|
||||||
|
showDialog: false
|
||||||
|
},
|
||||||
|
|
||||||
|
toggleDialog() {
|
||||||
|
this.setData({
|
||||||
|
showDialog: !this.data.showDialog
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
onLoad: function () {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
onShow: function() {
|
||||||
|
},
|
||||||
|
})
|
20
example/dialog/index.wxml
Normal file
20
example/dialog/index.wxml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<view class="container">
|
||||||
|
|
||||||
|
<view class="zui-btns">
|
||||||
|
<button
|
||||||
|
class="zui-btn zui-btn--primary zui-btn--big"
|
||||||
|
bindtap="toggleDialog"
|
||||||
|
style="margin-top: 40vh;"
|
||||||
|
>
|
||||||
|
显示弹层
|
||||||
|
</button>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="zui-dialog {{ showDialog ? 'zui-dialog--show' : '' }}">
|
||||||
|
<view class="zui-dialog__mask" bindtap="toggleDialog" />
|
||||||
|
<view class="zui-dialog__container">
|
||||||
|
<view style="padding: 100px 0; text-align: center;">内容</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
16
example/icon/index.js
Normal file
16
example/icon/index.js
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
Page({
|
||||||
|
data: {
|
||||||
|
icons: [
|
||||||
|
'arrow',
|
||||||
|
'certificate',
|
||||||
|
'check',
|
||||||
|
'checked',
|
||||||
|
'close',
|
||||||
|
'gift',
|
||||||
|
'location',
|
||||||
|
'message',
|
||||||
|
'store',
|
||||||
|
'shopping-cart',
|
||||||
|
]
|
||||||
|
}
|
||||||
|
});
|
14
example/icon/index.wxml
Normal file
14
example/icon/index.wxml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<view class="container">
|
||||||
|
<view class="zui-panel">
|
||||||
|
<view wx:for="{{ icons }}" wx:for-item="icon" class="icon-wrap">
|
||||||
|
<view class="zui-icon zui-icon-{{ icon }}" style="font-size: 20px; color: #ff4343;"></view>
|
||||||
|
<view class="icon-classname">zui-icon-{{ icon }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="zui-panel">
|
||||||
|
<view wx:for="{{ icons }}" wx:for-item="icon" class="icon-wrap">
|
||||||
|
<view class="zui-icon zui-icon-{{ icon }}" style="font-size: 40px;"></view>
|
||||||
|
<view class="icon-classname">zui-icon-{{ icon }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
14
example/icon/index.wxss
Normal file
14
example/icon/index.wxss
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
.icon-wrap {
|
||||||
|
width: 33.33333%;
|
||||||
|
height: 100px;
|
||||||
|
float: left;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.icon-classname {
|
||||||
|
color: #999;
|
||||||
|
font-size: 10px;
|
||||||
|
}
|
||||||
|
.zui-icon {
|
||||||
|
font-size: 40px;
|
||||||
|
margin: 20px;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user