mirror of
https://github.com/youzan/vant.git
synced 2025-10-19 10:07:07 +00:00
code review
This commit is contained in:
55
docs/examples-dist/layout.vue
Normal file
55
docs/examples-dist/layout.vue
Normal file
@@ -0,0 +1,55 @@
|
||||
<template><section class="demo-layout"><h1 class="demo-title">layout</h1><example-block title="常规用法">
|
||||
<zan-row>
|
||||
<zan-col span="8">
|
||||
<div class="gray"></div>
|
||||
</zan-col>
|
||||
<zan-col span="8">
|
||||
<div class="white"></div>
|
||||
</zan-col>
|
||||
<zan-col span="8">
|
||||
<div class="gray"></div>
|
||||
</zan-col>
|
||||
</zan-row>
|
||||
<zan-row>
|
||||
<zan-col offset="12" span="12">
|
||||
<div class="gray"></div>
|
||||
</zan-col>
|
||||
</zan-row>
|
||||
|
||||
</example-block><example-block title="在列元素之间增加间距">
|
||||
<zan-row gutter="10">
|
||||
<zan-col span="8">
|
||||
<div class="gray"></div>
|
||||
</zan-col>
|
||||
<zan-col span="8">
|
||||
<div class="white"></div>
|
||||
</zan-col>
|
||||
<zan-col span="8">
|
||||
<div class="gray"></div>
|
||||
</zan-col>
|
||||
</zan-row>
|
||||
|
||||
</example-block></section></template>
|
||||
<style>
|
||||
@component-namespace demo {
|
||||
@b layout {
|
||||
.zan-row {
|
||||
padding: 0 20px;
|
||||
}
|
||||
.zan-col {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.gray {
|
||||
height: 30px;
|
||||
background: #666;
|
||||
}
|
||||
.white {
|
||||
height: 30px;
|
||||
background: #fff;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
import Vue from "vue";import ExampleBlock from "../components/example-block";Vue.component("example-block", ExampleBlock);</script>
|
Reference in New Issue
Block a user