支持SSR、升级Vue版本和增加新的icon (#40)

* search component add new style

* update vue version and support ssr

* unit test

* add new icon

* new icon
This commit is contained in:
张敏
2017-06-15 19:46:56 +08:00
committed by Yao
parent 857da3a5ee
commit 0f5972e75e
59 changed files with 370 additions and 204 deletions
+4 -4
View File
@@ -7,7 +7,7 @@
</example-block><example-block title="禁用状态">
<div class="van-checkbox-wrapper">
<van-checkbox v-model="checkbox2">复选框2</van-checkbox>
<van-checkbox v-model="checkbox2" disabled>复选框2</van-checkbox>
</div>
@@ -15,7 +15,7 @@
</example-block><example-block title="Checkbox组">
<div class="van-checkbox-wrapper">
<van-checkbox-group v-model="result">
<van-checkbox v-for="item in list" :name="item">复选框{{item}}</van-checkbox>
<van-checkbox v-for="(item, index) in list" :key="index" :name="item">复选框{{item}}</van-checkbox>
</van-checkbox-group>
</div>
@@ -24,7 +24,7 @@
</example-block><example-block title="禁用Checkbox组">
<div class="van-checkbox-wrapper">
<van-checkbox-group v-model="result" disabled>
<van-checkbox v-for="item in list" :name="item">复选框{{item}}</van-checkbox>
<van-checkbox v-for="(item, index) in list" :key="index" :name="item">复选框{{item}}</van-checkbox>
</van-checkbox-group>
</div>
@@ -33,7 +33,7 @@
</example-block><example-block title="与Cell组件一起使用">
<van-checkbox-group v-model="result">
<van-cell-group>
<van-cell v-for="item in list">
<van-cell v-for="(item, index) in list" :key="index">
<van-checkbox :name="item">复选框{{item}}</van-checkbox>
</van-cell>
</van-cell-group>
+29 -4
View File
@@ -120,18 +120,42 @@
<van-icon name="password-view"></van-icon>
<span>password-view</span>
</van-col>
<van-col span="8">
<van-icon name="password-not-view"></van-icon>
<span>password-not-view</span>
</van-col>
<van-col span="8">
<van-icon name="wap-nav"></van-icon>
<span>wap-nav</span>
</van-col>
<van-col span="8">
<van-icon name="password-not-view"></van-icon>
<span>password-not-view</span>
</van-col>
<van-col span="8">
<van-icon name="wap-home"></van-icon>
<span>wap-home</span>
</van-col>
<van-col span="8">
<van-icon name="ecard-pay"></van-icon>
<span>ecard-pay</span>
</van-col>
<van-col span="8">
<van-icon name="balance-pay"></van-icon>
<span>balance-pay</span>
</van-col>
<van-col span="8">
<van-icon name="peer-pay"></van-icon>
<span>peer-pay</span>
</van-col>
<van-col span="8">
<van-icon name="credit-pay"></van-icon>
<span>credit-pay</span>
</van-col>
<van-col span="8">
<van-icon name="debit-pay"></van-icon>
<span>debit-pay</span>
</van-col>
<van-col span="8">
<van-icon name="other-pay"></van-icon>
<span>other-pay</span>
</van-col>
</van-row>
</example-block></section></template>
@@ -140,6 +164,7 @@
@b icon {
.van-col {
text-align: center;
height: 120px;
}
.van-icon {
+3 -3
View File
@@ -1,6 +1,6 @@
<template><section class="demo-lazyload"><h1 class="demo-title">Lazyload 图片懒加载</h1><example-block title="基础用法">
<ul class="image-list" ref="container">
<li v-for="img in imageList">
<li v-for="(img, index) in imageList" :key="index">
<img class="lazy-img" v-lazy="img">
</li>
</ul>
@@ -9,7 +9,7 @@
</example-block><example-block title="背景图懒加载">
<ul class="image-list" ref="container">
<li v-for="img in backgroundImageList">
<li v-for="(img, index) in backgroundImageList" :key="index">
<div class="lazy-background" v-lazy:background-image="img"></div>
</li>
</ul>
@@ -19,7 +19,7 @@
</example-block><example-block title="懒加载模块">
<lazy-component @show="handleComponentShow">
<ul class="image-list">
<li v-for="img in componentImageList">
<li v-for="(img, index) in componentImageList" :key="index">
<img class="lazy-img" v-lazy="img">
</li>
</ul>
+3 -3
View File
@@ -11,13 +11,13 @@
</example-block><example-block title="Inactive">
<div class="demo-progress__wrapper">
<van-progress class="demo-progress__demo1" :inactive="true" :percentage="0"></van-progress>
<van-progress class="demo-progress__demo1" inactive="" :percentage="0"></van-progress>
</div>
<div class="demo-progress__wrapper">
<van-progress class="demo-progress__demo2" :inactive="true" :percentage="46"></van-progress>
<van-progress class="demo-progress__demo2" inactive="" :percentage="46"></van-progress>
</div>
<div class="demo-progress__wrapper">
<van-progress class="demo-progress__demo1" :inactive="true" :percentage="100"></van-progress>
<van-progress class="demo-progress__demo1" inactive="" :percentage="100"></van-progress>
</div>
</example-block><example-block title="自定义颜色和文字">
+2 -2
View File
@@ -1,6 +1,6 @@
<template><section class="demo-swipe"><h1 class="demo-title">Swipe 轮播</h1><example-block title="基础用法">
<van-swipe>
<van-swipe-item v-for="img in images">
<van-swipe-item v-for="(img, index) in images" :key="index">
<a href="https://youzan.com" target="_blank">
<img v-lazy="img" alt="">
</a>
@@ -11,7 +11,7 @@
</example-block><example-block title="自动轮播">
<van-swipe auto-play="" @pagechange:end="handlePageEnd">
<van-swipe-item v-for="img in autoImages">
<van-swipe-item v-for="(img, index) in autoImages" :key="index">
<img v-lazy="img" alt="">
</van-swipe-item>
</van-swipe>
+4 -4
View File
@@ -17,11 +17,11 @@
</example-block><example-block title="禁用状态">
<van-row>
<van-col span="12">
<van-switch class="some-customized-class" v-model="switchStateTrue" :disabled="true"></van-switch>
<van-switch class="some-customized-class" v-model="switchStateTrue" disabled></van-switch>
<div class="demo-switch__text">打开</div>
</van-col>
<van-col span="12">
<van-switch class="some-customized-class" v-model="switchStateFalse" :disabled="true"></van-switch>
<van-switch class="some-customized-class" v-model="switchStateFalse" disabled></van-switch>
<div class="demo-switch__text">关闭</div>
</van-col>
</van-row>
@@ -31,11 +31,11 @@
</example-block><example-block title="loading状态">
<van-row>
<van-col span="12">
<van-switch class="some-customized-class" v-model="switchStateTrue" :loading="true"></van-switch>
<van-switch class="some-customized-class" v-model="switchStateTrue" loading=""></van-switch>
<div class="demo-switch__text">打开</div>
</van-col>
<van-col span="12">
<van-switch class="some-customized-class" v-model="switchStateFalse" :loading="true"></van-switch>
<van-switch class="some-customized-class" v-model="switchStateFalse" loading=""></van-switch>
<div class="demo-switch__text">关闭</div>
</van-col>
</van-row>
+2
View File
@@ -5,6 +5,8 @@
</van-uploader>
</div>
</example-block></section></template>
<style>
.uploader-container {
+1 -1
View File
@@ -2,7 +2,7 @@
<p class="page-desc">当即将滚动到元素底部时会自动加载更多</p>
<div class="waterfall">
<div v-waterfall-lower="loadMore" waterfall-disabled="isWaterfallDisabled" waterfall-offset="400">
<div class="waterfall-item" v-for="item in list" style="text-align: center;">
<div class="waterfall-item" v-for="(item, index) in list" :key="index" style="text-align: center;">
{{ item }}
</div>
<van-loading v-if="loading" :type="'circle'" :color="'black'"></van-loading>