国产chinesehdxxxx野外,国产av无码专区亚洲av琪琪,播放男人添女人下边视频,成人国产精品一区二区免费看,chinese丰满人妻videos

ElementPlus Affix 固釘

2021-09-26 16:55 更新

Affix 固釘

將頁面元素固定在特定可視區(qū)域。

基本用法

固釘默認固定在頁面頂部。


通過設置 offset 屬性來改變吸頂距離,默認值為 0。

<template>
  <el-affix :offset="120">
  <el-button type="primary">距離頂部 120px</el-button>
</el-affix>
</template>

指定容器

通過設置 target 屬性,讓固釘始終保持在容器內,超過范圍則隱藏。


請注意容器避免出現(xiàn)滾動條。

<template>
  <div class="affix-container">
  <el-affix target=".affix-container" :offset="80">
    <el-button type="primary">指定容器</el-button>
  </el-affix>
</div>
</template>

固定位置

Affix 組件提供了兩個固定位置:top 和 bottom。


通過設置 position 屬性來改變固定位置,默認值為 top 。

<template>
  <el-affix position="bottom" :offset="20">
  <el-button type="primary">距離底部 20px</el-button>
</el-affix>
</template>

Attributes

參數(shù)說明類型可選值默認值
offset偏移距離number0
position固釘位置stringtop / bottomtop
target指定容器(CSS 選擇器)string
z-index固釘層級number100

Events

事件名稱說明回調參數(shù)
change固釘狀態(tài)改變時觸發(fā)的事件(value: boolean)
scroll滾動時觸發(fā)的事件滾動距離和固釘狀態(tài)

Methods

方法名說明參數(shù)
update手動更新固釘狀態(tài)


以上內容是否對您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號
微信公眾號

編程獅公眾號