[Doc] remove doc-page

This commit is contained in:
陈嘉涵 2018-07-30 10:53:07 +08:00
parent 1f34ff1a18
commit 2f6ec315cb
64 changed files with 863 additions and 1049 deletions

View File

@ -1,5 +1,4 @@
App({
globalData: {
},
globalData: {}
});

View File

@ -36,7 +36,7 @@
"navigationBarTitleText": "vant-weapp",
"navigationBarTextStyle": "black",
"backgroundTextStyle": "dark",
"backgroundColor": "#f9f9f9"
"backgroundColor": "#f8f8f8"
},
"debug": true
}

View File

@ -2,42 +2,10 @@
page {
color: #333;
background: #f8f8f8;
min-height: 100vh;
box-sizing: border-box;
padding: 15rpx 0;
-webkit-font-smoothing: antialiased;
font-family: 'PingFang SC', Helvetica, 'STHeiti STXihei', 'Microsoft YaHei', Tohoma, Arial, sans-serif;
}
.container {
background: #F9F9F9;
overflow: hidden;
min-height: 100vh;
box-sizing: border-box;
padding: 15px 0;
}
.container::before {
position: fixed;
top: 0;
left: 0;
content: ' ';
width: 100%;
height: 1rpx;
background-color: #e2e2e2;
z-index: 5;
}
.doc-title {
position: relative;
padding: 15px 0;
margin: 10px 15px;
line-height: 25px;
font-size: 25px;
color: #666;
}
.doc-description {
margin: 14px 0;
padding: 0 15px;
font-size: 14px;
line-height: 20px;
color: #666;
}

View File

@ -1,12 +0,0 @@
Component({
properties: {
title: {
type: String,
value: ''
},
withoutPadding: {
type: Boolean
}
}
});

View File

@ -1,3 +0,0 @@
{
"component": true
}

View File

@ -1,6 +0,0 @@
<view class="doc-container">
<view class="doc-title">{{ title }}</view>
<view class="doc-content {{ withoutPadding ? 'doc-content--without-pd' : '' }}">
<slot></slot>
</view>
</view>

View File

@ -1,27 +0,0 @@
.doc-container {
background: #F9F9F9;
overflow: hidden;
min-height: 100vh;
box-sizing: border-box;
padding: 15px 0;
}
.doc-title {
position: relative;
padding: 15px 0;
margin: 10px 15px;
line-height: 25px;
font-size: 25px;
color: #666;
border-bottom: 1rpx solid #e5e5e5;
}
.doc-content {
padding: 15px;
overflow: hidden;
color: #666;
}
.doc-content--without-pd {
padding: 15px 0;
}

View File

@ -2,7 +2,6 @@
"navigationBarTitleText": "Actionsheet 上拉菜单",
"usingComponents": {
"van-actionsheet": "../../dist/actionsheet/index",
"van-button": "../../dist/button/index",
"doc-page": "../../components/doc-page/index"
"van-button": "../../dist/button/index"
}
}

View File

@ -1,18 +1,15 @@
<view class="van-buttons" style="margin-top: 30vh;">
<van-button bind:buttonclick="openActionsheet">
Actionsheet
</van-button>
</view>
<doc-page title="ACTIONSHEET">
<view class="van-buttons" style="margin-top: 30vh;">
<van-button bind:buttonclick="openActionsheet">
Actionsheet
</van-button>
</view>
<van-actionsheet
show="{{ show }}"
actions="{{ actions }}"
cancel-text="{{ cancelText }}"
cancel-with-mask="{{ cancelWithMask }}"
bind:cancel="closeActionSheet"
bind:actionclick="clickAction"
mask-class="tiny"
/>
</doc-page>
<van-actionsheet
show="{{ show }}"
actions="{{ actions }}"
cancel-text="{{ cancelText }}"
cancel-with-mask="{{ cancelWithMask }}"
bind:cancel="closeActionSheet"
bind:actionclick="clickAction"
mask-class="tiny"
/>

View File

@ -1,7 +1,5 @@
<view class="container">
<view class="doc-title van-hairline--bottom van-hairline--bottom">BADGE</view>
<view class="demo">
<view class="demo__item">
<view class="demo__icon">

View File

@ -3,7 +3,6 @@
"usingComponents": {
"van-button": "../../dist/button/index",
"van-button-group": "../../dist/button-group/index",
"van-panel": "../../dist/panel/index",
"doc-page": "../../components/doc-page/index"
"van-panel": "../../dist/panel/index"
}
}

View File

@ -1,55 +1,51 @@
<doc-page title="BUTTON" without-padding>
<van-panel title="普通按钮">
<van-button-group>
<van-button
open-type="getPhoneNumber"
bind:getphonenumber="getPhoneNumber"
>获取电话</van-button>
<van-button type="primary">确认付款</van-button>
<van-button type="danger">确认付款</van-button>
<van-button type="warn">确认付款</van-button>
</van-button-group>
</van-panel>
<van-panel title="普通按钮">
<van-button-group>
<van-button
open-type="getPhoneNumber"
bind:getphonenumber="getPhoneNumber"
>获取电话</van-button>
<van-button type="primary">确认付款</van-button>
<van-button type="danger">确认付款</van-button>
<van-button type="warn">确认付款</van-button>
</van-button-group>
</van-panel>
<van-panel title="大号按钮,没有边框线及圆角">
<van-button size="large" type="primary">确认付款</van-button>
<van-button size="large" type="warn">立即购买</van-button>
<van-button size="large" type="danger">立即购买</van-button>
</van-panel>
<van-panel title="大号按钮,没有边框线及圆角">
<van-button size="large" type="primary">确认付款</van-button>
<van-button size="large" type="warn">立即购买</van-button>
<van-button size="large" type="danger">立即购买</van-button>
</van-panel>
<van-panel title="小号按钮">
<van-button-group>
<van-button size="small">取消订单</van-button>
<van-button size="small" type="primary">确认付款</van-button>
</van-button-group>
</van-panel>
<van-panel title="小号按钮">
<van-button-group>
<van-button size="small">取消订单</van-button>
<van-button size="small" type="primary">确认付款</van-button>
</van-button-group>
</van-panel>
<van-panel title="迷你按钮">
<van-button-group>
<van-button size="mini">取消订单</van-button>
<van-button size="mini" type="primary">确认付款</van-button>
<van-button size="mini" type="warn">确认付款</van-button>
<van-button size="mini" type="danger">确认付款</van-button>
</van-button-group>
</van-panel>
<van-panel title="迷你按钮">
<van-button-group>
<van-button size="mini">取消订单</van-button>
<van-button size="mini" type="primary">确认付款</van-button>
<van-button size="mini" type="warn">确认付款</van-button>
<van-button size="mini" type="danger">确认付款</van-button>
</van-button-group>
</van-panel>
<van-panel title="Loading">
<van-button-group>
<van-button loading>取消订单</van-button>
<van-button loading type="primary">确认付款</van-button>
<van-button loading type="danger">确认付款</van-button>
<van-button loading type="warn">确认付款</van-button>
</van-button-group>
</van-panel>
<van-panel title="Loading">
<van-button-group>
<van-button loading>取消订单</van-button>
<van-button loading type="primary">确认付款</van-button>
<van-button loading type="danger">确认付款</van-button>
<van-button loading type="warn">确认付款</van-button>
</van-button-group>
</van-panel>
<van-panel title="Disabled">
<van-button-group>
<van-button disabled>取消订单</van-button>
<van-button disabled type="primary">确认付款</van-button>
<van-button disabled type="danger">确认付款</van-button>
<van-button disabled type="warn">确认付款</van-button>
</van-button-group>
</van-panel>
</doc-page>
<van-panel title="Disabled">
<van-button-group>
<van-button disabled>取消订单</van-button>
<van-button disabled type="primary">确认付款</van-button>
<van-button disabled type="danger">确认付款</van-button>
<van-button disabled type="warn">确认付款</van-button>
</van-button-group>
</van-panel>

View File

@ -2,7 +2,6 @@
"navigationBarTitleText": "Capsule 胶囊",
"usingComponents": {
"van-panel": "../../dist/panel/index",
"van-capsule": "../../dist/capsule/index",
"doc-page": "../../components/doc-page/index"
"van-capsule": "../../dist/capsule/index"
}
}

View File

@ -1,15 +1,12 @@
<doc-page title="CAPSULE" without-padding>
<van-panel title='基本用法'>
<view class="capsule-demo">
<van-capsule leftText="折扣" rightText="限购一份" />
<van-capsule type="danger" leftText="折扣" rightText="限购一份" />
</view>
</van-panel>
<van-panel title='基本用法'>
<view class="capsule-demo">
<van-capsule leftText="折扣" rightText="限购一份" />
<van-capsule type="danger" leftText="折扣" rightText="限购一份" />
</view>
</van-panel>
<van-panel title='自定义颜色'>
<view class="capsule-demo">
<van-capsule color="#38f" leftText="折扣" rightText="限购一份" />
</view>
</van-panel>
</doc-page>
<van-panel title='自定义颜色'>
<view class="capsule-demo">
<van-capsule color="#38f" leftText="折扣" rightText="限购一份" />
</view>
</van-panel>

View File

@ -2,7 +2,6 @@
"navigationBarTitleText": "Card 卡片",
"usingComponents": {
"van-card": "../../dist/card/index",
"van-panel": "../../dist/panel/index",
"doc-page": "../../components/doc-page/index"
"van-panel": "../../dist/panel/index"
}
}

View File

@ -1,30 +1,27 @@
<doc-page title="CAPSULE" without-padding>
<van-panel without-border>
<van-card
card-class="test-card"
thumb="https://img.yzcdn.cn/upload_files/2016/11/25/FpqPXlrMRjKwJs8VdTu3ZDJCj4j5.jpeg?imageView2/2/w/200/h/200/q/90/format/jpeg"
price="999.99"
title="红烧牛肉【虚拟商品】【有库存】【有sku】"
num="2"
desc="3000克 50%"
status="已发货"
>
</van-card>
<van-panel without-border>
<van-card
card-class="test-card"
thumb="https://img.yzcdn.cn/upload_files/2016/11/25/FpqPXlrMRjKwJs8VdTu3ZDJCj4j5.jpeg?imageView2/2/w/200/h/200/q/90/format/jpeg"
price="999.99"
title="红烧牛肉【虚拟商品】【有库存】【有sku】"
num="2"
desc="3000克 50%"
status="已发货"
>
</van-card>
</van-panel>
</van-panel>
<van-panel title="使用slot">
<van-card
card-class="test-card"
thumb="https://img.yzcdn.cn/upload_files/2016/11/25/FpqPXlrMRjKwJs8VdTu3ZDJCj4j5.jpeg?imageView2/2/w/200/h/200/q/90/format/jpeg"
useThumbSlot="{{ true }}"
useDetailSlot="{{ true }}"
>
<!-- 右侧详情 -->
<view slot="detail-slot" class="van-card__detail">
我是自定义内容区域
</view>
</van-card>
</van-panel>
</doc-page>
<van-panel title="使用slot">
<van-card
card-class="test-card"
thumb="https://img.yzcdn.cn/upload_files/2016/11/25/FpqPXlrMRjKwJs8VdTu3ZDJCj4j5.jpeg?imageView2/2/w/200/h/200/q/90/format/jpeg"
useThumbSlot="{{ true }}"
useDetailSlot="{{ true }}"
>
<!-- 右侧详情 -->
<view slot="detail-slot" class="van-card__detail">
我是自定义内容区域
</view>
</van-card>
</van-panel>

View File

@ -5,7 +5,6 @@
"van-icon": "../../dist/icon/index",
"van-badge": "../../dist/badge/index",
"van-panel": "../../dist/panel/index",
"van-cell-group": "../../dist/cell-group/index",
"doc-page": "../../components/doc-page/index"
"van-cell-group": "../../dist/cell-group/index"
}
}

View File

@ -1,66 +1,64 @@
<doc-page title="CELL" without-padding>
<van-cell-group border class="cell-panel-demo">
<van-cell title="单行列表" bindtap="handleTap"></van-cell>
</van-cell-group>
<van-cell-group border class="cell-panel-demo">
<van-cell title="单行列表" bindtap="handleTap"></van-cell>
</van-cell-group>
<van-cell-group border class="cell-panel-demo">
<van-cell title="单行列表" value="详细信息"></van-cell>
</van-cell-group>
<van-cell-group border class="cell-panel-demo">
<van-cell title="单行列表" value="详细信息"></van-cell>
</van-cell-group>
<van-cell-group border class="cell-panel-demo">
<van-cell title="单行列表" label="附加描述" value="详细信息"></van-cell>
</van-cell-group>
<van-cell-group border class="cell-panel-demo">
<van-cell title="单行列表" label="附加描述" value="详细信息"></van-cell>
</van-cell-group>
<van-panel class="cell-panel-demo" title="带 icon 的 cell">
<van-cell title="单行列表" value="详细信息">
<van-icon slot="icon" type="checked"></van-icon>
</van-cell>
</van-panel>
<van-panel class="cell-panel-demo" title="带 icon 的 cell">
<van-cell title="单行列表" value="详细信息">
<van-icon slot="icon" type="checked"></van-icon>
</van-cell>
</van-panel>
<van-panel class="cell-panel-demo">
<van-cell title="单行列表">
<picker mode="date" value="{{date}}" start="2018-07-01" end="2018-09-01" bindchange="bindDateChange">
<view class="picker">
选择日期: {{date}}
</view>
</picker>
</van-cell>
</van-panel>
<van-panel class="cell-panel-demo">
<van-cell title="单行列表">
<picker mode="date" value="{{date}}" start="2018-07-01" end="2018-09-01" bindchange="bindDateChange">
<view class="picker">
选择日期: {{date}}
</view>
</picker>
</van-cell>
</van-panel>
<van-panel class="cell-panel-demo" title="带箭头的 cell">
<van-panel class="cell-panel-demo" title="带箭头的 cell">
<van-cell title="只显示箭头" is-link></van-cell>
</van-panel>
<van-cell-group border class="cell-panel-demo">
<van-cell
title="跳转到首页"
is-link
url="/pages/dashboard/index"
bindtap="handleTap"
></van-cell>
</van-cell-group>
<van-panel class="cell-panel-demo" title="cell 组">
<van-cell-group>
<van-cell title="只显示箭头" is-link></van-cell>
</van-panel>
<van-cell-group border class="cell-panel-demo">
<van-cell title="跳转到首页" is-link url="/pages/dashboard/index"></van-cell>
<van-cell
title="跳转到首页"
is-link
only-tap-footer
url="/pages/dashboard/index"
title="只有 footer 点击有效"
bindtap="handleTap"
></van-cell>
</van-cell-group>
<van-panel class="cell-panel-demo" title="cell 组">
<van-cell-group>
<van-cell title="只显示箭头" is-link></van-cell>
<van-cell title="跳转到首页" is-link url="/pages/dashboard/index"></van-cell>
<van-cell
is-link
only-tap-footer
url="/pages/dashboard/index"
title="只有 footer 点击有效"
bindtap="handleTap"
></van-cell>
<block wx:if="{{ show }}">
<van-cell no-border title="单行列表" label="附加描述" value="不想有 border"></van-cell>
<van-cell title="表单">
<input slot="footer" type="digit" placeholder="带小数点的数字键盘"/>
</van-cell>
</block>
<van-cell title="开关">
<switch slot="footer" checked/>
<block wx:if="{{ show }}">
<van-cell no-border title="单行列表" label="附加描述" value="不想有 border"></van-cell>
<van-cell title="表单">
<input slot="footer" type="digit" placeholder="带小数点的数字键盘"/>
</van-cell>
</van-cell-group>
</van-panel>
</doc-page>
</block>
<van-cell title="开关">
<switch slot="footer" checked/>
</van-cell>
</van-cell-group>
</van-panel>

View File

@ -4,7 +4,6 @@
"van-checkbox-group": "../../dist/checkbox-group/index",
"van-checkbox": "../../dist/checkbox/index",
"van-panel": "../../dist/panel/index",
"van-cell": "../../dist/cell/index",
"doc-page": "../../components/doc-page/index"
"van-cell": "../../dist/cell/index"
}
}

View File

@ -1,43 +1,41 @@
<doc-page title="checkbox" without-padding>
<van-panel title='基本用法'>
<van-panel title='基本用法'>
<van-checkbox
checkbox-class="checkbox-demo"
bindchange="handleCheckboxChange"
>复选框</van-checkbox>
</van-panel>
<van-panel title='禁用状态'>
<van-checkbox
checkbox-class="checkbox-demo"
disabled
checked="{{ true }}"
>复选框</van-checkbox>
</van-panel>
<van-panel title='禁用内容部分点击事件'>
<van-checkbox
checkbox-class="checkbox-demo"
label-disabled
>复选框</van-checkbox>
</van-panel>
<van-panel title='Checkbox组'>
<van-checkbox-group>
<van-checkbox
checkbox-class="checkbox-demo"
wx:for="{{ items }}"
wx:for-item="item"
wx:for-index="index"
wx:key="{{ value }}"
checked="{{ item.checked }}"
data-index="{{ index }}"
bindchange="handleCheckboxChange"
>复选框</van-checkbox>
</van-panel>
>复选框 {{ item.value }}</van-checkbox>
</van-checkbox-group>
</van-panel>
<van-panel title='禁用状态'>
<van-checkbox
checkbox-class="checkbox-demo"
disabled
checked="{{ true }}"
>复选框</van-checkbox>
</van-panel>
<van-panel title='禁用内容部分点击事件'>
<van-checkbox
checkbox-class="checkbox-demo"
label-disabled
>复选框</van-checkbox>
</van-panel>
<van-panel title='Checkbox组'>
<van-checkbox-group>
<van-checkbox
wx:for="{{ items }}"
wx:for-item="item"
wx:for-index="index"
wx:key="{{ value }}"
checked="{{ item.checked }}"
data-index="{{ index }}"
bindchange="handleCheckboxChange"
>复选框 {{ item.value }}</van-checkbox>
</van-checkbox-group>
</van-panel>
<van-panel title='列表模式'>
<van-checkbox type="list">复选框 a</van-checkbox>
<van-checkbox type="list">复选框 b</van-checkbox>
<van-checkbox type="list">复选框 c</van-checkbox>
</van-panel>
</doc-page>
<van-panel title='列表模式'>
<van-checkbox type="list">复选框 a</van-checkbox>
<van-checkbox type="list">复选框 b</van-checkbox>
<van-checkbox type="list">复选框 c</van-checkbox>
</van-panel>

View File

@ -1,5 +1,5 @@
.container {
padding: 60px 0 20px;
padding-top: 45px;
}
.title {

View File

@ -4,7 +4,6 @@
"van-date-picker": "../../dist/datetime-picker/index",
"van-cell": "../../dist/cell/index",
"van-cell-group": "../../dist/cell-group/index",
"van-panel": "../../dist/panel/index",
"doc-page": "../../components/doc-page/index"
"van-panel": "../../dist/panel/index"
}
}

View File

@ -1,58 +1,55 @@
<doc-page title="DATETIME PICKER" without-padding>
<van-panel class="picker-panel-demo">
<van-cell-group>
<van-cell title="选择时间">
<van-date-picker
slot="footer"
date="{{ date }}"
bindchange="change"
bindcancel="cancel"
placeholder="异步初始值"
placeholder-class="my-customer-class-name"
/>
</van-cell>
<van-panel class="picker-panel-demo">
<van-cell-group>
<van-cell title="选择时间">
<van-date-picker
slot="footer"
date="{{ date }}"
bindchange="change"
bindcancel="cancel"
placeholder="异步初始值"
placeholder-class="my-customer-class-name"
/>
</van-cell>
<van-cell title="选择时间">
<van-date-picker
slot="footer"
not-use="{{['years', 'seconds']}}"
bindchange="change"
bindcancel="cancel"
placeholder="只显示部分列的 picker"
/>
</van-cell>
<van-cell title="选择时间">
<van-date-picker
slot="footer"
not-use="{{['years', 'seconds']}}"
bindchange="change"
bindcancel="cancel"
placeholder="只显示部分列的 picker"
/>
</van-cell>
<van-cell title="选择时间">
<van-date-picker
slot="footer"
bindchange="change"
bindcancel="cancel"
placeholder="自定义显示格式的 picker"
format="选择的是YYYY-MM-DD HH:mm:ss"
/>
</van-cell>
</van-cell-group>
</van-panel>
<van-cell title="选择时间">
<van-date-picker
slot="footer"
bindchange="change"
bindcancel="cancel"
placeholder="自定义显示格式的 picker"
format="选择的是YYYY-MM-DD HH:mm:ss"
/>
</van-cell>
</van-cell-group>
</van-panel>
<van-panel class="picker-panel-demo">
<van-cell title="选择时间" value="{{pickerView1 || '自定义组件'}}"></van-cell>
<van-date-picker
picker-view
bindchange="customChange"
bindcancel="cancel"
/>
</van-panel>
<van-panel class="picker-panel-demo">
<van-cell title="选择时间" value="{{pickerView1 || '自定义组件'}}"></van-cell>
<van-date-picker
picker-view
bindchange="customChange"
bindcancel="cancel"
/>
</van-panel>
<van-panel class="picker-panel-demo">
<van-cell title="选择时间" value="{{ pickerView2 || '只显示部分列'}}"></van-cell>
<van-date-picker
picker-view
bindchange="nativeChange"
bindcancel="cancel"
not-use="{{['years', 'seconds']}}"
/>
</van-panel>
</doc-page>
<van-panel class="picker-panel-demo">
<van-cell title="选择时间" value="{{ pickerView2 || '只显示部分列'}}"></van-cell>
<van-date-picker
picker-view
bindchange="nativeChange"
bindcancel="cancel"
not-use="{{['years', 'seconds']}}"
/>
</van-panel>

View File

@ -1,7 +1,6 @@
{
"navigationBarTitleText": "Dialog 弹出框",
"usingComponents": {
"doc-page": "../../components/doc-page/index",
"van-dialog": "../../dist/dialog/index",
"van-button": "../../dist/button/index",
"van-button-group": "../../dist/button-group/index",

View File

@ -1,19 +1,17 @@
<doc-page title="DIALOG">
<van-button-group style="margin-top: 30vh; display: block;">
<van-button bindtap="toggleBaseDialog">基础 Dialog</van-button>
<van-button bindtap="toggleWithoutTitleDialog">Dialog - 无标题</van-button>
<van-button bindtap="toggleButtonDialog">Dialog - 自定义显示按钮</van-button>
<van-button bindtap="toggleVerticalDialog">Dialog - 按钮纵向排布</van-button>
<van-button bindtap="toggleOpenDialog">Dialog - 获取 Open 数据的弹窗</van-button>
<van-button bindtap="toggleCloseDialog">Dialog - 控制弹窗关闭</van-button>
</van-button-group>
<van-button-group style="margin-top: 30vh; display: block;">
<van-button bindtap="toggleBaseDialog">基础 Dialog</van-button>
<van-button bindtap="toggleWithoutTitleDialog">Dialog - 无标题</van-button>
<van-button bindtap="toggleButtonDialog">Dialog - 自定义显示按钮</van-button>
<van-button bindtap="toggleVerticalDialog">Dialog - 按钮纵向排布</van-button>
<van-button bindtap="toggleOpenDialog">Dialog - 获取 Open 数据的弹窗</van-button>
<van-button bindtap="toggleCloseDialog">Dialog - 控制弹窗关闭</van-button>
</van-button-group>
<van-dialog id="van-base-dialog"></van-dialog>
<van-dialog id="van-no-title-dialog"></van-dialog>
<van-dialog id="van-button-dialog"></van-dialog>
<van-dialog id="van-vertical-dialog"></van-dialog>
<van-dialog id="van-open-dialog"></van-dialog>
<van-dialog id="van-close-dialog"></van-dialog>
<van-dialog id="van-base-dialog"></van-dialog>
<van-dialog id="van-no-title-dialog"></van-dialog>
<van-dialog id="van-button-dialog"></van-dialog>
<van-dialog id="van-vertical-dialog"></van-dialog>
<van-dialog id="van-open-dialog"></van-dialog>
<van-dialog id="van-close-dialog"></van-dialog>
<van-toast id="van-toast"></van-toast>
</doc-page>
<van-toast id="van-toast"></van-toast>

View File

@ -5,7 +5,6 @@
"van-button-group": "../../dist/button-group/index",
"van-cell-group": "../../dist/cell-group/index",
"van-field": "../../dist/field/index",
"van-panel": "../../dist/panel/index",
"doc-page": "../../components/doc-page/index"
"van-panel": "../../dist/panel/index"
}
}

View File

@ -1,96 +1,94 @@
<doc-page title="Field" without-padding>
<!-- Field 基础用法 -->
<van-panel title="基础用法">
<van-cell-group>
<van-field
title="{{ config.base.name.title }}"
placeholder="{{ config.base.name.placeholder }}"
focus="{{ config.base.name.focus }}"
value="{{ value }}"
>
</van-field>
<van-field
title="{{ config.base.tel.title }}"
placeholder="{{ config.base.tel.placeholder }}"
error="{{ config.base.tel.error }}"
input-type="{{ config.base.tel.inputType }}"
>
</van-field>
<van-field
title="{{ config.base.address.title }}"
type="{{ config.base.address.type }}"
placeholder="{{ config.base.address.placeholder }}"
maxlength="50"
>
</van-field>
<van-field
title="{{ config.base.disabled.title }}"
value="{{ config.base.disabled.value }}"
disabled="{{ config.base.disabled.disabled }}"
>
</van-field>
</van-cell-group>
</van-panel>
<van-button-group>
<van-button type="primary" bind:buttonclick="clearInput">清除输入</van-button>
</van-button-group>
<!-- 去除标题后的输入框样式 -->
<van-panel title="无标题输入框">
<!-- Field 基础用法 -->
<van-panel title="基础用法">
<van-cell-group>
<van-field
placeholder="{{ config.notitle.placeholder }}"
value="{{ textareaValue }}"
>
</van-field>
</van-panel>
<van-button-group>
<van-button type="primary" bind:buttonclick="clearTextarea">清除输入</van-button>
</van-button-group>
<!-- 使用 Field 圆角样式 -->
<van-panel title="圆角输入框">
<van-field
title="{{ config.radius.totalPrice.title }}"
type="{{ config.radius.totalPrice.type }}"
placeholder="{{ config.radius.totalPrice.placeholder }}"
right="{{ config.radius.totalPrice.right }}"
mode="{{ config.radius.totalPrice.mode }}"
title="{{ config.base.name.title }}"
placeholder="{{ config.base.name.placeholder }}"
focus="{{ config.base.name.focus }}"
value="{{ value }}"
>
</van-field>
<van-field
class="van-field--radius"
title="{{ config.radius.excludePrice.title }}"
type="{{ config.radius.excludePrice.type }}"
placeholder="{{ config.radius.excludePrice.placeholder }}"
right="{{ config.radius.excludePrice.right }}"
mode="{{ config.radius.excludePrice.mode }}"
error="{{ config.radius.excludePrice.error }}"
title="{{ config.base.tel.title }}"
placeholder="{{ config.base.tel.placeholder }}"
error="{{ config.base.tel.error }}"
input-type="{{ config.base.tel.inputType }}"
>
</van-field>
<van-field
placeholder="{{ config.radius.notitle.placeholder }}"
mode="{{ config.radius.notitle.mode }}"
input-type="{{ config.radius.notitle.inputTitle }}"
title="{{ config.base.address.title }}"
type="{{ config.base.address.type }}"
placeholder="{{ config.base.address.placeholder }}"
maxlength="50"
>
</van-field>
</van-panel>
<van-field
title="{{ config.base.disabled.title }}"
value="{{ config.base.disabled.value }}"
disabled="{{ config.base.disabled.disabled }}"
>
</van-field>
</van-cell-group>
</van-panel>
<van-panel title="Form 表单中的field应用">
<form bindsubmit="formSubmit" bindreset="formReset">
<van-field
name="{{ config.form.name.name }}"
placeholder="{{ config.form.name.placeholder }}"
>
</van-field>
<van-field
name="{{ config.form.tel.name }}"
placeholder="{{ config.form.tel.placeholder }}"
input-type="{{ config.form.tel.inputType }}"
>
</van-field>
<button type="primary" form-type="submit">提交表单</button>
</form>
</van-panel>
</doc-page>
<van-button-group>
<van-button type="primary" bind:buttonclick="clearInput">清除输入</van-button>
</van-button-group>
<!-- 去除标题后的输入框样式 -->
<van-panel title="无标题输入框">
<van-field
placeholder="{{ config.notitle.placeholder }}"
value="{{ textareaValue }}"
>
</van-field>
</van-panel>
<van-button-group>
<van-button type="primary" bind:buttonclick="clearTextarea">清除输入</van-button>
</van-button-group>
<!-- 使用 Field 圆角样式 -->
<van-panel title="圆角输入框">
<van-field
title="{{ config.radius.totalPrice.title }}"
type="{{ config.radius.totalPrice.type }}"
placeholder="{{ config.radius.totalPrice.placeholder }}"
right="{{ config.radius.totalPrice.right }}"
mode="{{ config.radius.totalPrice.mode }}"
>
</van-field>
<van-field
class="van-field--radius"
title="{{ config.radius.excludePrice.title }}"
type="{{ config.radius.excludePrice.type }}"
placeholder="{{ config.radius.excludePrice.placeholder }}"
right="{{ config.radius.excludePrice.right }}"
mode="{{ config.radius.excludePrice.mode }}"
error="{{ config.radius.excludePrice.error }}"
>
</van-field>
<van-field
placeholder="{{ config.radius.notitle.placeholder }}"
mode="{{ config.radius.notitle.mode }}"
input-type="{{ config.radius.notitle.inputTitle }}"
>
</van-field>
</van-panel>
<van-panel title="Form 表单中的field应用">
<form bindsubmit="formSubmit" bindreset="formReset">
<van-field
name="{{ config.form.name.name }}"
placeholder="{{ config.form.name.placeholder }}"
>
</van-field>
<van-field
name="{{ config.form.tel.name }}"
placeholder="{{ config.form.tel.placeholder }}"
input-type="{{ config.form.tel.inputType }}"
>
</van-field>
<button type="primary" form-type="submit">提交表单</button>
</form>
</van-panel>

View File

@ -3,7 +3,6 @@
"usingComponents": {
"van-cell": "../../dist/cell/index",
"van-panel": "../../dist/panel/index",
"van-cell-group": "../../dist/cell-group/index",
"doc-page": "../../components/doc-page/index"
"van-cell-group": "../../dist/cell-group/index"
}
}

View File

@ -1,59 +1,57 @@
<doc-page title="HELPER" without-padding>
<view class="van-panel">
<van-cell>
<view class="van-pull-right">van-pull-right: 往右靠</view>
</van-cell>
<view class="van-panel">
<van-cell>
<view class="van-pull-right">van-pull-right: 往右靠</view>
</van-cell>
<van-cell>
<view class="van-text-deleted">van-text-deleted被删除的效果</view>
</van-cell>
<van-cell>
<view class="van-text-deleted">van-text-deleted被删除的效果</view>
</van-cell>
<van-cell>
<view>
<view class="van-font-12">van-font-12字号12</view>
<view class="van-font-12 van-font-bold">van-font-bold再来个加粗</view>
</view>
</van-cell>
<van-cell>
<view>
<view class="van-font-12">van-font-12字号12</view>
<view class="van-font-12 van-font-bold">van-font-bold再来个加粗</view>
</view>
</van-cell>
<van-cell>
<view>
<view class="van-font-16">van-font-16字号16</view>
<view class="van-font-16 van-font-bold">van-font-bold再来个加粗</view>
</view>
</van-cell>
<van-cell>
<view>
<view class="van-font-16">van-font-16字号16</view>
<view class="van-font-16 van-font-bold">van-font-bold再来个加粗</view>
</view>
</van-cell>
<van-cell>
<view class="">
<view>字体颜色</view>
<view class="van-c-red">van-c-red: 红色</view>
<view class="van-c-gray">van-c-gray: 灰色</view>
<view class="van-c-gray-dark">van-c-gray-dark: 再灰一点点</view>
<view class="van-c-gray-darker">van-c-gray-darker: 更深的灰色</view>
<view class="van-c-black">van-c-black: 黑色</view>
<view class="van-c-blue">van-c-blue: 蓝色</view>
<view class="van-c-green">van-c-green: 绿色</view>
</view>
</van-cell>
<van-cell>
<view class="">
<view>字体颜色</view>
<view class="van-c-red">van-c-red: 红色</view>
<view class="van-c-gray">van-c-gray: 灰色</view>
<view class="van-c-gray-dark">van-c-gray-dark: 再灰一点点</view>
<view class="van-c-gray-darker">van-c-gray-darker: 更深的灰色</view>
<view class="van-c-black">van-c-black: 黑色</view>
<view class="van-c-blue">van-c-blue: 蓝色</view>
<view class="van-c-green">van-c-green: 绿色</view>
</view>
</van-cell>
<van-cell>
<view>van-arrow箭头</view>
<view class="van-arrow"></view>
</van-cell>
<van-cell>
<view>van-arrow箭头</view>
<view class="van-arrow"></view>
</van-cell>
<van-cell>
<view class="van-ellipsis" style="width: 300px;">
van-ellipsis单行点点点
->我是占位的字符我是占位的字符我是占位的字符我是占位的字符我是占位的字符我是占位的字符
</view>
</van-cell>
<van-cell>
<view class="van-ellipsis" style="width: 300px;">
van-ellipsis单行点点点
->我是占位的字符我是占位的字符我是占位的字符我是占位的字符我是占位的字符我是占位的字符
</view>
</van-cell>
<van-cell>
<view class="van-ellipsis--l2">
van-ellipsis--l2单行点点点
->我是占位的字符我是占位的字符我是占位的字符我是占位的字符我是占位的字符我是占位的字符
</view>
</van-cell>
<van-cell>
<view class="van-ellipsis--l2">
van-ellipsis--l2单行点点点
->我是占位的字符我是占位的字符我是占位的字符我是占位的字符我是占位的字符我是占位的字符
</view>
</van-cell>
</view>
</view>
</doc-page>

View File

@ -1,7 +1,6 @@
{
"navigationBarTitleText": "Icon 图标",
"usingComponents": {
"van-icon": "../../dist/icon/index",
"doc-page": "../../components/doc-page/index"
"van-icon": "../../dist/icon/index"
}
}

View File

@ -1,8 +1,6 @@
<doc-page title="ICON">
<view wx:for="{{ icons }}" wx:for-item="icon" wx:key="icon" class="icon-wrap">
<view class="example-icon">
<van-icon type="{{ icon }}"></van-icon>
</view>
<view class="icon-classname">van-icon-{{ icon }}</view>
<view wx:for="{{ icons }}" wx:for-item="icon" wx:key="icon" class="icon-wrap">
<view class="example-icon">
<van-icon type="{{ icon }}"></van-icon>
</view>
</doc-page>
<view class="icon-classname">van-icon-{{ icon }}</view>
</view>

View File

@ -2,7 +2,6 @@
"usingComponents": {
"van-row": "../../dist/row/index",
"van-col": "../../dist/col/index",
"van-panel": "../../dist/panel/index",
"doc-page": "../../components/doc-page/index"
"van-panel": "../../dist/panel/index"
}
}

View File

@ -1,21 +1,17 @@
<doc-page title="LAYOUT" without-padding>
<van-panel title="基础用法">
<van-row>
<van-col col="8" col-class="custom-van-col">span: 8</van-col>
<van-col col="8" col-class="custom-van-col">span: 8</van-col>
<van-col col="8" col-class="custom-van-col">span: 8</van-col>
</van-row>
</van-panel>
<van-panel title="基础用法">
<van-row>
<van-col col="8" col-class="custom-van-col">span: 8</van-col>
<van-col col="8" col-class="custom-van-col">span: 8</van-col>
<van-col col="8" col-class="custom-van-col">span: 8</van-col>
</van-row>
</van-panel>
<van-panel title="利用 offset 布局">
<van-row>
<van-col col="4" col-class="custom-van-col">span: 4</van-col>
<van-col col="10" offset="4" col-class="custom-van-col">offset: 4, span: 10</van-col>
</van-row>
<van-row>
<van-col col="12" offset="12" col-class="custom-van-col">offset: 12, span: 12</van-col>
</van-row>
</van-panel>
</doc-page>
<van-panel title="利用 offset 布局">
<van-row>
<van-col col="4" col-class="custom-van-col">span: 4</van-col>
<van-col col="10" offset="4" col-class="custom-van-col">offset: 4, span: 10</van-col>
</van-row>
<van-row>
<van-col col="12" offset="12" col-class="custom-van-col">offset: 12, span: 12</van-col>
</van-row>
</van-panel>

View File

@ -1,7 +1,5 @@
<view class="container">
<view class="doc-title van-hairline--bottom">LOADING</view>
<view class="van-panel-title">circle</view>
<view class="loading-example van-panel">
<van-loading type="circle"></van-loading>

View File

@ -2,7 +2,6 @@
"navigationBarTitleText": "loadmore 加载",
"usingComponents": {
"van-panel": "../../dist/panel/index",
"van-loadmore": "../../dist/loadmore/index",
"doc-page": "../../components/doc-page/index"
"van-loadmore": "../../dist/loadmore/index"
}
}

View File

@ -1,11 +1,9 @@
<doc-page title="LOADMORE" without-padding>
<van-panel title="nodata">
<van-loadmore type="text"></van-loadmore>
</van-panel>
<van-panel title="loading">
<van-loadmore type="loading"></van-loadmore>
</van-panel>
<van-panel title="text">
<van-loadmore type="text" text="暂无数据"></van-loadmore>
</van-panel>
</doc-page>
<van-panel title="nodata">
<van-loadmore type="text"></van-loadmore>
</van-panel>
<van-panel title="loading">
<van-loadmore type="loading"></van-loadmore>
</van-panel>
<van-panel title="text">
<van-loadmore type="text" text="暂无数据"></van-loadmore>
</van-panel>

View File

@ -2,7 +2,6 @@
"navigationBarTitleText": "Noticebar 通告栏",
"usingComponents": {
"van-noticebar": "../../dist/noticebar/index",
"van-panel": "../../dist/panel/index",
"doc-page": "../../components/doc-page/index"
"van-panel": "../../dist/panel/index"
}
}

View File

@ -1,54 +1,51 @@
<doc-page title="NOTICEBAR" without-padding>
<van-panel title="滚动通告栏">
<van-noticebar
text="{{ bar1.text }}"
scrollable="{{ bar1.scrollable }}"
/>
</van-panel>
<van-panel title="滚动通告栏">
<van-noticebar
text="{{ bar1.text }}"
scrollable="{{ bar1.scrollable }}"
/>
</van-panel>
<van-panel title="延时滚动通告栏">
<van-noticebar
text="{{ bar1.text }}"
scrollable="{{ bar1.scrollable }}"
delay="{{ bar1.delay }}"
/>
</van-panel>
<van-panel title="延时滚动通告栏">
<van-noticebar
text="{{ bar1.text }}"
scrollable="{{ bar1.scrollable }}"
delay="{{ bar1.delay }}"
/>
</van-panel>
<van-panel title="初始速度低滚动通告栏">
<van-noticebar
text="{{ bar1.text }}"
scrollable="{{ bar1.scrollable }}"
speed="{{ bar5.speed }}"
/>
</van-panel>
<van-panel title="初始速度低滚动通告栏">
<van-noticebar
text="{{ bar1.text }}"
scrollable="{{ bar1.scrollable }}"
speed="{{ bar5.speed }}"
/>
</van-panel>
<van-panel title="改变颜色通告栏">
<van-noticebar
text="{{ bar2.text }}"
color="{{ bar2.color }}"
background-color="{{ bar2.backgroundColor }}"
/>
</van-panel>
<van-panel title="改变颜色通告栏">
<van-noticebar
text="{{ bar2.text }}"
color="{{ bar2.color }}"
background-color="{{ bar2.backgroundColor }}"
/>
</van-panel>
<van-panel title="静止通告栏">
<van-noticebar
text="{{ bar3.text }}"
/>
</van-panel>
<van-panel title="静止通告栏">
<van-noticebar
text="{{ bar3.text }}"
/>
</van-panel>
<van-panel title="带icon公告">
<van-noticebar
text="{{ bar4.text }}"
left-icon="{{ bar4.leftIcon }}"
/>
</van-panel>
<van-panel title="带icon公告">
<van-noticebar
text="{{ bar4.text }}"
left-icon="{{ bar4.leftIcon }}"
/>
</van-panel>
<van-panel title="可关闭公告">
<van-noticebar
text="{{ bar5.text }}"
mode="{{ bar5.mode }}"
/>
</van-panel>
</doc-page>
<van-panel title="可关闭公告">
<van-noticebar
text="{{ bar5.text }}"
mode="{{ bar5.mode }}"
/>
</van-panel>

View File

@ -1,7 +1,6 @@
{
"navigationBarTitleText": "Panel 面板",
"usingComponents": {
"van-panel": "../../dist/panel/index",
"doc-page": "../../components/doc-page/index"
"van-panel": "../../dist/panel/index"
}
}

View File

@ -1,15 +1,11 @@
<doc-page title="PANEL" without-padding>
<van-panel class="panel-example">
<view style="padding: 15px;">PANEL 内容区域</view>
</van-panel>
<van-panel class="panel-example">
<view style="padding: 15px;">PANEL 内容区域</view>
</van-panel>
<van-panel title="标题" class="panel-example">
<view style="padding: 15px;">带有标题的 PANEL</view>
</van-panel>
<van-panel title="标题" class="panel-example">
<view style="padding: 15px;">带有标题的 PANEL</view>
</van-panel>
<van-panel title="标题" hide-border="{{ true }}" class="panel-example">
<view style="padding: 15px;">无边框的panel</view>
</van-panel>
</doc-page>
<van-panel title="标题" hide-border="{{ true }}" class="panel-example">
<view style="padding: 15px;">无边框的panel</view>
</van-panel>

View File

@ -1,7 +1,6 @@
{
"navigationBarTitleText": "Popup 弹出层",
"usingComponents": {
"doc-page": "../../components/doc-page/index",
"van-popup": "../../dist/popup/index",
"van-button": "../../dist/button/index",
"van-button-group": "../../dist/button-group/index"

View File

@ -1,89 +1,86 @@
<doc-page title="POPUP">
<van-button-group style="margin-top: 10vh;display: block;">
<van-button class="van-button" bind:buttonclick="togglePopup">
弹出popup
</van-button>
<van-button class="van-button" bind:buttonclick="toggleTopPopup">
从顶部弹出popup
</van-button>
<van-button class="van-button" bind:buttonclick="toggleBottomPopup">
从底部弹出popup
</van-button>
<van-button class="van-button" bind:buttonclick="toggleLeftPopup">
从左边弹出popup
</van-button>
<van-button class="van-button" bind:buttonclick="toggleRightPopup">
从右边弹出popup
</van-button>
</van-button-group>
<van-button-group style="margin-top: 10vh;display: block;">
<van-button class="van-button" bind:buttonclick="togglePopup">
弹出popup
</van-button>
<van-button class="van-button" bind:buttonclick="toggleTopPopup">
从顶部弹出popup
</van-button>
<van-button class="van-button" bind:buttonclick="toggleBottomPopup">
从底部弹出popup
</van-button>
<van-button class="van-button" bind:buttonclick="toggleLeftPopup">
从左边弹出popup
</van-button>
<van-button class="van-button" bind:buttonclick="toggleRightPopup">
从右边弹出popup
</van-button>
</van-button-group>
<!-- 中间弹出框 -->
<van-popup
show="{{ showPopup }}"
bindclose="togglePopup"
>
<view class="pop-example__container">
<view class="van-buttons">
<button class="van-button" bindtap="togglePopup">
关闭 popup
</button>
</view>
<!-- 中间弹出框 -->
<van-popup
show="{{ showPopup }}"
bindclose="togglePopup"
>
<view class="pop-example__container">
<view class="van-buttons">
<button class="van-button" bindtap="togglePopup">
关闭 popup
</button>
</view>
</van-popup>
</view>
</van-popup>
<!-- 左侧弹出框 -->
<van-popup
show="{{ showLeftPopup }}"
type="left"
bindclose="toggleLeftPopup"
>
<view class="pop-example__container pop-example__container--left">
<view class="van-buttons">
<button class="van-button" bindtap="toggleLeftPopup">
关闭 popup
</button>
</view>
<!-- 左侧弹出框 -->
<van-popup
show="{{ showLeftPopup }}"
type="left"
bindclose="toggleLeftPopup"
>
<view class="pop-example__container pop-example__container--left">
<view class="van-buttons">
<button class="van-button" bindtap="toggleLeftPopup">
关闭 popup
</button>
</view>
</van-popup>
</view>
</van-popup>
<!-- 右侧弹出框 -->
<van-popup
show="{{ showRightPopup }}"
type="right"
bindclose="toggleRightPopup"
>
<view class="pop-example__container pop-example__container--right">
<view class="van-buttons">
<button class="van-button" catchtap="toggleRightPopup">
关闭 popup
</button>
</view>
<!-- 右侧弹出框 -->
<van-popup
show="{{ showRightPopup }}"
type="right"
bindclose="toggleRightPopup"
>
<view class="pop-example__container pop-example__container--right">
<view class="van-buttons">
<button class="van-button" catchtap="toggleRightPopup">
关闭 popup
</button>
</view>
</van-popup>
</view>
</van-popup>
<!-- 顶部弹出框 -->
<van-popup
show="{{ showTopPopup }}"
overlay="{{ false }}"
type="top"
bindclose="toggleTopPopup"
>
<view class="pop-example--top">内容</view>
</van-popup>
<!-- 顶部弹出框 -->
<van-popup
show="{{ showTopPopup }}"
overlay="{{ false }}"
type="top"
bindclose="toggleTopPopup"
>
<view class="pop-example--top">内容</view>
</van-popup>
<!-- 底部弹出框 -->
<van-popup
show="{{ showBottomPopup }}"
type="bottom"
bindclose="toggleBottomPopup"
>
<view class="pop-example__container pop-example__container--bottom">
<view class="van-buttons">
<button class="van-button" catchtap="toggleBottomPopup">
关闭 popup
</button>
</view>
<!-- 底部弹出框 -->
<van-popup
show="{{ showBottomPopup }}"
type="bottom"
bindclose="toggleBottomPopup"
>
<view class="pop-example__container pop-example__container--bottom">
<view class="van-buttons">
<button class="van-button" catchtap="toggleBottomPopup">
关闭 popup
</button>
</view>
</van-popup>
</doc-page>
</view>
</van-popup>

View File

@ -3,7 +3,6 @@
"usingComponents": {
"van-radio": "../../dist/radio/index",
"van-panel": "../../dist/panel/index",
"van-cell": "../../dist/cell/index",
"doc-page": "../../components/doc-page/index"
"van-cell": "../../dist/cell/index"
}
}

View File

@ -1,35 +1,33 @@
<doc-page title="radio" without-padding>
<van-panel title='基本用法'>
<van-radio
items="{{ items }}"
></van-radio>
</van-panel>
<van-panel title='基本用法'>
<van-radio
items="{{ items }}"
></van-radio>
</van-panel>
<van-panel title='禁用状态'>
<van-radio
items="{{ items1 }}"
></van-radio>
</van-panel>
<van-panel title='禁用状态'>
<van-radio
items="{{ items1 }}"
></van-radio>
</van-panel>
<van-panel title='事件'>
<van-radio
items="{{ items }}"
bind:change="handleRadioChange"
></van-radio>
</van-panel>
<van-panel title='事件'>
<van-radio
items="{{ items }}"
bind:change="handleRadioChange"
></van-radio>
</van-panel>
<van-panel title='自定义样式'>
<van-radio
items="{{ items }}"
radio-color="radio-color"
radio-class="radio-demo"
></van-radio>
</van-panel>
<van-panel title='自定义样式'>
<van-radio
items="{{ items }}"
radio-color="radio-color"
radio-class="radio-demo"
></van-radio>
</van-panel>
<van-panel title='列表模式'>
<van-radio
items="{{ items }}"
type="list"
></van-radio>
</van-panel>
</doc-page>
<van-panel title='列表模式'>
<van-radio
items="{{ items }}"
type="list"
></van-radio>
</van-panel>

View File

@ -3,7 +3,6 @@
"usingComponents": {
"van-icon": "../icon/index",
"van-search": "../../dist/search/index",
"van-panel": "../../dist/panel/index",
"doc-page": "../../components/doc-page/index"
"van-panel": "../../dist/panel/index"
}
}

View File

@ -1,51 +1,48 @@
<doc-page title="Search" without-padding>
<van-panel title='基本用法'>
<van-search
alignLeft="{{ true }}"
placeholder="搜索..."
keyword="{{ inputValue }}"
placeholder="搜索商品"
focus="{{ focus }}"
bindchange="searchChange"
bindsearch="searchDone"
/>
</van-panel>
<van-panel title='基本用法'>
<van-search
alignLeft="{{ true }}"
placeholder="搜索..."
keyword="{{ inputValue }}"
placeholder="搜索商品"
focus="{{ focus }}"
bindchange="searchChange"
bindsearch="searchDone"
/>
</van-panel>
<van-panel title='不可用'>
<van-search
alignLeft="{{ true }}"
placeholder="搜索..."
disabled="{{ true }}"
placeholder="搜索商品"
/>
</van-panel>
<van-panel title='不可用'>
<van-search
alignLeft="{{ true }}"
placeholder="搜索..."
disabled="{{ true }}"
placeholder="搜索商品"
/>
</van-panel>
<van-panel title='自定义样式'>
<van-search
alignLeft="{{ true }}"
placeholder="搜索..."
searchStyle="height: 88rpx; padding: 0 30rpx; background: {{ searchbg || '#F2F2F2' }};"
inputStyle="height: 56rpx; border-radius: 8rpx;"
keyword="{{ inputValue }}"
placeholder="搜索商品"
focus="{{ focus }}"
bindchange="searchChange"
bindsearch="searchDone"
/>
</van-panel>
<van-panel title='自定义样式'>
<van-search
alignLeft="{{ true }}"
placeholder="搜索..."
searchStyle="height: 88rpx; padding: 0 30rpx; background: {{ searchbg || '#F2F2F2' }};"
inputStyle="height: 56rpx; border-radius: 8rpx;"
keyword="{{ inputValue }}"
placeholder="搜索商品"
focus="{{ focus }}"
bindchange="searchChange"
bindsearch="searchDone"
/>
</van-panel>
<van-panel title='取消按钮'>
<van-search
alignLeft="{{ true }}"
placeholder="搜索..."
keyword="{{ inputValue }}"
placeholder="搜索商品"
focus="{{ focus }}"
useCancel="{{ true }}"
bindchange="searchChange"
bindsearch="searchDone"
bindcancel="handleCancel"
/>
</van-panel>
</doc-page>
<van-panel title='取消按钮'>
<van-search
alignLeft="{{ true }}"
placeholder="搜索..."
keyword="{{ inputValue }}"
placeholder="搜索商品"
focus="{{ focus }}"
useCancel="{{ true }}"
bindchange="searchChange"
bindsearch="searchDone"
bindcancel="handleCancel"
/>
</van-panel>

View File

@ -1,7 +1,6 @@
{
"navigationBarTitleText": "Select 选择",
"usingComponents": {
"doc-page": "../../components/doc-page/index",
"van-panel": "../../dist/panel/index",
"van-select": "../../dist/select/index"
}

View File

@ -1,20 +1,18 @@
<doc-page title="SELECT" without-padding>
<van-panel title='基本用法'>
<van-select
items="{{ items }}"
data-type="base"
checkedValue="{{ checked.base }}"
bind:change="handleSelectChange"
/>
</van-panel>
<van-panel title='基本用法'>
<van-select
items="{{ items }}"
data-type="base"
checkedValue="{{ checked.base }}"
bind:change="handleSelectChange"
/>
</van-panel>
<van-panel title='自定义高亮颜色'>
<van-select
items="{{ items }}"
data-type="color"
checkedValue="{{ checked.color }}"
activeColor="{{ activeColor }}"
bind:change="handleSelectChange"
/>
</van-panel>
</doc-page>
<van-panel title='自定义高亮颜色'>
<van-select
items="{{ items }}"
data-type="color"
checkedValue="{{ checked.color }}"
activeColor="{{ activeColor }}"
bind:change="handleSelectChange"
/>
</van-panel>

View File

@ -2,7 +2,6 @@
"navigationBarTitleText": "Stepper 计数器",
"usingComponents": {
"van-stepper": "../../dist/stepper/index",
"van-panel": "../../dist/panel/index",
"doc-page": "../../components/doc-page/index"
"van-panel": "../../dist/panel/index"
}
}

View File

@ -1,62 +1,60 @@
<doc-page title="Stepper" without-padding>
<van-panel title="基础用法">
<view style="padding: 40px 15px">
<van-stepper
stepper="{{ stepper1.stepper }}"
min="{{ stepper1.min }}"
data-component-id="stepper1"
bind:change="handleZanStepperChange"
>
</van-stepper>
</view>
</van-panel>
<van-panel title="基础用法">
<view style="padding: 40px 15px">
<van-stepper
stepper="{{ stepper1.stepper }}"
min="{{ stepper1.min }}"
data-component-id="stepper1"
bind:change="handleZanStepperChange"
>
</van-stepper>
</view>
</van-panel>
<!-- small size -->
<van-panel title="不同尺寸-小尺寸类型">
<view style="padding: 40px 15px">
<view style="margin-bottom: 5px">small:</view>
<van-stepper
stepper="{{ stepper2.stepper }}"
min="{{ stepper2.min }}"
max="{{ stepper2.max }}"
size="small"
data-component-id="stepper2"
bind:change="handleZanStepperChange"
<!-- small size -->
<van-panel title="不同尺寸-小尺寸类型">
<view style="padding: 40px 15px">
<view style="margin-bottom: 5px">small:</view>
<van-stepper
stepper="{{ stepper2.stepper }}"
min="{{ stepper2.min }}"
max="{{ stepper2.max }}"
size="small"
data-component-id="stepper2"
bind:change="handleZanStepperChange"
></van-stepper>
></van-stepper>
<view style="margin: 10px 0 5px;">middle:</view>
<van-stepper
stepper="{{ stepper2.stepper }}"
min="{{ stepper2.min }}"
max="{{ stepper2.max }}"
data-component-id="stepper2-1"
bind:change="handleZanStepperChange"
></van-stepper>
<view style="margin: 10px 0 5px;">middle:</view>
<van-stepper
stepper="{{ stepper2.stepper }}"
min="{{ stepper2.min }}"
max="{{ stepper2.max }}"
data-component-id="stepper2-1"
bind:change="handleZanStepperChange"
></van-stepper>
<view style="margin: 10px 0 5px;">large:</view>
<van-stepper
stepper="{{ stepper2.stepper }}"
min="{{ stepper2.min }}"
max="{{ stepper2.max }}"
size="large"
data-component-id="stepper2-2"
bind:change="handleZanStepperChange"
></van-stepper>
</view>
</van-panel>
<view style="margin: 10px 0 5px;">large:</view>
<van-stepper
stepper="{{ stepper2.stepper }}"
min="{{ stepper2.min }}"
max="{{ stepper2.max }}"
size="large"
data-component-id="stepper2-2"
bind:change="handleZanStepperChange"
></van-stepper>
</view>
</van-panel>
<van-panel title="高级用法-每次变动数量自定义">
<view style="padding: 40px 15px">
<van-stepper
stepper="{{ stepper3.stepper }}"
min="{{ stepper3.min }}"
max="{{ stepper3.max }}"
step="{{ stepper3.step }}"
data-component-id="stepper3"
bind:change="handleZanStepperChange"
>
</van-stepper>
</view>
</van-panel>
</doc-page>
<van-panel title="高级用法-每次变动数量自定义">
<view style="padding: 40px 15px">
<van-stepper
stepper="{{ stepper3.stepper }}"
min="{{ stepper3.min }}"
max="{{ stepper3.max }}"
step="{{ stepper3.step }}"
data-component-id="stepper3"
bind:change="handleZanStepperChange"
>
</van-stepper>
</view>
</van-panel>

View File

@ -4,7 +4,6 @@
"van-cell": "../../dist/cell/index",
"van-cell-group": "../../dist/cell-group/index",
"van-panel": "../../dist/panel/index",
"van-steps": "../../dist/steps/index",
"doc-page": "../../components/doc-page/index"
"van-steps": "../../dist/steps/index"
}
}

View File

@ -1,66 +1,63 @@
<doc-page title="STEPS" without-padding>
<van-panel title="基础用法">
<van-cell-group>
<van-cell>
<van-steps type="horizon" steps="{{steps}}"></van-steps>
</van-cell>
<van-cell>
<van-steps type="horizon" steps="{{steps2}}"></van-steps>
</van-cell>
<van-cell>
<van-steps type="horizon" steps="{{steps3}}"></van-steps>
</van-cell>
<van-panel title="基础用法">
<van-cell-group>
<van-cell>
<van-steps type="horizon" steps="{{steps}}"></van-steps>
</van-cell>
<van-cell>
<van-steps type="horizon" steps="{{steps2}}"></van-steps>
</van-cell>
<van-cell>
<van-steps type="horizon" steps="{{steps3}}"></van-steps>
</van-cell>
</van-cell-group>
</van-panel>
<van-panel title="2步完成">
<van-cell-group>
<van-cell>
<van-steps type="horizon" steps="{{steps4}}"></van-steps>
</van-cell>
<van-cell>
<van-steps type="horizon" steps="{{steps5}}"></van-steps>
</van-cell>
</van-cell-group>
</van-panel>
</van-panel>
<van-panel title="2步完成">
<van-cell-group>
<van-cell>
<van-steps type="horizon" steps="{{steps4}}"></van-steps>
</van-cell>
<van-cell>
<van-steps type="horizon" steps="{{steps5}}"></van-steps>
</van-cell>
</van-cell-group>
</van-panel>
<van-panel title="有描述的steps">
<van-cell-group>
<van-cell>
<van-steps type="horizon" hasDesc steps="{{steps}}"></van-steps>
</van-cell>
<van-cell>
<van-steps type="horizon" hasDesc steps="{{steps2}}"></van-steps>
</van-cell>
<van-cell>
<van-steps type="horizon" hasDesc steps="{{steps3}}"></van-steps>
</van-cell>
</van-cell-group>
</van-panel>
<van-panel title="有描述的steps">
<van-cell-group>
<van-cell>
<van-steps type="horizon" hasDesc steps="{{steps}}"></van-steps>
</van-cell>
<van-cell>
<van-steps type="horizon" hasDesc steps="{{steps2}}"></van-steps>
</van-cell>
<van-cell>
<van-steps type="horizon" hasDesc steps="{{steps3}}"></van-steps>
</van-cell>
</van-cell-group>
</van-panel>
<van-panel title="垂直方向的steps">
<van-cell-group>
<van-cell>
<van-steps type="vertical" hasDesc steps="{{steps}}"></van-steps>
</van-cell>
<van-cell>
<van-steps type="vertical" hasDesc steps="{{steps2}}"></van-steps>
</van-cell>
</van-cell-group>
</van-panel>
<van-panel title="自定义 class">
<van-cell-group>
<van-cell cell-class="gray">
<van-steps
steps-class="my-class"
icon-class="gray"
title-class="white"
type="horizon"
steps="{{steps}}"
></van-steps>
</van-cell>
</van-cell-group>
</van-panel>
</doc-page>
<van-panel title="垂直方向的steps">
<van-cell-group>
<van-cell>
<van-steps type="vertical" hasDesc steps="{{steps}}"></van-steps>
</van-cell>
<van-cell>
<van-steps type="vertical" hasDesc steps="{{steps2}}"></van-steps>
</van-cell>
</van-cell-group>
</van-panel>
<van-panel title="自定义 class">
<van-cell-group>
<van-cell cell-class="gray">
<van-steps
steps-class="my-class"
icon-class="gray"
title-class="white"
type="horizon"
steps="{{steps}}"
></van-steps>
</van-cell>
</van-cell-group>
</van-panel>

View File

@ -3,7 +3,6 @@
"usingComponents": {
"van-switch": "../../dist/switch/index",
"van-panel": "../../dist/panel/index",
"van-cell": "../../dist/cell/index",
"doc-page": "../../components/doc-page/index"
"van-cell": "../../dist/cell/index"
}
}

View File

@ -1,27 +1,23 @@
<doc-page title="SWITCH" without-padding>
<van-panel title='同步开关'>
<van-cell>
<van-switch checked="{{sync.checked}}" bind:change="syncChange" />
</van-cell>
</van-panel>
<van-panel title='同步开关'>
<van-cell>
<van-switch checked="{{sync.checked}}" bind:change="syncChange" />
</van-cell>
</van-panel>
<van-panel title='异步开关'>
<van-cell>
<van-switch checked="{{async.checked}}" disabled="{{ async.disabled }}" loading="{{ async.loading }}" bind:change="asyncChange" />
</van-cell>
</van-panel>
<van-panel title='异步开关'>
<van-cell>
<van-switch checked="{{async.checked}}" disabled="{{ async.disabled }}" loading="{{ async.loading }}" bind:change="asyncChange" />
</van-cell>
</van-panel>
<van-panel title='禁止改动的开关'>
<van-cell>
<van-switch disabled="{{ false }}" />
</van-cell>
</van-panel>
<van-panel title='禁止改动的开关'>
<van-cell>
<van-switch disabled="{{ false }}" />
</van-cell>
</van-panel>
<van-panel title='自定义高亮样式'>
<van-cell>
<van-switch theme-class="switch-theme" disabled="{{ false }}" checked/>
</van-cell>
</van-panel>
</doc-page>
<van-panel title='自定义高亮样式'>
<van-cell>
<van-switch theme-class="switch-theme" disabled="{{ false }}" checked/>
</van-cell>
</van-panel>

View File

@ -1,7 +1,6 @@
{
"navigationBarTitleText": "Tab 标签",
"usingComponents": {
"van-tab": "../../dist/tab/index",
"doc-page": "../../components/doc-page/index"
"van-tab": "../../dist/tab/index"
}
}

View File

@ -1,26 +1,22 @@
<doc-page title="TAB" without-padding>
<view style="margin: 30px 0">
<van-tab
list="{{ tab.list }}"
selected-id="{{ tab.selectedId }}"
/>
</view>
<view style="margin: 30px 0">
<van-tab
list="{{ tab.list }}"
selected-id="{{ tab.selectedId }}"
/>
</view>
<view style="margin: 30px 0">
<van-tab
list="{{ tab1.list }}"
selected-id="{{ tab1.selectedId }}"
/>
</view>
<view style="margin: 30px 0">
<van-tab
list="{{ tab1.list }}"
selected-id="{{ tab1.selectedId }}"
/>
</view>
<view style="margin: 30px 0">
<van-tab
list="{{ tab2.list }}"
selected-id="{{ tab2.selectedId }}"
scroll="{{ tab2.scroll }}"
height="{{ tab2.height }}"
/>
</view>
</doc-page>
<view style="margin: 30px 0">
<van-tab
list="{{ tab2.list }}"
selected-id="{{ tab2.selectedId }}"
scroll="{{ tab2.scroll }}"
height="{{ tab2.height }}"
/>
</view>

View File

@ -1,3 +0,0 @@
.doc-title {
margin-top: 50px;
}

View File

@ -3,7 +3,6 @@
"usingComponents": {
"van-cell": "../../dist/cell/index",
"van-panel": "../../dist/panel/index",
"van-tag": "../../dist/tag/index",
"doc-page": "../../components/doc-page/index"
"van-tag": "../../dist/tag/index"
}
}

View File

@ -1,28 +1,26 @@
<doc-page title="Tag" without-padding>
<van-panel title="基础用法" class="tag-demo">
<van-cell>
<van-tag>灰色</van-tag>
<van-tag type="danger">红色</van-tag>
<van-tag disabled>不可用</van-tag>
</van-cell>
</van-panel>
<van-panel title="基础用法" class="tag-demo">
<van-cell>
<van-tag>灰色</van-tag>
<van-tag type="danger">红色</van-tag>
<van-tag disabled>不可用</van-tag>
</van-cell>
</van-panel>
<van-panel title="各种不同类型" class="tag-demo">
<van-cell>
<van-tag type="danger">会员折扣</van-tag>
<van-tag type="warn">返现</van-tag>
<van-tag type="primary">返现</van-tag>
<van-tag type="primary" disabled>不可用</van-tag>
</van-cell>
</van-panel>
<van-panel title="各种不同类型" class="tag-demo">
<van-cell>
<van-tag type="danger">会员折扣</van-tag>
<van-tag type="warn">返现</van-tag>
<van-tag type="primary">返现</van-tag>
<van-tag type="primary" disabled>不可用</van-tag>
</van-cell>
</van-panel>
<van-panel title="镂空 Tag" class="tag-demo">
<van-cell>
<van-tag plain>灰色</van-tag>
<van-tag type="danger" plain>会员折扣</van-tag>
<van-tag type="warn" plain>返现</van-tag>
<van-tag type="primary" plain>返现</van-tag>
<van-tag type="primary" plain disabled>返现不可用</van-tag>
</van-cell>
</van-panel>
</doc-page>
<van-panel title="镂空 Tag" class="tag-demo">
<van-cell>
<van-tag plain>灰色</van-tag>
<van-tag type="danger" plain>会员折扣</van-tag>
<van-tag type="warn" plain>返现</van-tag>
<van-tag type="primary" plain>返现</van-tag>
<van-tag type="primary" plain disabled>返现不可用</van-tag>
</van-cell>
</van-panel>

View File

@ -2,8 +2,6 @@
<view class="container">
<view class="doc-title van-hairline--bottom">TOAST</view>
<van-button-group style="margin-top: 15vh;display: block;">
<van-button bind:buttonclick="showToast">
显示toast

View File

@ -2,7 +2,6 @@
"navigationBarTitleText": "Toptips 顶部提示",
"usingComponents": {
"van-button": "../../dist/button/index",
"van-toptips": "../../dist/toptips/index",
"doc-page": "../../components/doc-page/index"
"van-toptips": "../../dist/toptips/index"
}
}

View File

@ -1,22 +1,20 @@
<doc-page title="TOPTIPS">
<view style="margin-top: 30vh;">
<van-button bind:buttonclick="showTopTips">
显示toptips声明式调用
</van-button>
</view>
<view style="margin-top: 30vh;">
<van-button bind:buttonclick="showTopTips">
显示toptips声明式调用
</van-button>
</view>
<view style="margin-top: 30px;">
<van-button bind:buttonclick="showTopTips2">
显示toptips命令式调用
</van-button>
</view>
<view style="margin-top: 30px;">
<van-button bind:buttonclick="showTopTips2">
显示toptips命令式调用
</van-button>
</view>
<view style="margin-top: 30px;">
<van-button bind:buttonclick="showTopTips3">
显示toptips持续一秒
</van-button>
<view style="margin-top: 30px;">
<van-button bind:buttonclick="showTopTips3">
显示toptips持续一秒
</van-button>
</view>
</doc-page>
<van-toptips
id="van-toptips"

View File

@ -1,7 +1,6 @@
{
"navigationBarTitleText": "Tree Select 分类选择",
"usingComponents": {
"van-tree-select": "../../dist/tree-select/index",
"doc-page": "../../components/doc-page/index"
"van-tree-select": "../../dist/tree-select/index"
}
}

View File

@ -1,11 +1,9 @@
<doc-page title="TREE SELECT" without-padding>
<view style="margin-top: 5vh;">
<van-tree-select
items="{{ items }}"
main-active-index="{{ mainActiveIndex }}"
active-id="{{ activeId }}"
bind:itemclick="handleItemClick"
bind:navclick="handleNavClick"
></van-tree-select>
</view>
</doc-page>
<view style="margin-top: 5vh;">
<van-tree-select
items="{{ items }}"
main-active-index="{{ mainActiveIndex }}"
active-id="{{ activeId }}"
bind:itemclick="handleItemClick"
bind:navclick="handleNavClick"
></van-tree-select>
</view>