update readme

This commit is contained in:
wangwenzhang
2020-04-05 15:41:37 +08:00
parent 6960fcb785
commit 3c274f0942

View File

@@ -31,12 +31,13 @@ Vue.use(HocElementAffix)
| 字段 | 说明 | 类型 | 默认值 |
| -------- | -------- | -------- | -------- |
| offsetTop | 距离窗口顶部多少时开始固定 | Number | 0 |
| offsetTop | (可选)距离窗口顶部多少时开始固定 | Number | 0 |
## Demo
```html
<template>
<div style="height: 200px; border: 1px solid #000;">占位</div>
<hoc-el-affix
:offsetTop="10"
>
@@ -44,12 +45,11 @@ Vue.use(HocElementAffix)
</hoc-el-affix>
</template>
<style lang="scss" scoped>
.demo {
position: absolute;
width: 150px;
height: 300px;
border: 1px solid red;
}
.demo {
width: 150px;
height: 300px;
border: 1px solid red;
}
</style>
```