0.0.1 • Published 3 years ago

educiot-wx v0.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

育联网移动端通用组件(需配合vant一起使用)

使用方法

局部调用

import { a } from 'educiot-wx'

components: { a:a }

全局调用

import educiotWx from 'educiot-wx'

Vue.use(educiotWx)

topHead(顶部navbar)

参数

参数类型说明必传默认值
titleString标题,可支持html
hasleftBoolean是否有左边图标true
hasRightBoolean是否有右边图标false
isClearBoolean左边图标自定义事件,默认事件返回上一页false
isiconBoolean右边是否使用字体图标true
iconsString字体图标的样式名
urlString右边自定义图标的链接
icolorString图标颜色#333
bgcString整条navbar的背景色#fff
tcolorStringtitle颜色#333
hasborBoolean是否显示底边框false
tsizeStringtitle字体大小16px

事件

事件说明返回值
clearCacheisClear为true时需要给返回键自定义事件true
clickRight右边图标的点击事件true

注:鉴于ios部分机型存在刘海,所以navbar头部需要空出一个刘海高,刘海高度由app端传递过来,定义为bang,bang值储存在本地缓存saveData中,该组件的流海高度取于saveData中的bang值

userHead(用户头像)

参数

参数类型说明必传默认值
srcString头像链接-
sizeString头像尺寸100
roundBoolean是否圆形头像true