mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
[new feature] Docs: waterfall 文档优化 (#175)
* doc: change waterfall docs * change pr template
This commit is contained in:
parent
581d6adf02
commit
fcb9a4a8a9
15
.github/PULL_REQUEST_TEMPLATE.md
vendored
15
.github/PULL_REQUEST_TEMPLATE.md
vendored
@ -12,6 +12,21 @@
|
|||||||
|
|
||||||
### 请认真写 PR 的标题,会用于生成 change log。
|
### 请认真写 PR 的标题,会用于生成 change log。
|
||||||
|
|
||||||
|
#### 标题规则
|
||||||
|
[bug fix / breaking change / new feature] 组件名字:修改内容描述
|
||||||
|
|
||||||
|
说明:
|
||||||
|
* 前面方括号用来区分 Issue / PR 的 类型:bug fix - 改 bug;breaking change: 不兼容的改动;new feature:新功能
|
||||||
|
* 修改内容尽可能言简意赅,总结 PR 的改动或者描述 Issue
|
||||||
|
* 描述请用中文
|
||||||
|
* 组件名字请用英文,首字母大写
|
||||||
|
|
||||||
|
示例:
|
||||||
|
* [bug fix] Button: 修改颜色
|
||||||
|
* [breaking change] Loading: 删除 `static` 属性
|
||||||
|
* [new feature] Form: 增加 `FormSelection` 支持
|
||||||
|
* [new feature] 新增 Abc 组件
|
||||||
|
|
||||||
### Please remove the above lines when you submit this pull request, also please fill in the changes you've made in this pull request.
|
### Please remove the above lines when you submit this pull request, also please fill in the changes you've made in this pull request.
|
||||||
|
|
||||||
### 提交 PR 前 请把以上内容删除,并填写以下内容。
|
### 提交 PR 前 请把以上内容删除,并填写以下内容。
|
||||||
|
@ -31,6 +31,8 @@ export default {
|
|||||||
### 代码演示
|
### 代码演示
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { Waterfall } from 'packages';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -39,9 +41,15 @@ export default {
|
|||||||
finished: false
|
finished: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
directives: {
|
||||||
|
WaterfallLower: Waterfall('lower'),
|
||||||
|
WaterfallUpper: Waterfall('upper')
|
||||||
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
loadMore() {
|
loadMore() {
|
||||||
if (this.list.length >= 200) {
|
if (this.list.length >= 50) {
|
||||||
this.finished = true;
|
this.finished = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -90,6 +98,8 @@ export default {
|
|||||||
|
|
||||||
#### 基础用法
|
#### 基础用法
|
||||||
使用 `v-waterfall-lower` 监听滚动到达底部,并执行相应函数。若是函数执行中需要异步加载数据,可以将 `waterfall-disabled` 指定的值置为 false,禁止 `v-waterfall-lower` 监听滚动事件
|
使用 `v-waterfall-lower` 监听滚动到达底部,并执行相应函数。若是函数执行中需要异步加载数据,可以将 `waterfall-disabled` 指定的值置为 false,禁止 `v-waterfall-lower` 监听滚动事件
|
||||||
|
|
||||||
|
注意:`waterfall-disabled` 传入的是 vue 对象中表示是否禁止瀑布流触发 key 值,类型是字符串
|
||||||
:::demo 基础用法
|
:::demo 基础用法
|
||||||
```html
|
```html
|
||||||
<p class="page-desc">当即将滚动到元素底部时,会自动加载更多</p>
|
<p class="page-desc">当即将滚动到元素底部时,会自动加载更多</p>
|
||||||
|
@ -303,6 +303,10 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"groupName": "Form",
|
||||||
|
"list": []
|
||||||
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user