[Doc] update preview (#884)

This commit is contained in:
neverland 2018-11-10 16:25:54 +08:00 committed by GitHub
parent 5e3f75bbcb
commit ca81351945
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 31 additions and 30 deletions

View File

@ -22,6 +22,7 @@ const MAP = {
col: 'layout-201808092138.png',
cell: 'cell-201808092138.png',
dialog: 'dialog-201809071648.png',
'datetime-picker': 'datetime-picker-201811102.png',
field: 'field-201808092138.png',
'goods-action': 'goods-action-20181015.png',
icon: 'icon-201808092138.png',
@ -32,13 +33,14 @@ const MAP = {
panel: 'panel-201808092138.png',
popup: 'popup-201808092138.png',
progress: 'progress-201808232055.png',
radio: 'radio_201809271357.png',
radio: 'radio-20181110.jpeg',
slider: 'slider-201808221024.png',
stepper: 'stepper-201808092138.png',
search: 'search-201808092138.png',
steps: 'steps-20181015.png',
switch: 'switch-201808092138.png',
switch: 'switch-20181110.jpeg',
'switch-cell': 'switch-cell-201808221124.png',
'swipe-cell': 'swipe-cell-20181110.jpeg',
'submit-bar': 'submit-bar-a-201809271357.png',
tab: 'tab-20181015.png',
tag: 'tag-20181019.jpeg',
@ -46,7 +48,7 @@ const MAP = {
toast: 'toast-201808191046.png',
transition: 'transition-20180821.png',
'tree-select': 'tree-select-201808092138.png',
checkbox: 'checkbox-20180928-1.png'
checkbox: 'checkbox-20181110.jpeg'
};
export default {

View File

@ -35,6 +35,10 @@ export default [
path: '/checkbox',
title: 'Checkbox 复选框'
},
{
path: '/datetime-picker',
title: 'DatetimePicker 时间选择'
},
{
path: '/field',
title: 'Field 输入框'
@ -72,10 +76,6 @@ export default [
path: '/action-sheet',
title: 'ActionSheet 上拉菜单'
},
{
path: '/datetime-picker',
title: 'DatetimePicker 时间选择'
},
{
path: '/dialog',
title: 'Dialog 弹出框'
@ -84,6 +84,10 @@ export default [
path: '/loading',
title: 'Loading 加载'
},
{
path: '/swipe-cell',
title: 'SwipeCell 滑动单元格'
},
{
path: '/toast',
title: 'Toast 轻提示'
@ -113,10 +117,6 @@ export default [
path: '/steps',
title: 'Steps 步骤条'
},
{
path: '/swipe-cell',
title: 'SwipeCell 滑动单元格'
},
{
path: '/tag',
title: 'Tag 标记'

View File

@ -14,7 +14,6 @@ Page({
},
onChange(event) {
const picker = event.detail;
console.log(event);
}
});

View File

@ -1,38 +1,37 @@
<demo-block title="选择完整时间">
<van-datetime-picker
loading="{{ loading }}"
show-toolbar="{{ false }}"
value="{{ currentDate1 }}"
bind:change="onChange"
type="datetime"
loading="{{ loading }}"
value="{{ currentDate1 }}"
min-date="{{ minDate }}"
bind:change="onChange"
/>
</demo-block>
<demo-block title="选择日期(年月日)">
<van-datetime-picker
value="{{ currentDate2 }}"
bind:change="onChange"
type="date"
value="{{ currentDate2 }}"
min-date="{{ minDate }}"
bind:change="onChange"
/>
</demo-block>
<demo-block title="选择日期(年月)">
<van-datetime-picker
value="{{ currentDate3 }}"
bind:change="onChange"
type="year-month"
value="{{ currentDate3 }}"
min-date="{{ minDate }}"
bind:change="onChange"
/>
</demo-block>
<demo-block title="选择时间">
<van-datetime-picker
value="{{ currentDate4 }}"
bind:change="onChange"
type="time"
value="{{ currentDate4 }}"
min-hour="{{ minHour }}"
max-hour="{{ maxHour }}"
bind:change="onChange"
/>
</demo-block>

View File

@ -15,11 +15,11 @@
```html
<van-datetime-picker
value="{{ currentDate }}"
bind:change="onChange"
type="datetime"
value="{{ currentDate }}"
min-date="{{ minDate }}"
max-date="{{ maxDate }}"
bind:change="onChange"
/>
```
@ -44,10 +44,10 @@ Page({
```html
<van-datetime-picker
value="{{ currentDate }}"
bind:change="onChange"
type="date"
value="{{ currentDate }}"
min-date="{{ minDate }}"
bind:change="onChange"
/>
```
@ -69,10 +69,10 @@ Page({
```html
<van-datetime-picker
value="{{ currentDate }}"
bind:change="onChange"
type="year-month"
value="{{ currentDate }}"
min-date="{{ minDate }}"
bind:change="onChange"
/>
```
@ -94,11 +94,11 @@ Page({
```html
<van-datetime-picker
value="{{ currentDate }}"
bind:change="onChange"
type="time"
value="{{ currentDate }}"
min-hour="{{ minHour }}"
max-hour="{{ maxHour }}"
bind:change="onChange"
/>
```

View File

@ -1,6 +1,7 @@
## SwipeCell 滑动单元格
### 使用指南
在 app.json 或 index.json 中引入组件
```json
"usingComponents": {