merge: merge master

This commit is contained in:
jiangruowei
2017-03-15 16:31:00 +08:00
50 changed files with 979 additions and 58 deletions

View File

@@ -10,6 +10,11 @@
<zan-field type="text" placeholder="请输入用户名"></zan-field>
</zan-cell-group>
</example-block><example-block title="带border的输入框">
<div class="zan-field-wrapper">
<zan-field type="text" placeholder="请输入用户名" border=""></zan-field>
</div>
</example-block><example-block title="禁用的输入框">
<zan-cell-group>
<zan-field label="用户名:" type="text" placeholder="请输入用户名" v-model="username" disabled></zan-field>
@@ -21,7 +26,15 @@
</zan-cell-group>
</example-block></section></template>
<style>
@component-namespace demo {
@b field {
.zan-field-wrapper {
padding: 0 10px;
}
}
}
</style>
<script>
import Vue from "vue";import ExampleBlock from "../components/example-block";Vue.component("example-block", ExampleBlock);
export default {

View File

@@ -0,0 +1,22 @@
<template><section class="demo-swipe"><h1 class="demo-title">swipe</h1><example-block title="基础用法">
<zan-swipe>
<zan-swipe-item>
<img src="https://img.yzcdn.cn/upload_files/2017/03/14/FmTPs0SeyQaAOSK1rRe1sL8RcwSY.jpeg?imageView2/2/w/980/h/980/q/75/format/webp" alt="">
</zan-swipe-item>
<zan-swipe-item>
<img src="https://img.yzcdn.cn/upload_files/2017/03/14/FmTPs0SeyQaAOSK1rRe1sL8RcwSY.jpeg?imageView2/2/w/980/h/980/q/75/format/webp" alt="">
</zan-swipe-item>
</zan-swipe>
</example-block></section></template>
<style>
@component-namespace demo {
@b swipe {
.zan-swipe {
height: 200px;
}
}
}
</style>
<script>
import Vue from "vue";import ExampleBlock from "../components/example-block";Vue.component("example-block", ExampleBlock);</script>

View File

@@ -0,0 +1,29 @@
<template><section class="demo-uploader"><h1 class="demo-title">uploader</h1><example-block title="基础用法">
<div class="uploader-container">
<zan-uploader :before-read="logContent" @file-readed="logContent">
</zan-uploader>
</div>
</example-block><example-block title="自定义上传图标">
<div class="uploader-container">
<zan-uploader @file-readed="logContent">
<zan-icon name="camera"></zan-icon>
</zan-uploader>
</div>
</example-block></section></template>
<style>
.uploader-container {
padding: 5px 15px;
}
</style>
<script>
import Vue from "vue";import ExampleBlock from "../components/example-block";Vue.component("example-block", ExampleBlock);
export default {
methods: {
logContent(file) {
console.log(file)
}
}
};
</script>