1.0.1 • Published 2 years ago
BackTop
使用示例
// html
<div class="en-backTop"></div>
// js
new YvokeUi.BackTop({
element: document.querySelector('.en-backTop'),
showHeight: 100,
callback: () => {
console.log("你好");
}
})
API
属性 | 说明 | 类型 | 默认值 | 是否必传 |
---|
element | 组件标签容器 | 单个dom元素 | null | 是 |
right | 右边距 | number | 0.8 | 否 |
bottom | 距离底部的距离 | number | 6 | 否 |
showHeight | 组件展示的页面滑动距离 | number | 20 | 否 |
callback | 回调函数 | function | 无 | 否 |
OpenApp
使用示例
//html
<div class="en-openApp"></div>
// js
new YvokeUi.OpenApp({
element: document.querySelector('.en-openApp'),
// bgColor: "skyblue",
// color: "black",
callback: ()=> {
console.log("打开App");
}
})
属性 | 说明 | 类型 | 默认值 | 是否必传 |
---|
element | 组件标签容器 | 单个dom元素 | null | 是 |
left | 左边距 | number | 5 | 否 |
bottom | 距离底部的距离 | number | 6 | 否 |
text | 组件内字体 | String | 打开 App 观看海量视频 | 否 |
color | 字体颜色 | String | white | 否 |
bgColor | 背景颜色 | String | #ff6022 | 否 |
width | 宽度 | Number | 90 | 否 |
callback | 回调函数 | function | 无 | 否 |