update readme
This commit is contained in:
32
README.md
32
README.md
@@ -2,7 +2,7 @@
|
||||
|
||||
 
|
||||
|
||||
📌 将页面元素固定在在可视范围内。
|
||||
📌 将页面元素固定在可视范围内。
|
||||
|
||||
## Environment Support
|
||||
|
||||
@@ -22,3 +22,33 @@ import HocElementAffix from '@hoc-element/affix'
|
||||
|
||||
Vue.use(HocElementAffix)
|
||||
```
|
||||
|
||||
## Using
|
||||
|
||||
可选参数
|
||||
|
||||
| 字段 | 说明 | 类型 | 默认值 |
|
||||
| -------- | -------- | -------- | -------- |
|
||||
| offsetTop | 距离窗口顶部多少时开始固定 | Number | 0 |
|
||||
|
||||
## Demo
|
||||
|
||||
```html
|
||||
<template>
|
||||
<hoc-el-affix
|
||||
:offsetTop="10"
|
||||
>
|
||||
<div class="demo"></div>
|
||||
</hoc-el-affix>
|
||||
</template>
|
||||
<style lang="scss" scoped>
|
||||
.demo {
|
||||
position: absolute;
|
||||
width: 150px;
|
||||
height: 300px;
|
||||
border: 1px solid red;
|
||||
}
|
||||
</style>
|
||||
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user