+
-
-
+
@@ -13,44 +10,38 @@ export default {
computed: {
blockClass() {
return `demo-${this.$route.path.split('/').pop()}`;
- },
-
- codeAreaHeight() {
- return Math.max(this.$el.getElementsByClassName('examples')[0].clientHeight, this.$el.getElementsByClassName('highlight')[0].clientHeight);
}
- },
-
- mounted() {
- this.$el.getElementsByClassName('highlight')[0].style.height = `${this.codeAreaHeight + 1}px`;
}
};
diff --git a/docs/components/mobile-computed.js b/docs/components/mobile-computed.js
index 0604eb1b6..b59fb80e9 100644
--- a/docs/components/mobile-computed.js
+++ b/docs/components/mobile-computed.js
@@ -7,7 +7,7 @@ export default {
computed: {
mobileUrl() {
- return location.pathname + 'examples.html' + location.hash;
+ return '/examples.html#' + location.pathname.slice(4);
}
},
diff --git a/docs/components/side-nav.vue b/docs/components/side-nav.vue
index 17a1c0f6d..fe786fbbf 100644
--- a/docs/components/side-nav.vue
+++ b/docs/components/side-nav.vue
@@ -43,32 +43,24 @@
-## Button组件
+## Button 按钮
### 按钮功能
-只接受primary, default, danger三种类型,默认default。
+只接受`primary`, `default`, `danger`三种类型,默认`default`。
:::demo 按钮功能
```html
@@ -51,7 +51,7 @@
### 按钮尺寸
-只接受large, normal, small, mini四种尺寸,默认normal。
+只接受`large`, `normal`, `small`, `mini`四种尺寸,默认`normal`。
:::demo 按钮尺寸
```html
@@ -76,7 +76,7 @@
### 自定义按钮标签
-按钮默认是button标签,可以使用tag属性修改为一个a标签。
+按钮默认是`button`标签,可以使用`tag`属性修改为一个`a`标签。
:::demo 自定义按钮标签
```html
@@ -90,8 +90,6 @@
### loading按钮
-表示loading状态
-
:::demo loading按钮
```html
@@ -107,8 +105,6 @@
### button group
-一组按钮。
-
:::demo button group
```html
@@ -123,9 +119,9 @@
| 参数 | 说明 | 类型 | 默认值 | 可选值 |
|-----------|-----------|-----------|-------------|-------------|
-| type | 按钮类型 | string | 'default' | 'primary', 'danger' |
-| size | 按钮尺寸 | string | 'normal' | 'large', 'small', 'mini' |
-| tag | 按钮标签 | string | 'button' | 'a', 'span', ... |
-| diabled | 按钮是否禁用 | Boolean | | |
-| block | 按钮是否显示为块级元素 | Boolean | | |
+| type | 按钮类型 | `string` | `default` | `primary`, `danger` |
+| size | 按钮尺寸 | `string` | `normal` | `large`, `small`, `mini` |
+| tag | 按钮标签 | `string` | `button` | `a`, `span`, ... |
+| diabled | 按钮是否禁用 | `boolean` | | |
+| block | 按钮是否显示为块级元素 | `boolean` | | |
diff --git a/docs/examples-docs/card.md b/docs/examples-docs/card.md
index 60a462497..09cdb975f 100644
--- a/docs/examples-docs/card.md
+++ b/docs/examples-docs/card.md
@@ -41,9 +41,9 @@
| 参数 | 说明 | 类型 | 默认值 | 可选值 |
|-----------|-----------|-----------|-------------|-------------|
-| thumb | 左侧图片 | string | '' | '' |
-| title | 标题 | string | '' | '' |
-| desc | 描述 | string | '' | '' |
+| thumb | 左侧图片 | `string` | | |
+| title | 标题 | `string` | | |
+| desc | 描述 | `string` | | |
### Slot
diff --git a/docs/examples-docs/cell.md b/docs/examples-docs/cell.md
index f58bc10e6..1383950c1 100644
--- a/docs/examples-docs/cell.md
+++ b/docs/examples-docs/cell.md
@@ -16,7 +16,7 @@ export default {
};
-## Cell 组件
+## Cell
### 基础用法
@@ -102,17 +102,17 @@ export default {
| 参数 | 说明 | 类型 | 默认值 | 可选值 |
|-----------|-----------|-----------|-------------|-------------|
-| icon | 左侧图标 | string | '' | '' |
-| title | 左侧标题 | string | '' | '' |
-| value | 右侧内容 | string | '' | '' |
-| isLink | 是否为链接,链接会在右侧出现箭头 | boolean | '' | '' |
-| url | 跳转链接 | string | '' | '' |
-| label | 描述信息,显示在标题下方 | string | '' | '' |
+| icon | 左侧图标 | `string` | | |
+| title | 左侧标题 | `string` | | |
+| value | 右侧内容 | `string` | | |
+| isLink | 是否为链接,链接会在右侧出现箭头 | `boolean` | | |
+| url | 跳转链接 | `string` | | |
+| label | 描述信息,显示在标题下方 | `string` | | |
### Slot
| name | 描述 |
|-----------|-----------|
| - | 自定义显示内容 |
-| icon | 自定义icon |
-| title | 自定义title |
+| icon | 自定义`icon` |
+| title | 自定义`title` |
diff --git a/docs/examples-docs/checkbox.md b/docs/examples-docs/checkbox.md
index a1d07b536..21e3e65b2 100644
--- a/docs/examples-docs/checkbox.md
+++ b/docs/examples-docs/checkbox.md
@@ -170,14 +170,14 @@ export default {
| 参数 | 说明 | 类型 | 默认值 | 可选值 |
|-----------|-----------|-----------|-------------|-------------|
-| disabled | 是否禁用单选框 | Boolean | false | |
-| name | 根据这个来判断radio是否选中 | Boolean | false | |
+| disabled | 是否禁用单选框 | `boolean` | `false` | |
+| name | 根据这个来判断radio是否选中 | `boolean` | `false` | |
### CheckboxGroup API
| 参数 | 说明 | 类型 | 默认值 | 可选值 |
|-----------|-----------|-----------|-------------|-------------|
-| disabled | 是否禁用单选框 | Boolean | false | |
+| disabled | 是否禁用单选框 | `boolean` | `false` | |
### CheckboxGroup Event
diff --git a/docs/examples-docs/dialog.md b/docs/examples-docs/dialog.md
index 7a6a519c3..f1d3c64e9 100644
--- a/docs/examples-docs/dialog.md
+++ b/docs/examples-docs/dialog.md
@@ -89,5 +89,5 @@ export default {
| 参数 | 说明 | 类型 | 默认值 | 可选值 |
|-----------|-----------|-----------|-------------|-------------|
-| title | 标题 | String | '' | |
-| message | 内容 | String | '' | |
+| title | 标题 | `string` | | |
+| message | 内容 | `string` | | |
diff --git a/docs/examples-docs/field.md b/docs/examples-docs/field.md
index 0bcb5e04e..278657a74 100644
--- a/docs/examples-docs/field.md
+++ b/docs/examples-docs/field.md
@@ -101,15 +101,15 @@ export default {
| 参数 | 说明 | 类型 | 默认值 | 可选值 |
|-----------|-----------|-----------|-------------|-------------|
-| type | 输入框类型 | string | text | text, number, email, url, tel, date, datetime, password, textarea |
-| placeholder | 输入框placeholder | string | '' | |
-| value | 输入框的值 | string | '' | |
-| label | 输入框标签 | string | '' | |
-| disabled | 是否禁用输入框 | boolean | false | |
-| error | 输入框是否有错误 | boolean | false | |
-| readonly | 输入框是否只读 | boolean | false | |
-| maxlength | 输入框maxlength | [String, Number] | '' | |
-| rows | textarea rows | [String, Number] | '' | |
-| cols | textarea cols | [String, Number] | '' | |
-| autosize | 自动调整高度(仅支持textarea) | Boolean | false | true, false |
+| type | 输入框类型 | `string` | `text` | `text`, `number`, `email`, `url`, `tel`, `date`, `datetime`, `password`, `textarea` |
+| placeholder | 输入框placeholder | `string` | | |
+| value | 输入框的值 | `string` | | |
+| label | 输入框标签 | `string` | | |
+| disabled | 是否禁用输入框 | `boolean` | `false` | |
+| error | 输入框是否有错误 | `boolean` | `false` | |
+| readonly | 输入框是否只读 | `boolean` | `false` | |
+| maxlength | 输入框maxlength | `string`, `number` | | |
+| rows | textarea rows | `string`, `number` | | |
+| cols | textarea cols | `string`, `number` | | |
+| autosize | 自动调整高度(仅支持textarea) | `boolean` | `false` | `true`, `false` |
diff --git a/docs/examples-docs/icon.md b/docs/examples-docs/icon.md
index 1c84a72a4..4467a021f 100644
--- a/docs/examples-docs/icon.md
+++ b/docs/examples-docs/icon.md
@@ -5,6 +5,8 @@
.zan-icon {
margin: 10px;
font-size: 45px;
+ width: 56px;
+ text-align: center;
}
}
}
@@ -49,4 +51,4 @@
| 参数 | 说明 | 类型 | 默认值 | 可选值 |
|-----------|-----------|-----------|-------------|-------------|
-| name | icon名称 | string | '' | |
+| name | icon名称 | `string` | `''` | |
diff --git a/docs/examples-docs/loading.md b/docs/examples-docs/loading.md
index bb3458293..a57cd0636 100644
--- a/docs/examples-docs/loading.md
+++ b/docs/examples-docs/loading.md
@@ -17,7 +17,7 @@
}
-## Loading
+## Loading 加载中
### 基础用法
@@ -43,3 +43,10 @@
```
:::
+
+### API
+
+| 参数 | 说明 | 类型 | 默认值 | 可选值 |
+|-----------|-----------|-----------|-------------|-------------|
+| color | `loading`颜色 | `string` | `black` | `black`, `white` |
+| type | `loading`类型 | `string` | `gradient-circle` | `gradient-circle`, `circle` |
diff --git a/docs/examples-docs/panel.md b/docs/examples-docs/panel.md
index 543292b01..e551e43e8 100644
--- a/docs/examples-docs/panel.md
+++ b/docs/examples-docs/panel.md
@@ -84,9 +84,9 @@
| 参数 | 说明 | 类型 | 默认值 | 可选值 |
|-----------|-----------|-----------|-------------|-------------|
-| title | 标题 | string | '' | '' |
-| desc | 描述 | string | '' | '' |
-| status | 状态 | string | '' | '' |
+| title | 标题 | `string` | | |
+| desc | 描述 | `string` | | |
+| status | 状态 | `string` | | |
### Slot
diff --git a/docs/examples-docs/picker.md b/docs/examples-docs/picker.md
index de0bb20b5..6da630fc5 100644
--- a/docs/examples-docs/picker.md
+++ b/docs/examples-docs/picker.md
@@ -127,10 +127,10 @@ export default {
| 参数 | 说明 | 类型 | 默认值 | 可选值 |
|-----------|-----------|-----------|-------------|-------------|
-| visibileColumnCount | 每一列可见备选元素的个数 | Number | 5 | |
-| itemHeight | 选中元素区高度 | Number | 44 | |
-| columns | 对象数组,配置每一列显示的数据 | Array | | |
-| showToolbar | 是否在组件顶部显示一个toolbar | Boolean | true | |
+| visibileColumnCount | 每一列可见备选元素的个数 | `number` | `5` | |
+| itemHeight | 选中元素区高度 | `number` | `44` | |
+| columns | 对象数组,配置每一列显示的数据 | `Array` | | |
+| showToolbar | 是否在组件顶部显示一个toolbar | `Boolean` | `true` | |
### columns
diff --git a/docs/examples-docs/popup.md b/docs/examples-docs/popup.md
index 2fe391738..ea5ed0cef 100644
--- a/docs/examples-docs/popup.md
+++ b/docs/examples-docs/popup.md
@@ -145,4 +145,4 @@ export default {
| 参数 | 说明 | 类型 | 默认值 | 可选值 |
|-----------|-----------|-----------|-------------|-------------|
-| value | 利用`v-model`绑定当前组件是否显示 | Boolean | '' | |
+| value | 利用`v-model`绑定当前组件是否显示 | `boolean` | | |
diff --git a/docs/examples-docs/progress.md b/docs/examples-docs/progress.md
index 3ae7102a4..7261278ed 100644
--- a/docs/examples-docs/progress.md
+++ b/docs/examples-docs/progress.md
@@ -10,7 +10,7 @@
-## Switch组件
+## Progress
### 基础用法
@@ -64,9 +64,9 @@
| 参数 | 说明 | 类型 | 默认值 | 可选值 |
|-----------|-----------|-----------|-------------|-------------|
-| inactive | 是否只会 | boolean | false | true, false |
-| percentage | 进度百分比 | number | false | 0-100 |
-| pivotText | 文字显示 | string | 百分比文字 | - |
-| color | 进度条颜色 | string | #38f | hexvalue |
-| textColor | 进度条文字颜色 | string | #fff | hexvalue |
+| inactive | 是否只会 | `boolean` | `false` | `true`, `false` |
+| percentage | 进度百分比 | `number` | `false` | `0-100` |
+| pivotText | 文字显示 | `string` | 百分比文字 | - |
+| color | 进度条颜色 | `string` | `#38f` | hexvalue |
+| textColor | 进度条文字颜色 | `string` | `#fff` | hexvalue |
diff --git a/docs/examples-docs/quantity.md b/docs/examples-docs/quantity.md
index f43c15da4..1368f62cd 100644
--- a/docs/examples-docs/quantity.md
+++ b/docs/examples-docs/quantity.md
@@ -57,9 +57,9 @@ export default {
| 参数 | 说明 | 类型 | 默认值 | 可选值 |
|-----------|-----------|-----------|-------------|-------------|
-| min | 最小值 | string/number | 1 | '' |
-| max | 最大值 | string/number | '' | '' |
-| step | 步数 | string/number | 1 | '' |
-| disabled | 是否被禁用了 | boolean | false | '' |
-| defaultValue | 默认值 | string/number | 1 | '' |
+| min | 最小值 | `string`, `number` | `1` | |
+| max | 最大值 | `string`, `number` | | |
+| step | 步数 | `string`, `number` | `1` | |
+| disabled | 是否被禁用了 | `boolean` | `false` | |
+| defaultValue | 默认值 | `string`, `number` | `1` | |
diff --git a/docs/examples-docs/radio.md b/docs/examples-docs/radio.md
index 41685985a..ca2b84f98 100644
--- a/docs/examples-docs/radio.md
+++ b/docs/examples-docs/radio.md
@@ -119,14 +119,14 @@ export default {
| 参数 | 说明 | 类型 | 默认值 | 可选值 |
|-----------|-----------|-----------|-------------|-------------|
-| disabled | 是否禁用单选框 | Boolean | false | |
-| name | 根据这个来判断radio是否选中 | Boolean | false | |
+| disabled | 是否禁用单选框 | `boolean` | `false` | |
+| name | 根据这个来判断radio是否选中 | `boolean` | `false` | |
### RadioGroup API
| 参数 | 说明 | 类型 | 默认值 | 可选值 |
|-----------|-----------|-----------|-------------|-------------|
-| disabled | 是否禁用单选框 | Boolean | false | |
+| disabled | 是否禁用单选框 | `boolean` | `false` | |
### RadioGroup Event
diff --git a/docs/examples-docs/search.md b/docs/examples-docs/search.md
index db18c7e76..cf9f051df 100644
--- a/docs/examples-docs/search.md
+++ b/docs/examples-docs/search.md
@@ -31,4 +31,4 @@ export default {
| 参数 | 说明 | 类型 | 默认值 | 必须 |
|-----------|-----------|-----------|-------------|-------------|
-| placeholder | input的placeholder文案 | string | | |
\ No newline at end of file
+| placeholder | `input`的`placeholder`文案 | `string` | | |
\ No newline at end of file
diff --git a/docs/examples-docs/steps.md b/docs/examples-docs/steps.md
index 462243697..b5beffa8e 100644
--- a/docs/examples-docs/steps.md
+++ b/docs/examples-docs/steps.md
@@ -6,7 +6,7 @@
}
.zan-button {
- margin-left: 15px;
+ margin: 15px 0 0 15px;
}
}
}
@@ -79,11 +79,11 @@ export default {
| 参数 | 说明 | 类型 | 默认值 | 可选值 |
|-----------|-----------|-----------|-------------|-------------|
-| active | 当前激活的步骤,从0开始 | Number | '' | '' |
-| icon | 当前步骤的icon | string | '' | '' |
-| iconClass | 当前步骤栏为icon添加的类 | string | '' | '' |
-| title | 当前步骤从标题 | string | '' | '' |
-| description | 当前步骤描述 | string | '' | '' |
+| active | 当前激活的步骤,从0开始 | `number` | | |
+| icon | 当前步骤的icon | `string` | | |
+| iconClass | 当前步骤栏为icon添加的类 | `string` | | |
+| title | 当前步骤从标题 | `string` | | |
+| description | 当前步骤描述 | `string` | | |
### Steps Slot
diff --git a/docs/examples-docs/switch.md b/docs/examples-docs/switch.md
index e475dc631..b9a0e332d 100644
--- a/docs/examples-docs/switch.md
+++ b/docs/examples-docs/switch.md
@@ -89,6 +89,6 @@ export default {
| 参数 | 说明 | 类型 | 默认值 | 可选值 |
|-----------|-----------|-----------|-------------|-------------|
-| checked | 开关状态 | boolean | false | true, false |
-| loading | loading状态 | boolean | false | true, false |
-| disabled | 禁用状态 | boolean | false | true, false |
+| checked | 开关状态 | `boolean` | `false` | `true`, `false` |
+| loading | loading状态 | `boolean` | `false` | `true`, `false` |
+| disabled | 禁用状态 | `boolean` | `false` | `true`, `false` |
diff --git a/docs/examples-docs/tab.md b/docs/examples-docs/tab.md
index 1a3978995..6bd363700 100644
--- a/docs/examples-docs/tab.md
+++ b/docs/examples-docs/tab.md
@@ -124,14 +124,14 @@ export default {
| 参数 | 说明 | 类型 | 默认值 | 可选 |
|-----------|-----------|-----------|-------------|-------------|
-| classtype | 两种UI | string | line | card |
-| active | 默认激活的tab | string || number | 0 | |
-| navclass | tabs的内部nav上的自定义classname | string | '' | |
+| classtype | 两种UI | `string` | `line` | `line`, `card` |
+| active | 默认激活的tab | `string`, `number` | `0` | |
+| navclass | tabs的内部nav上的自定义classname | `string` | | |
### zan-tab API
-| 参数 | 说明 | 类型 | 默认值 | 必须 |
+| 参数 | 说明 | 类型 | 默认值 | 可选 |
|-----------|-----------|-----------|-------------|-------------|
-| title | tab的标题 | string | '' | required |
-| disable | 是否禁用这个tab | Boolean | false | |
+| title | tab的标题 | `string` | | |
+| disable | 是否禁用这个tab | `boolean` | `false` | |
diff --git a/docs/examples-docs/tag.md b/docs/examples-docs/tag.md
index 382b1220d..126ba5c38 100644
--- a/docs/examples-docs/tag.md
+++ b/docs/examples-docs/tag.md
@@ -52,9 +52,9 @@
| 参数 | 说明 | 类型 | 默认值 | 可选值 |
|-----------|-----------|-----------|-------------|-------------|
-| plain | 是否是空心tag | boolean | false | '' |
-| mark | 是否是标记 | boolean | false | '' |
-| type | tag类型 | string | '' | 'primary', 'success', 'danger' |
+| plain | 是否是空心tag | `boolean` | `false` | |
+| mark | 是否是标记 | `boolean` | `false` | |
+| type | tag类型 | `string` | `''` | `primary`, `success`, `danger` |
### Slot
diff --git a/docs/examples-docs/toast.md b/docs/examples-docs/toast.md
index 4a6681170..a828742e4 100644
--- a/docs/examples-docs/toast.md
+++ b/docs/examples-docs/toast.md
@@ -25,6 +25,12 @@ export default {
showFailToast() {
Toast.fail('失败文案');
},
+ showForbidClickToast() {
+ Toast({
+ message: '背景不能点击',
+ forbidClick: true
+ })
+ },
showCustomizedToast(duration) {
let leftSec = duration / 1000;
let toast = Toast({
@@ -40,6 +46,18 @@ export default {
}
toast.message = (--leftSec).toString();
}, 1000);
+ },
+ showToast() {
+ this.toast = Toast('我是提示文案,建议不超过十五字~');
+ },
+ closeToast() {
+ this.toast.clear();
+ },
+ showHtmlToast() {
+ Toast({
+ type: 'html',
+ message: 'HTML'
+ })
}
}
};
@@ -55,6 +73,7 @@ export default {
加载Toast
成功
失败
+背景不能点击
倒数5秒
+```
+:::
+
+
+### 传入html
+
+:::demo 手动关闭
+```html
+打开
+
+
+```
+:::
+
+
+### 基础用法
+### Toast(options)
+
+| 参数 | 说明 | 类型 | 默认值 | 可选值 |
+|-----------|-----------|-----------|-------------|-------------|
+| type | 类型 | String | 'text' | 'text', 'loading', 'success', 'fail', 'html' |
+| message | 内容 | String | '' | - |\| message | 内容 | String | '' | -
+| forbidClick | 不允许背景点击 | Boolean | false | true, false|
+| duration | 时长(ms) | Number | 3000ms | -|
+
+### 快速用法
+### Toast(message) || Toast(message, options)
+
+| 参数 | 说明 | 类型 | 默认值 | 可选值 |
+|-----------|-----------|-----------|-------------|-------------|
+| message | 内容 | String | '' | - |
+| forbidClick | 不允许背景点击 | Boolean | false | true, false|
+| duration | 时长(ms) | Number | 3000ms | -|
+
+### Toast.loading() || Toast.loading(message, options)
+
+| 参数 | 说明 | 类型 | 默认值 | 可选值 |
+|-----------|-----------|-----------|-------------|-------------|
+| forbidClick | 不允许背景点击 | Boolean | false | true, false|
+| duration | 时长(ms) | Number | 3000ms | -|
+
+### Toast.success(message) || Toast.success(message, options)
| 参数 | 说明 | 类型 | 默认值 | 可选值 |
|-----------|-----------|-----------|-------------|-------------|
| type | 类型 | String | 'text' | 'text', 'loading', 'success', 'failure' |
-| message | 内容 | String | '' | - |
+| forbidClick | 不允许背景点击 | Boolean | false | true, false|
+| duration | 时长(ms) | Number | 3000ms | -|
+
+### Toast.fail(message) || Toast.fail(message, options)
+
+| 参数 | 说明 | 类型 | 默认值 | 可选值 |
+|-----------|-----------|-----------|-------------|-------------|
+| type | 类型 | String | 'text' | 'text', 'loading', 'success', 'failure' |
+| forbidClick | 不允许背景点击 | Boolean | false | true, false|
+| duration | 时长(ms) | Number | 3000ms | -|
+
+### instanceOfToast.clear()
+关闭toast。
diff --git a/docs/examples-docs/uploader.md b/docs/examples-docs/uploader.md
index 2b5bfb1d3..7193978d5 100644
--- a/docs/examples-docs/uploader.md
+++ b/docs/examples-docs/uploader.md
@@ -42,10 +42,10 @@ export default {
| 参数 | 说明 | 类型 | 默认值 | 可选值 |
|-----------|-----------|-----------|-------------|-------------|
-| result-type | 读取文件的方式,以base64的方式读取;以文本的方式读取 | String | 'dataUrl' | 'dataUrl','text' |
-| disable | 是否禁用上传,在图片上传期间设置为true,禁止用户点击此组件上传图片 | boolean | false | |
-| before-read | 读文件之前的钩子,参数为选择的文件,若返回 false 则停止读取文件。 | Function | | |
-| file-readed | 文件读完之后出发此事件,参数为{name:'文件名',type:'文件类型',size:'文件大小',content:'读的内容'} | Function | | |
+| result-type | 读取文件的方式,以base64的方式读取;以文本的方式读取 | `string` | `dataUrl` | `dataUrl`, `text` |
+| disable | 是否禁用上传,在图片上传期间设置为true,禁止用户点击此组件上传图片 | `boolean` | `false` | |
+| before-read | 读文件之前的钩子,参数为选择的文件,若返回 false 则停止读取文件。 | `Function` | | |
+| file-readed | 文件读完之后出发此事件,参数为{name:'文件名',type:'文件类型',size:'文件大小',content:'读的内容'} | `Function` | | |
### Slot
diff --git a/docs/examples-docs/waterfall.md b/docs/examples-docs/waterfall.md
index 99c1dc3c8..7ba9035da 100644
--- a/docs/examples-docs/waterfall.md
+++ b/docs/examples-docs/waterfall.md
@@ -76,6 +76,6 @@ export default {
| 参数 | 说明 | 类型 | 默认值 | 可选值 |
|-----------|-----------|-----------|-------------|-------------|
-| waterfall-disabled | 在vue对象中表示是否禁止瀑布流触发的key值 | String | - | |
-| waterfall-offset | 触发瀑布流加载的阈值 | Number | 300 | |
+| waterfall-disabled | 在vue对象中表示是否禁止瀑布流触发的key值 | `string` | - | |
+| waterfall-offset | 触发瀑布流加载的阈值 | `number` | `300` | |
diff --git a/docs/index.js b/docs/index.js
index b946c1569..cdbb3a4cb 100644
--- a/docs/index.js
+++ b/docs/index.js
@@ -5,6 +5,7 @@ import navConfig from './nav.config.json';
import routes from './router.config';
import SideNav from './components/side-nav';
import DemoBlock from './components/demo-block';
+import FooterNav from './components/footer-nav';
import ZanUI from 'src/index.js';
import 'packages/zanui-css/src/index.css';
@@ -19,6 +20,7 @@ Vue.use(VueRouter);
Vue.use(ZanUI);
Vue.component('side-nav', SideNav);
Vue.component('demo-block', DemoBlock);
+Vue.component('footer-nav', FooterNav);
let routesConfig = routes(navConfig);
routesConfig.push({
@@ -27,15 +29,14 @@ routesConfig.push({
});
const router = new VueRouter({
- mode: 'hash',
- base: __dirname,
+ mode: 'history',
+ base: '/vue',
routes: routesConfig
});
-let indexScrollTop = 0;
router.beforeEach((route, redirect, next) => {
if (route.path !== '/') {
- indexScrollTop = document.body.scrollTop;
+ window.scrollTo(0, 0);
}
if (isMobile()) {
window.location.replace(location.pathname + 'examples.html#' + route.path);
@@ -45,16 +46,6 @@ router.beforeEach((route, redirect, next) => {
next();
});
-router.afterEach(route => {
- if (route.path !== '/') {
- document.body.scrollTop = 0;
- } else {
- Vue.nextTick(() => {
- document.body.scrollTop = indexScrollTop;
- });
- }
-});
-
new Vue({ // eslint-disable-line
render: h => h(App),
router
diff --git a/docs/nav.config.json b/docs/nav.config.json
index 0060196b0..ddeb1800b 100644
--- a/docs/nav.config.json
+++ b/docs/nav.config.json
@@ -68,10 +68,6 @@
"path": "/tab",
"title": "Tab"
},
- {
- "path": "/lazyload",
- "title": "Lazyload"
- },
{
"path": "/popup",
"title": "Popup"
diff --git a/examples.html b/examples.html
index 908ff24d3..09a80bd89 100644
--- a/examples.html
+++ b/examples.html
@@ -11,6 +11,6 @@
-
+