1.0.1 • Published 2 years ago

yeo-ui v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

Yeo小程序组件使用文档

Yeo组件使用步骤

  1. 导入Yeo文件夹(将文件放置同page同层级)
  2. 在app.json中导入组件路径

app.json

  "usingComponents": {
    "yeo-search": "/Yeo/YeoSearch/YeoSearch",
    "yeo-anima-search": "/Yeo/YeoAnimaSearch/YeoAnimaSearch",
    "yeo-rotate": "/Yeo/YeoRotate/YeoRotate",
    "yeo-art-font": "/Yeo/YeoArtFont/YeoArtFont",
    "yeo-simple-card": "/Yeo/YeoSimpleCard/YeoSimpleCard",
    "yeo-hang-swing": "/Yeo/YeoHangSwing/YeoHangSwing",
    "yeo-tab-bar": "/Yeo/YeoTabBar/YeoTabBar",
    "yeo-tab-bar-item": "/Yeo/YeoTabBarItem/YeoTabBarItem",
    "yeo-dy-fun-bar": "/Yeo/YeoDyFunBar/YeoDyFunBar",
    "yeo-icon": "/Yeo/YeoIcon/YeoIcon",
    "yeo-card": "/Yeo/YeoCard/YeoCard",
    "yeo-category": "/Yeo/YeoCategory/YeoCategory",
    "yeo-categories": "/Yeo/YeoCategories/YeoCategories",
    "yeo-horizon-slider": "/Yeo/YeoHorizonSlider/YeoHorizonSlider",
    "yeo-horizon-slider-v2": "/Yeo/YeoHorizonSliderV2/YeoHorizonSliderV2",
    "yeo-label-box": "/Yeo/YeoLabelBox/YeoLabelBox",
    "yeo-stretch": "/Yeo/YeoStretch/YeoStretch",
    "yeo-tools-bar": "/Yeo/YeoToolsBar/YeoToolsBar",
    "yeo-blur-card": "/Yeo/YeoBlurCard/YeoBlurCard",
    "yeo-comment": "/Yeo/YeoComment/YeoComment",
    "yeo-message-card": "/Yeo/YeoMessageCard/YeoMessageCard",
    "yeo-loading": "/Yeo/YeoLoading/YeoLoading",
    "yeo-swiper": "/Yeo/YeoSwiper/YeoSwiper",
    "yeo-label-bar": "/Yeo/YeoLabelBar/YeoLabelBar",
    "yeo-tab-change": "/Yeo/YeoTabChange/YeoTabChange",
    "yeo-flow-waterfall": "/Yeo/YeoFlowWaterfall/YeoFlowWaterfall",
    "yeo-diary-box": "/Yeo/YeoDiaryBox/YeoDiaryBox",
    "yeo-text-box": "/Yeo/YeoTextBox/YeoTextBox",
    "yeo-flow-waterfall-box": "/Yeo/YeoFlowWaterfallBox/YeoFlowWaterfallBox",
    "yeo-stamp-text": "/Yeo/YeoStampText/YeoStampText"
  }

在app.json中加入要使用组件的声明路径即可

  1. 在页面中引用组件名称标签,配置对应属性与事件

yeo-categories与yeo-category(分类)

展示效果

描述

通过Vue构建组件的形式,将整个组件拆分为了两个块(YeoCategories组件与YeoCategory组件),用户可以根据自身需求,自定义传入分类样式中item个数与item的样子。

属性说明

  • ==YeoCategories组件==
属性名类型默认值说明
paddingTopNumber70顶部内边距
paddingSideNumber95左右内边距
paddingBottomNumber40顶部内边距
  • ==YeoCategory组件==
属性名类型默认值说明
boxWidthString250rpx外框宽度
isShowPicBooleantrue是否显示左侧配图
bgColorString#948CFF背景颜色
picUrlStringhttps://s3.ax1x.com/2021/03/09/63FkcD.png图片地址
picSizeNumber46图片大小
paddingLeftofPicNumber30图片距离框体左侧内边距
boxRadiusNumber32框体圆角
boxMarginBottomNumber38框体底部外边距

插槽

  • ==YeoCategories组件==

YeoCategories组件:内部只含有一个slot标签,供大家任意插入其他样式(当然你也不一定非要插入YeoCategory组件)

  • ==YeoCategory组件==
  <yeo-category picUrl='../../images/vuejs-line.png' bgColor='#F8A9FF'>
    <view slot='title'>Vue</view>
  </yeo-category>

使用示例

index.wxml

<yeo-categories>
  <yeo-category picUrl='../../images/html.png'>
    <view slot='title'>HTML</view>
  </yeo-category>
  <yeo-category picUrl='../../images/css3.png' bgColor='#7CE8C1'>
    <view slot='title'>CSS</view>
  </yeo-category>
  <yeo-category picUrl='../../images/js.png' bgColor='#FD7C5A'>
    <view slot='title'>JavaScript</view>
  </yeo-category>
  <yeo-category picUrl='../../images/vuejs-line.png' bgColor='#F8A9FF'>
    <view slot='title'>Vue</view>
  </yeo-category>
</yeo-categories>

yeo-art-font(艺术字体)

展示效果

描述

提供多种形式的字体供大家使用,根据自我喜好,调整字体大小、颜色、位置等。

属性说明

公共属性

属性名类型默认值说明
fonTypeStringolFon字体类型(需要用户自行选择):udFon 上下字,olFon 重叠字,worLineFon 字线字
abColString#000000上层字体颜色
blColString#A5ADB5下层字体颜色
fonSizeNumber39字体大小

上下字体独有参数

属性名类型默认值说明
udPospStringcenter上下结构字的位置 center<居中> unset<未设置,默认靠左>
udFonConUpString上下字体上层字体内容
udFonConDownStringUpDown下层字体内容

重叠字体独有参数

属性名类型默认值说明
olFonConString重叠字体重叠字的字体内容
olFromLeftNumber40重叠字的位置(距离左侧百分比)

字线字体独有参数

属性名类型默认值说明
worLineFonConString字线字体字线字的字体内容
worLinePospStringcenter字线字的位置 center<居中> unset<未设置,默认靠左>
wordWieightStringnormal字体内容粗细 normal正常、bold加粗、bolder更粗、lighter变细
lineDistanceOfTopNumber1.3底部线条距离字体顶部的距离:字体大小 * lineDistanceOfTop
lineWidthOfScreenString35%底部线条宽度(屏幕百分比 or 具体数值<附带rpx>)
lineHeightNumber10底部线条厚度
lineColorString#FFA82E底部线条颜色
lineLeftRadiusNumber10底部线条左边圆角
lineRightRadiusNumber10底部线条右边圆角

使用示例

index.wxml

<!-- 
  公共参数:
    fonType: 字体类型
    FonSize: 字体大小
    abCol: 上层字体颜色(默认值:#000000) 
    blCol: 下层字体颜色(默认值:#A5ADB5)   
-->

<!-- 
  上下结构字体

  独有参数:
    udFonConUp:上面内容
    udFonConDown:下面内容
    udPosp:位置(可选值:center<居中>、unset<未设置,默认值>)
-->
<yeo-art-font
fonType='udFon'
fonSize='80'
udPosp='unset'></yeo-art-font>

<!-- 
  重叠结构字体

  独有参数:
    olFonCon:内容
    olFromLeft:
      距离屏幕左边的百分比距离(默认值:40) <0~70最佳>
-->
<yeo-art-font
fonType='olFon'
olFromLeft='30'></yeo-art-font>

<!-- 
  字线结构的字体

  独有参数:
    worLineFonCon:内容
    worLinePosp:
      位置(可选值:center<居中,默认值>、unset<未设置>)
    更多参数,请查看文档!
-->
<yeo-art-font
fonType='worLineFon'
fonSize='40'
lineWidthOfScreen='32%'></yeo-art-font>

yeo-icon(图标)

展示效果

npm.io

描述

Yeo图标,说实话,这组件我感觉封装了个寂寞,但是有总比没有好,后续会持续优化,各位见谅。

属性说明

属性名类型默认值说明
iconUrlStringhttps://s3.ax1x.com/2021/03/09/63FJBj.png图片地址
IconSizeNumber160图片大小

使用示例

index.wxml

<yeo-icon></yeo-icon>

yeo-swiper(轮播图)

展示效果

npm.io

npm.io

描述

轮播组件,经过调整,笔者认为此结构与宽距都合适,所以开放属性有限。

属性说明

属性名类型默认值说明
dataArrArray轮播图背景图数组背景图数组数据
swiperHeightNumber630轮播框高度
swiperPaddingTopNumber0轮播框内部上边距
swiperPaddingBotNumber0轮播框内部下边距
swiperMarginTopNumber60轮播框外部上边距
swiperMarginBotNumber30轮播框外部下边距
itemWidthNumber420Item宽度
itemHeightNumber410Item高度
itemMarginTopNumber100Item的顶部外边距
bordRadiusNumber30Item圆角大小
bgSizeStringcoverItem背景图横纵比(contain、cover)
autoPlayBooleantrue是否自动轮播
intervalTimeNumber5000轮播间隔时长
  • dataArr示例(默认值)
    // 背景图数组数据
    dataArr: {
      type: Array,
      value: [{
          bgUrl: 'https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=2738668818,2590397852&fm=26&gp=0.jpg',
          title: 'Tomorr',
          time: '2021-1-5',
          isStar: false
        },
        {
          bgUrl: 'https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=3569081884,3982453064&fm=26&gp=0.jpg',
          title: 'Thor',
          time: '2021-2-13',
          isStar: false
        },
        {
          bgUrl: 'https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=1105979147,3553146784&fm=26&gp=0.jpg',
          title: 'Red Coal',
          time: '2021-2-3',
          isStar: false
        }
      ]
    },

内部样式

属性名类型默认值说明
starBoxWidthNumber80收藏框宽度
starBoxHeightNumber80收藏框高度
starBoxBordRadiusNumber35收藏框圆角
starBoxBgColorString#4C5F79收藏框背景色
starTopWithOutBoxNumber-10收藏框距离外部框顶距离
starRightWithOutBoxNumber30收藏框距离外部框右侧边缘距离
starPicSizeString50%收藏框内图标大小(屏幕占比or具体数值)
bottomInfoBotWithOutBoxNumber10底部栏距离外部框底距离
bottomInfoLeftWithOutBoxNumber38底部栏距离外部框左侧距离
timeFontSizeNumber24时间字体大小
timeLetterSpacingNumber1时间字母间距
timeColorString#A8A4AE时间颜色
timeFontWeightStringnormal时间字体粗度
titleFontSizeNumber42标题字体大小
titleColorString#F5F9FC标题颜色
titleFontWeightStringbold标题字体粗度
titleFontNumNumber8显示标题文字数量
isShowStarPicBooleantrue是否显示收藏图标

事件

事件名事件描述组件返回页面数据返回数据类型返回数据说明
bind:clickevent监听点击(Item)事件indexNumber返回点击swiper-item索引
bind:sendarrevent==监听组件毁灭事件==dataArrArray返回改动后的dataArr

使用示例

index.wxml

<yeo-swiper></yeo-swiper>

yeo-tab-change(tab切换)

展示效果

描述

tab切换组件,为开发者提供在单页面的切换功能,开发者可根据自身需求对组件进行样式调整

属性说明

属性名类型默认值说明
isFixedBooleanfalse是否固定位置
fixedTopNumber0固定位置top值
boxPaddingTopNumber60组件框顶部内边距
bgColorString#eeeeee背景色
zIndexNumber199组件框层级
titleArrArray"首页", "商城", "动态", "我的"传入标题数组
currentIndexNumber0当前tab索引
tabWidthString100%tab框宽度
tabJustiContentStringspace-aroundtab布局方式
tabMarginString0 0 20rpx 0tab外边距
fontSizeNumber32字体大小
fontColorString#CBCBCB字体颜色(未选中时)
fontSelectColorString#FCFCFC字体tab选中时颜色
fontWeightStringbold字体粗细
fontLetterSpacingNumber5词组字间距
fontZIndexNumber10字体层级
lineWidthNumber80下划线宽度
lineHeightNumber20下划线高度
lineColorString#EC625C下划线颜色
lineBordRadiusNumber20下滑线圆角
lineBottomNumber-5下滑线距离tab框底部距离
lineZIndexNumber1下划线层级
lineLeftNumber-2下划线左距离

事件

事件名事件描述组件返回页面数据返回数据类型返回数据说明
bind:changetabevent监听切换tab事件tabIndexNumber返回点击tab的索引

使用示例

index.wxml

<view class="box">
  <yeo-tab-change></yeo-tab-change>
</view>

index.wxss

.box{
  padding-top: 50rpx;
  height: 1300rpx;
  background: #151515;
}

yeo-label-bar(标签切换页)

展示效果

描述

通过将yeo-tab-change组件与swiper原生组件相结合,通过数据绑定、数据监听、事件监听等方式结合而成,对于yeo-tab-change组件的部分属性可直接查看yeo-tab-change组件(部分:指除开我没写的部分

属性说明

属性名类型默认值说明
tabOutMarginString40rpx 0 0 0tab外框外边距
tabContHeightNumber270ttab内容高度
tabContColorString#F6F6F6tab内容框背景颜色
tabMarginString20rpx 10rpx 0tab内容框外边距
tabBordRadiusNumber10tab内容框圆角
tabIsScrollYBooleanfalsetab内容是否可垂直滚动
tabScrollHeightNumber200tab内容滚动的可视高度(当tab内容高度 > 此高度时,可看到滚动效果)
以下为yeo-tab-change部分--------------------------------------------------------------------------------
tabArrArray"Yeo", "听听", "推荐"TabChange数组
tabChangeWidthString100%TabChange框宽度
tabChangeJustiContentStringspace-aroundTabChange布局方式
currentTabNumber0初始化显示tab页面的索引

==其余没有写到的关于yeo-tab-change属性,都是可直接调用的同名属性!!==

使用示例

index.wxml

<yeo-label-bar tabArr='{{tabArray}}' currentTab='1' tabContHeight='{{maxHeight}}'>
  <view slot='{{tabArray[0]}}' class="tab-1">
    <view>{{tabArray[0]}}</view>
    <view>{{tabArray[0]}}</view>
    <view>{{tabArray[0]}}</view>
    <view>{{tabArray[0]}}</view>
    <view>{{tabArray[0]}}</view>
    <view>{{tabArray[0]}}</view>
  </view>
  <view slot='{{tabArray[1]}}' class="tab-2">
    <view>{{tabArray[1]}}</view>
    <view>{{tabArray[1]}}</view>
    <view>{{tabArray[1]}}</view>
  </view>
  <view slot='{{tabArray[2]}}' class="tab-3">
    <view>{{tabArray[2]}}</view>
    <view>{{tabArray[2]}}</view>
    <view>{{tabArray[2]}}</view>
    <view>{{tabArray[2]}}</view>
  </view>
</yeo-label-bar>

index.js

==其中演示的 TabInit() 方法非常重要,开发者只需要修改其中的选择器(.tab-1、.tab-2、.tab-3),就可以直接套用此方法,只是需要注意 tools 变量的相对路径==

// 1.这里的路径是相对于我的文件来说(开发者需要自行更改)
let tools = require('../../Yeo/utils/tools');
Page({

  /**
   * 页面的初始数据
   */
  data: {
    tabArray: ['Yeo', '我的', '动态']
  },

  // 2.初始化tab页面高度
  TabInit() {
    // 新建数组
    let tabHeiArr = [];
    // 声明异步函数
    new Promise((resolve, reject) => {
      /* 
        分别获取每个tab页的内容高度
        .tab-1 .tab-2 .tab-3 都是选择器
      */
      tools.selectHeight('.tab-1').then(back => {
        tabHeiArr.push(back);
      });
      tools.selectHeight('.tab-2').then(back => {
        tabHeiArr.push(back);
      });
      tools.selectHeight('.tab-3').then(back => {
        tabHeiArr.push(back);
        // 获取完成改变Promise状态
        resolve('success');
      });
    }).then(res => {
      let newArr = tabHeiArr.sort((a, b) => a - b);
      // 最大高度
      let maxHeight = newArr[tabHeiArr.length - 1];
      this.setData({
        maxHeight: maxHeight * 2
      })
    })
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    // 初始化tab高度
    this.TabInit();
  },
    
})

yeo-blur-card(滤镜卡片)

展示效果

npm.io

描述

在描述文字背景处添加模糊滤镜的效果,增加用户观感。同时支持开发者对组件各个部位进行调节。

属性说明

属性名类型默认值说明
descriptionString大家好,我是Mr.KLeo,一名正在学习前端的Person。热爱技术,热爱交流,热爱生活。擅长使用Vue、JavaScript、HTML、CSS、Yeo-components开发可复用的视图组件,希望与你共同进步!描述信息
buttonContentString按钮按钮文字
bgImgUrlStringhttps://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=2164794023,1537310268&fm=26&gp=0.jpg背景图地址(这里的地址是不支持相对路径的)
bgBordRadiusNumber20背景框圆角
bgWidthNumber600背景框宽度
bgHeightNumber600背景框高度
bgSizeStringcover背景图展示形式(cover集中 contain全包含)
blurWidthString86%模糊框宽度(屏幕百分比or数值<带上单位rpx>)
blurHeightString86%模糊框高度(屏幕百分比or数值<带上单位rpx>)
blurPaddingString30rpx模糊框内边距(这里你可以按照padding的规范填写): '20rpx 40rpx';'40rpx 30rpx 20rpx'; '40rpx 30rpx 20rpx 10rpx'
blurBordRadiusNumber30模糊框圆角
contentBordRadiusNumber10文字框圆角
contentSizeNumber30文字框内文字大小
contentColorString#2D4235文字颜色
btnColorStringrgba(255, 255, 255, 0.8)按钮文字颜色

事件

事件名事件描述组件返回页面数据返回数据类型返回数据说明
bind:btnevent监听点击按钮事件contentString返回文字内容

使用示例

index.wxml

<view class="box">
  <yeo-blur-card></yeo-blur-card>
</view>

index.wxss

.box {
  margin: 60rpx auto;
}

yeo-message-card(留言卡片)

展示效果

描述

评论组件,支持两种模式(暗黑模式与白天模式),除此之外,开发者可通过传入等级(1-7),为用户设定不同级别的头像挂件(如上图)

属性说明

属性名类型默认值说明
cardBotMarginNumber30底部外边距
userImgStringhttps://s3.ax1x.com/2021/03/09/63FUNq.jpg用户头像
headPendantNumber1头像挂件:从1-7级,级数越高,挂件越靓;小于1,默认不佩戴挂件;大于7,默认第7级
userNameString仙秩用户名
userNameColorString#555555用户名颜色
userNameSizeNumber28用户名字体大小
timeString2020-02-20时间
timeColorString#555555时间颜色
timeSizeNumber22时间字体大小
contentString我说的话叫评论,我做的事叫论评,你看我评论还是论评都是非常的坦荡评论内容
contentColorString#222222评论内容颜色
contentSizeNumber30评论内容字体大小
contentLetSpacingNumber2评论内容字间距
lineColorString#bbbbbb下划线颜色
contentPaddingBotNumber45下划线与内容距离
==model==Stringwhite设置模式(dark暗黑模式与white白天模式):设置模式的同时也设置了模式内的值,此时我们对于开发者设置的部分予以保留<暗黑模式最适背景色:#272727;白天模式最适背景色:#EBEBEB>
isShowStatusBooleantrue是否显示文字审核
statusWordsString待审核审核文字状态
statusWordsTextAlignStringleft审核文字位置
statusWordsColorString#188AFC审核文字颜色
statusWordsFontSizeNumber25审核文字大小
statusWordsMarginTopNumber20审核文字距离上外边距

事件

事件名事件描述组件返回页面数据返回数据类型返回数据说明
bind:userimgclick监听点击头像事件objObject包含用户名、用户头像url
bind:contentclick监听点击内容事件objObject包含用户名、发布时间、用户评论内容

使用示例

index.wxml

<view class="box">
  <view class="inner">
    <yeo-message-card headPendant='0' userImg='../imgs/YHS-2.jpg'></yeo-message-card>
    <yeo-message-card headPendant='3' userImg='../imgs/YHS-3.jfif' content='文件来对本页面的窗口表现进行配置。'></yeo-message-card>
    <yeo-message-card headPendant='4' userImg='../imgs/YHS-2.jpg' content='在支持云调用的接口文档中,会分别列出 HTTPS 调用的文档及云调用的文档,云调用文档同 HTTPS 调用文档一样包含请求参数、返回值及示例。'></yeo-message-card>
    <yeo-message-card headPendant='5' content='小程序根目录下的 app.json 文件用来对微信小程序进行全局配置'></yeo-message-card>
    <yeo-message-card headPendant='7' userImg='../imgs/YHS-1.jpg'></yeo-message-card>
    <yeo-message-card headPendant='8' content='接口获得临时登录凭证 code 后传到开发者服务器'></yeo-message-card>
  </view>
</view>

index.wxss

.box {
  width: 100%;
  height: 1600rpx;
  background: #272727;
}
.inner {
  padding: 50rpx 30rpx 0;
}

yeo-loading(加载动画)

展示效果

描述

加载动画组件,开发者可改变背景覆盖色、加载点的大小、圆角、颜色等。

属性说明

属性名类型默认值说明
isShowLoadingBooleantrue是否显示Loading
loadingBgColorStringrgba(230, 230, 230, 0.7)Loading背景颜色(传入rgba才可以实现透视遮盖层效果)
loadingTopString40%Loading在页面位置(百分比or具体数值<带rpx>高度)
dotColorString#1B76FF加载点颜色
dotNumNumber3加载点个数
dotSizeNumber26加载点大小
dotBordRadiusNumber8加载点圆角(数值越大,dot越圆)
dotMarginSizeNumber10加载点之间左右间距
dotShowDurationNumber500加载点之间出现间隔时长(ms)

使用示例

index.html

<!-- loading组件 -->
<yeo-loading isShowLoading='{{isShowLoading}}'></yeo-loading>

<!-- 模拟数据请求 -->
<view>我就是个摆设</view>
<view style="height: 500rpx;">
  <view wx:for="{{arr}}" wx:key='index'>
    <view style="height: 100rpx;width: 200rpx;">
      {{item}}
    </view>
  </view>
</view>
<view>我就是个摆设</view>

index.js

Page({
    
  /**
   * 页面的初始数据
   */
  data: {
    isShowLoading: true,
    arr: []
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    // 模拟数据加载过程
    setTimeout(()=>{
      this.setData({
        isShowLoading: false,
        arr: [123,23,454,4534,345]
      })
    },2000);
  },
    
})  

yeo-search(搜索栏)

展示效果

描述

搜索组件,开发者可根据爱好对搜索图标,占位文字进行更改,其次也可以根据自己需求对图标,输入框的位置与搜索框整体的大小进行更改。

属性说明

属性名类型默认值说明
searchImgStringhttps://s3.ax1x.com/2021/03/09/63FAje.png搜索图标
placeholderStringInput Something占位文字
backgroundStringrgb(250,250,250)背景颜色
searBordRadiusNumber60搜索框圆角
topPaddingNumber12上内边距
bottomPaddingNumber12下内边距
leftPaddingNumber30左内边距
rightPaddingNumber30右内边距
inputLeftMarginNumber16输入框左外边距
inputRightMarginNumber30输入框右外边距
inputTypeStringtext输入内容类型
initValueString我是起始内容输入的起始内容
  • inputType属性的适用值
适用值说明
text文本输入键盘
number数字输入键盘
idcard身份证输入键盘
digit带小数点的数字键盘

事件

返回数据说明:具体内容请查看

事件名事件描述组件返回页面数据返回数据类型返回数据说明
bind:inputevent监听键盘输入事件objObject输入内容等相关数据
bind:focusevent监听输入框聚焦事件objObject输入内容等相关数据
bind:blurevent监听输入框失去焦点事件objObject输入内容等相关数据
bind:confirmevent监听输入框点击完成按钮事件objObject输入内容等相关数据
bind:keyboardheightchangeevent监听键盘高度变化事件objObject输入内容等相关数据

使用示例

index.html

<view class="search">
  <yeo-search></yeo-search>
</view>

index.wxss

.search {
  margin: 40rpx auto 30rpx;
  width: 600rpx;
}

yeo-rotate(旋转的餐盘)

展示效果

描述

在紫色餐桌上左右滑动,即可切换餐盘,更换不同的美食哟!

属性说明

属性名类型默认值说明
roundBgColorStringrgb(157, 157, 202)圆桌背景
roundSizeNumber0圆桌大小(0~50最佳)
vegtArrArray4张图片路径数组传入旋转餐盘数组数据(暂时固定取四个元素);少于四个:传入默认数组,多于四个:获取传入数据前四个元素
  • vegtArr
    /* 
      传入旋转数据(暂时固定取四个元素)
      少于四个:传入默认数组
      多于四个:获取传入数据前四个元素
    */
    vegtArr: {
      type: Array,
      value: [
        'https://s3.ax1x.com/2021/03/09/63F1gS.png',
        'https://s3.ax1x.com/2021/03/09/63F3jg.png',
        'https://s3.ax1x.com/2021/03/09/63FYHs.png',
        'https://s3.ax1x.com/2021/03/09/63FJBj.png'
      ]
    }

事件

事件名事件描述组件返回页面数据返回数据类型返回数据说明
bind:itemevent监听点击对象事件objObject点击餐盘返回的单一对象

使用示例

index.wxml

<yeo-rotate></yeo-rotate>

yeo-anima-search(动画搜索)

展示效果

描述

附带动画效果的实时性搜索组件

属性说明

属性名类型默认值说明
bindvalueStringnull搜索输入值
searBackArrArraynull返回搜索结果数组
lineWidthNumber330line长度
titFontNumber28搜索内容标题大小
descFontNumber23搜索内容描述大小
horizonWidthNumber200横向展开宽度(px)
perpendHeightNumber260垂直展开高度(px)
cancelMovRightNumber160取消叉图右移距离(px)
inputMovRightNumber40输入框右移距离(px)
inputWidthNumber90输入框宽度(px)
boxBgColorString#FFFFFF搜索框背景颜色

事件

事件名事件描述组件返回页面数据返回数据类型返回数据说明
bind:getsearobjevent监听点击对象事件clickObjObject点击搜索中返回的单一对象
bind:searcontevent改变数据搜索内容事件searContString返回实时搜索内容

使用示例

index.wxml

<yeo-anima-search model:bindvalue="{{pageValue}}" bind:searcontevent="changeSearCont" searBackArr="{{searArr}}">
</yeo-anima-search>

index.js

 /**
   * 页面的初始数据
   */
  data: {
    // 双向绑定数据
    pageValue: ''
  },

  // 改变数据搜索内容
  changeSearCont(e) {
    if (e.detail.searCont) {
      // 获取实时搜索内容
      let searCon = e.detail.searCont;
      wx.request({
        // 这里是作者本人接口,支持与否,取决于作者是否进行了后期服务器续费操作
        url: 'https://yundingxikj.cn/weixin/search/' + searCon,
        success: res => {
          console.log(res.data);
          // 构建新数组,存入返回值
          let searArr = res.data.filter((value, index) => {
            return index < 3;
          }).map((value, index) => {
            let obj = {};
            obj.tit = value.articleTitle;
            obj.desc = value.articleSummary.substring(0,14);

            return obj;
          })

          this.setData({
            searArr: searArr
          })
        },
        fail: res => {
          wx.showToast({
            icon: 'none',
            title: '网络错误,请稍后再试',
          })
        }
      })
    } else {
      console.log('暂无搜索值');
    }

  },

yeo-horizon-slider(横向滑动栏)

展示效果

描述

向右滑动展示更多内容

属性说明

属性名类型默认值说明
sliderArrArraynull遍历数组数据
isShowContentBooleantrue是否显示文字内容

事件

事件名事件描述组件返回页面数据返回数据类型返回数据说明
bind:clickevent监听点击事件clickObjObject返回点击对象的图片地址、标题、描述、索引

使用示例

index.wxml

<yeo-horizon-slider sliderArr='{{sliderArr}}' bind:clickevent='clickObj'></yeo-horizon-slider>

index.js

  /**
   * 页面的初始数据
   */
  data: {
    // 传入数组数据
    sliderArr: [{
        picUrl: 'https://s3.ax1x.com/2021/03/09/63FNEn.jpg',
        title: '怦然心动',
        description: '月亮将会奔你而来',
        picBorder: ''
      },
      {
        picUrl: 'https://s3.ax1x.com/2021/03/09/63FUNq.jpg',
        title: '傲慢与偏见',
        description: '以灵魂唤醒灵魂',
        picBorder: ''
      },
      {
        picUrl: 'https://s1.ax1x.com/2020/08/02/aYQfFx.jpg',
        title: '老人与海',
        description: '老人与海的固执',
        picBorder: ''
      },
      {
        picUrl: 'https://s1.ax1x.com/2020/08/02/aYlncF.jpg',
        title: '复仇者联盟',
        description: '以父之名论英雄',
        picBorder: ''
      },
    ]
  },

  // 点击事件
  clickObj(e) {
    // 监听触发目标
    console.log(e.detail.clickObj);
  },

yeo-horizon-slider-v2(横向滑动栏-v2)

展示效果

描述

向右滑动展示更多内容

属性说明

属性名类型默认值说明
sliderArrArraynull遍历数组数据
isShowMovBooleantrue是否开启动画滑动提示
titFontNumber20标题大小
numFontNumber50数字大小

事件

事件名事件描述
bind:clickevent监听点击事件

使用示例

index.wxml

<yeo-horizon-slider-v2 sliderArr='{{sliderArr}}' bind:clickevent="clickObj">
</yeo-horizon-slider-v2>

index.js

 /**
   * 页面的初始数据
   */
  data: {
    sliderArr: [
      {picUrl: '../../images/computer.png',bgColor: '#EBDFFF',title: 'Article',num: 19},
      {picUrl: '../../images/earphone.png',bgColor: '#C4EFFC',title: 'Category',num: 6},
      {picUrl: '../../images/router.png',bgColor: '#948CFF',title: 'Module',num: 3}
    ]
  },

  // 获取点击对象
  clickObj(e) {
    // 获取点击对象
    console.log(e.detail.itemObj);
  },

yeo-dyfunbar(动态功能栏)

展示效果

描述

动态功能栏,可以根据自我需求对功能栏进行改变,整个组件分别有左、中、右三个部分组成

属性说明

属性名类型默认值说明
distractWayStringaround分散方式
sideDistanceNumber0左右两边边距
  • distractWay具体属性值
属性值说明
start集中在左边
end集中在右边
center集中在中间
between之间
around围绕

事件

事件名事件描述
bind:centerevent中间部分监听事件
bind:leftevent左边部分监听事件
bind:rightevent右边部分监听事件

插槽

总体功能栏是分三个部分的,每个部分都对应一个槽位供开发者自行添加

  <yeo-icon slot='dy-left' IconSize='40' iconUrl='../imgs/back-2.png'></yeo-icon>
  <yeo-search slot='dy-center'></yeo-search>
  <yeo-icon slot='dy-right' IconSize='40' iconUrl='../imgs/分类.png'></yeo-icon>

使用示例

index.wxml

<!-- 组合方式-1   icon/search/icon-->
<yeo-dy-fun-bar>
  <yeo-icon slot='dy-left' IconSize='40' iconUrl='../imgs/back-2.png'></yeo-icon>
  <yeo-search slot='dy-center'></yeo-search>
  <yeo-icon slot='dy-right' IconSize='40' iconUrl='../imgs/分类.png'></yeo-icon>
</yeo-dy-fun-bar>

<!-- 组合方式-2   hangSwing/search/hangSwing-->
<yeo-dy-fun-bar>
  <yeo-hang-swing slot='dy-left'
  ImgSize='70'></yeo-hang-swing>
  <yeo-search slot='dy-center'></yeo-search>
  <yeo-hang-swing slot='dy-right'
  ImgSize='70'></yeo-hang-swing>
</yeo-dy-fun-bar>

<!-- 组合方式-3   hangSwing/search/icon-->
<yeo-dy-fun-bar>
  <yeo-search slot='dy-center'></yeo-search>
  <yeo-icon slot='dy-right' IconSize='40' iconUrl='../imgs/分类.png'></yeo-icon>
</yeo-dy-fun-bar>

<!-- 组合方式-4   hangSwing/自定义/icon-->
<yeo-dy-fun-bar distractWay='between' sideDistance='30' bind:centerevent='centerTap'>
  <yeo-icon slot='dy-left' IconSize='40' iconUrl='../imgs/back-2.png'></yeo-icon>
  <view slot='dy-center'>我就是个所谓的标题</view>
  <yeo-icon slot='dy-right' IconSize='40' iconUrl='../imgs/分类.png'></yeo-icon>
</yeo-dy-fun-bar>

yeo-hang-swing(摇摆吊灯)

展示效果

描述

传入一张图片,按照(50%,0)的图形中心点进行摆动

属性说明

属性名类型默认值说明
swingSpeedNumber1.5摆动频率(数值越大,摆动越慢)
imgUrlStringhttps://s3.ax1x.com/2021/03/09/63FwCV.png图片地址
imgSizeNumber100图片大小

事件

事件名事件描述
bind:clickevent点击监听事件

使用示例

index.wxml

<yeo-hang-swing ImgSize='80'></yeo-hang-swing>

yeo-simple-card(简卡)

展示效果

描述

根据自我喜好配置不同颜色的简卡

属性说明

属性名类型默认值说明
imgUrlStringhttps://s3.ax1x.com/2021/03/09/63FF1O.jpg图片路径
titleString云顶犀开发社区标题
descriptionString致力于打造多元化生态系统内容
BackgroundColorStringorange背景颜色

事件

事件名事件描述
bind:picevent点击图片监听事件
bind:mainevent点击其他地方监听事件

使用示例

index.wxml 与 index.wxss

<view class="outbox">
  <view class="inner">
    <yeo-simple-card />
  </view>
  <view class="inner">
    <yeo-simple-card BackgroundColor='#F3C143'/>
  </view>
  <view class="inner">
    <yeo-simple-card BackgroundColor='#9AC656'/>
  </view>
  <view class="inner">
    <yeo-simple-card BackgroundColor='#59B9B4'/>
  </view>
</view>
.outbox {
  width: 93%;
  margin: 30rpx auto 0;
}
.outbox .inner {
  margin-bottom: 27rpx;
}

yeo-card(介绍卡片)

展示效果

描述

这是一个关于自我介绍的卡片,

属性说明

属性名类型默认值说明
nameStringMr.KLeo昵称
positionString前端工程师/Dancer职务或爱好
descriptionString大家好,我是Mr.KLeo,一名正在学习前端的Person。热爱技术,热爱交流,热爱生活。擅长使用Vue、JavaScript、HTML、CSS、Yeo-components开发可复用的视图组件,希望与你共同进步!介绍内容
cardPicStringhttps://s3.ax1x.com/2021/03/09/63FF1O.jpg右侧配图
btnBgColorString#7AB2DC(关注)按钮背景色
clickBtnBgColorString#5E6675点击(关注)按钮后,按钮背景色

事件

事件名事件描述组件返回页面数据返回数据类型返回数据说明
bind:attentevent点击(关注)按钮监听事件isAttentBoolean是否关注

使用示例

index.wxml 与 index.wxss

<view class="pageBox">
  <yeo-card />
</view>
.pageBox {
  margin: 70rpx auto;
}

yeo-tab-bar(底部栏)

展示效果

描述

通过Vue构建组件的形式,将整个组件拆分为了两个块(YeoTabBar组件与YeoTabBarItem组件),用户可以根据自身需求,自定义tabbar中item个数(经过测试,3~5个效果最佳)

属性说明

  • ==YeoTabBarItem组件==
属性名类型默认值说明
isSelectNumbernull是否为选中图标(1-选中,0-未选中)
selectWordsColStringnull选中时文字颜色
jumpUrlString跳转页面地址
  • ==YeoTabBar组件==
属性名类型默认值说明
backgroundColString#2E3B4A背景颜色

使用示例

index.wxml

<yeo-tab-bar backgroundCol='#2E3B4A'>
  <yeo-tab-bar-item isSelect='1' selectWordsCol='#5BC6FA'>
    <image slot='pic-select' src="../../images/首页-select.png"></image>
    <image slot='pic' src="../../images/首页.png"></image>
    <view slot='tit'>首页</view>
  </yeo-tab-bar-item>

  <yeo-tab-bar-item isSelect='0' selectWordsCol='#5BC6FA'
  jumpUrl='/pages/yeo-hangswing/yeo-hangswing'>
    <image slot='pic-select' src="../../images/分类-select.png"></image>
    <image slot='pic' src="../../images/分类.png"></image>
    <view slot='tit'>分类</view>
  </yeo-tab-bar-item>

  <yeo-tab-bar-item isSelect='0' selectWordsCol='#5BC6FA'
  jumpUrl='/pages/yeo-dyfunbar/yeo-dyfunbar'>
    <image slot='pic-select' src="../../images/我的-select.png"></image>
    <image slot='pic' src="../../images/我的.png"></image>
    <view slot='tit'>我的</view>
  </yeo-tab-bar-item>
</yeo-tab-bar>

yeo-flow-waterfall-box(瀑布流布局外框架)

展示效果

npm.io

描述

瀑布流布局的外框架,内容由开发者自行定义

插槽

<yeo-flow-waterfall-box>
  <yeo-text-box></yeo-text-box>
  <yeo-text-box></yeo-text-box>
</yeo-flow-waterfall-box>

使用示例

index.wxml

<yeo-flow-waterfall-box>
  <!-- 奇数 -->
  <yeo-text-box wx:for="{{dataArr}}" wx:key='index' wx:if="{{index % 2 == 0}}" content='{{item.content}}'></yeo-text-box>

  <!-- 偶数 -->
  <yeo-text-box wx:for="{{dataArr}}" wx:key='index' wx:if="{{index % 2 != 0}}" content='{{item.content}}'></yeo-text-box>
</yeo-flow-waterfall-box>

<!-- 添加数据 -->
<button bindtap="add">添加</button>

index.wxss

yeo-text-box {
  display: inline-block;
  margin-bottom: 20rpx;
}

index.js

Page({

  /**
   * 页面的初始数据
   */
  data: {
    dataArr: [{
        content: '我是一个人在游走的时候我送山大佛都发生的的撒佛1'
      },
      {
        content: '我是一个人在游走的时候我送山大佛都发生的的撒佛2'
      },
      {
        content: '我是一个人在游走的时候我送山大佛都发生的的撒佛3'
      },
      {
        content: '我是一个人在游走的时候我送山大佛都发生的的撒佛4'
      },
      {
        content: '我是一个人在游走的时候我送山大佛都发生的的撒佛5'
      },
      {
        content: '我是一个人在游走的时候我送山大佛都发生的的撒佛6'
      },
    ]
  },

  // 添加数据
  add() {
    let dataArr = this.data.dataArr;
    let newArr = [{
        content: '我是新数据,看好了1'
      },
      {
        content: '我是新数据,看好了2'
      },
      {
        content: '我是新数据,看好了3'
      },
      {
        content: '我是新数据,看好了4'
      },
      {
        content: '我是新数据,看好了5'
      },
      {
        content: '我是新数据,看好了6'
      },
    ];
    this.setData({
      dataArr: dataArr.concat(newArr)
    })
  },
})

yeo-flow-waterfall(瀑布流布局)

展示效果

描述

组件采用两列式的流式布局,开发者通过传入数组数据(图片、名称、点赞数等)对组件进行数据插入,其次对于组件的样式进行样式接口的开放

属性说明

属性名类型默认值说明
dataArrArray详细见下面代码数组数据内容
boxMarginString0 20rpx外层框外边距
itemTopLeftRadiusNumber10item框左上方圆角
itemTopRightRadiusNumber10item框右上方圆角
itemContPaddingString12rpx 23rpx 30rpxitem框内容内边距
itemContBgColorStringrgb(240,240,240)item框内容背景颜色
itemContTitleSizeNumber32内容框标题字体大小
itemContTitleWeightStringbold内容框标题字体粗细
itemContTitleColorString#3F3F4F内容框标题字体颜色
itemContTitleBotMarginNumber15内容框标题字体下外边距
itemUserPicSizeNumber40内容框用户头像大小
itemUserPicBordRadiusString50%内容框用户头像圆角
itemUserNameSizeNumber26内容框用户名字体大小
itemUserNameLetterSpacingNumber1内容框用户名字间距
itemUserNameColorString#767676内容框用户名字体颜色
itemUserNameMarginLeftNumber12内容框用户名字体左外边距
itemContLovesPicSizeNumber35内容框点赞图标大小
itemContLovesNumSizeNumber30内容框点赞数量字体大小
itemContLovesNumColorString#6E6E6E内容框点赞数量字体颜色
itemContLovesNumMarginLeftNumber6内容框点赞数量左外边距

事件

事件名事件描述组件返回页面数据返回数据类型返回数据说明
bind:senddataevent==监听组件毁灭事件==dataArrObject返回改动后的dataArr

使用示例

index.wxml

<yeo-flow-waterfall></yeo-flow-waterfall>

yeo-text-box(文本框)

展示效果

npm.io

描述

日记框,开发者可自由更改文本框大小(外层加样式)、文本框内文字颜色与大小

属性说明

属性名类型默认值说明
contentString从昨天开始,我要好好学习,天天向上,嘻嘻,因为我是一个爱学习的Man内容
userNameString胡辣汤的朋友用户名
commentNumNumber265评论数量
boxWidthString100%外框宽度
boxBordRadiusNumber25外框圆角
boxShadowString0 0 20rpx #cccccc外框阴影
contMarginBottomNumber25内容底部外边距
contLetterSpacingNumber2内容字间距
contFontSizeNumber28内容文字大小
contLineHeightNumber1.55内容行高
contentPaddingString28rpx 28rpx 13rpx内容内边距
contentBgColorString#F9F9F9内容背景色
isShowHeadPicBooleantrue是否显示用户头像
headPicUrlStringhttps://dss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2596268243,3122318467&fm=26&gp=0.jpg用户头像url
botBarHeadPicWidthNumber40用户头像宽度
botBarHeadPicHeightNumber40用户头像高度
botBarHeadPicMarginString0 10rpx 0 0用户头像外边距
botBarHeadPicBordRadiusString50%用户头像图片圆角
botBarJustifyContentStringspace-between底部栏布局方式
botBarFontColorString#767676底部栏字体颜色
botBarUserNameLetterSpacingNumber1底部栏用户名字间距
botBarUserNameFontSizeNumber26底部栏字体大小
picSizeNumber20箭头图标大小
botBarPaddingString13rpx 28rpx 28rpx底部栏内边距
botBarBgColorString#F3F6F6底部栏背景色

事件

事件名事件描述组件返回页面数据返回数据类型返回数据说明
bind:clickevent监听点击文本框事件infoObject包含用户名、文本内容、文本评论数量

使用示例

index.wxml 与 index.wxss

<view class="box">
  <yeo-text-box></yeo-text-box>
</view>
.box {
  margin: 30rpx 200rpx 0;
}

yeo-diary-box(日记框)

展示效果

npm.io

描述

日记框,开发者可自由更改日记框大小(外层加样式)、日记框内文字颜色与大小

属性说明

属性名类型默认值说明
diaryTitString日记男孩标题
diaryContentString我们总是打扫房间思想水利电力谁都得四我看看水电费计息撒旦法大反馈了山东中路上的方块第三方日记内容
diaryDateString3月5日日记时间
fontColorString#293939字体颜色
bgColorString#f6f6f6背景色
bordRadiusNumber25外框圆角
paddingNumber30内边距
marginBottomNumber20外框底部外边距
titFontSizeNumber35标题字体大小
titFontWeightStringbold标题字体粗细
titPaddingTopNumber15标题顶部内边距
titMarginBottomNumber20标题底部外边距
contentLetterSpacingNumber2内容字间距
contentFontSizeNumber27内容字体大小
contentMarginBottomNumber25内容底部外边距
dateFontSizeNumber30日期字体大小

事件

事件名事件描述组件返回页面数据返回数据类型返回数据说明
bind:clickevent监听点击日记框事件infoObject包含日记标题、日记内容、日记时间

使用示例

index.wxml 与 index.wxss

<view class="box">
  <yeo-diary-box></yeo-diary-box>
</view>
.box {
  margin: 30rpx 20rpx 0;
}

yeo-stamp-text(邮票文本框)

展示效果

npm.io

描述

邮票框,开发者可自行调整邮票图片、信件内容、用户名与时间

属性说明

属性名类型默认值说明
boxSizingStringcontent-box外框boxSizing
boxWidthNumber300外框宽度
boxHeightNumber410外框高度
boxMarginString0外边距
boxPaddingString#ffffff内边距
boxBordRadiusNumber10外框圆角
boxShadowString0 0 10rpx #bbbbbb外框阴影
fontFamilyString'Courier New', Courier, monospace字体
stampTopPaddingString0 0 30rpx顶部邮票栏内边距
stampTopLeftPicStringhttps://s4.ax1x.com/2021/03/20/6hQpOf.png顶部邮票栏左图
stampTopLeftPicSizeNumber50顶部邮票栏左图大小
stampPicStringhttps://s4.ax1x.com/2021/03/20/6h1kzn.png顶部邮票栏邮票图片地址
stampPicWidthSizeNumber90顶部邮票栏邮票图片宽度
stampPicHeightSizeNumber120顶部邮票栏邮票图片高度
contentHeightNumber120内容高度
contentFontColorString#4B4B4B内容框字体颜色
contentFontSizeNumber26内容框字体大小
contentPaddingString0 0 60rpx内容框内边距
contentLineHeightNumber1.6内容框行高
contentLetterSpacingNumber1内容框字间距
infoNameFontSizeNumber30信息栏用户名字体大小
infoNamePaddingString0 0 50rpx信息框用户名内边距
infoNameFontColorString#24314C信息框用户名字体颜色
infoNameFontWeightStringbold信息框用户名字体粗细
contentString这是一个关于邮票的文本框,用户可以自定义邮票与内容内容
nameString幸运小木头用户名
dateString今天上午 11:32时间

事件

事件名事件描述组件返回页面数据返回数据类型返回数据说明
bind:clickevent监听点击邮票框事件infoObject包含邮票用户名、日记内容、日记时间

使用示例

index.wxml 与 index.wxss

<yeo-stamp-text></yeo-stamp-text>
page {
  background: #f6f6f6;
}

yeo-label-box(标签框)

展示效果

描述

在此框中,下部分的小字描述是slot插槽部分,可动态变化(通过具名slot)

属性说明

属性名类型默认值说明
titleWordsStringVue双向绑定标题内容
looksString66666浏览数
looksColString浏览数的颜色
bordRadiusNumber13背景框圆角大小
bgColorString#FFFFFF背景颜色

事件

事件名事件描述
bind:clickevent标签框监听事件

插槽

此组件需要使用具名插槽作为小字内容

<view slot='content'>文字内容</view>

使用示例

index.wxml 与 index.js

<!-- 标签框组件 -->
<yeo-label-box titleWords='Java工程师面试考点' bind:clickevent='clickEvent'>
  <view slot='content'>· Java学成什么样子可以找到工作?</view>
  <view slot='content'>· Java学成什么样子可以找到工作?不要去抱怨这些没有的启迪大水发?</view>
</yeo-label-box>

<!-- 标签框组件 -->
<yeo-label-box looks='100000' bind:clickevent='clickEvent'>
  <view slot='content'>从而使表格偶数行和奇数行颜色不一样。这样的兼容性很好。但是最近在做手机网站的时候,由于手机网站对浏览器兼容
  </view>
</yeo-label-box>
// 点击组件
  clickEvent(e) {
    console.log(e);
    console.log('标签框被点击');
  },

yeo-stretch(动态伸缩模块)

展示效果

描述

通过点击闪动的闪电小图标(当然你也可以更换),动态伸缩展示具体内容,展示内容通过具名插槽传入,同时展开后支持向下滑动,也就是说不限制插槽内容高度。

属性说明

属性名类型默认值说明
flickPicStringhttps://s3.ax1x.com/2021/03/09/63FgER.png闪动图标
boxWidthString90%展示框宽度(百分数或者具体数值)
boxHeightNumber1000展示框高度
boxRadiusNumber30展示框圆角(0-50最佳)
TransTimeNumber1展示框&&闪动图标伸展收缩持续时长(0-3s,超过3s统一设置为3s)
flickPicMovRightDistanceString86%闪动图标向右移动距离(百分数或者具体数值)

插槽

index.wxml

  <yeo-stretch>
    <!-- 插槽 -->
    <view slot='content'>
     	<!-- 插入内容 -->
    </view>
  </yeo-stretch>

使用示例

index.wxml

<view class="box">
  <yeo-stretch>

    <!-- 传入组件作为插槽内容 -->
    <view slot='content'>
      <yeo-label-box>
        <view slot='content'>
          左右和啥打法上撒旦法四大发顺丰下次茶多酚爱的色放奥的斯是驾驶的立法奥德赛放假啊实打实说的覅偶而忘记微微辣插卡积分ad佛阿斯蒂芬
        </view>
      </yeo-label-box>

      <yeo-label-box>
        <view slot='content'>
          左右和啥打法上撒旦法四大发顺丰下次茶多酚爱的色放奥的斯是驾驶的立法奥德赛放假啊实打实说的覅偶而忘记微微辣插卡积分ad佛阿斯蒂芬
        </view>
      </yeo-label-box>

      <yeo-label-box>
        <view slot='content'>
          左右和啥打法上撒旦法四大发顺丰下次茶多酚爱的色放奥的斯是驾驶的立法奥德赛放假啊实打实说的覅偶而忘记微微辣插卡积分ad佛阿斯蒂芬
        </view>
      </yeo-label-box>
    </view>

  </yeo-stretch>
</view>

index.wxss

.box {
  margin: 30rpx 0 30rpx 50rpx;
}

yeo-tools-bar(工具栏)

展示效果

描述

点击中心图标,工具栏动画展开;再次点击复原

属性说明

属性名类型默认值说明
bordRadiusNumber15背景块圆角大小
movDistanceNumber52动画展示距离
mainPicStringhttps://s3.ax1x.com/2021/03/09/63FQ9f.png中心控制显示图标路径
upPicStringhttps://s3.ax1x.com/2021/03/09/63FK4P.png上图标路径
rightUpPicStringhttps://s3.ax1x.com/2021/03/09/63Fl38.png右上图标路径
rightPicStringhttps://s3.ax1x.com/2021/03/09/63FuNt.png右图标路径
picSizeNumber15图标相对背景块大小(10~25适宜)
bgColorString#9266F9背景块颜色

事件

事件名事件描述
bind:upevent上图标监听事件
bind:uprightevent右上图标监听事件
bind:rightevent右图标监听事件

使用示例

index.wxml 与 index.js

<yeo-tools-bar bind:upevent='upEvent'></yeo-tools-bar>
// 监听上图标事件
  upEvent(e) {
    console.log(e);
  },

==yeo-comment==(评论组件)

展示效果

描述

整个评论组件其实是由前面的三个组件组合而成(yeo-art-font、yeo-dyfunbar、yeo-message-card),通过适当调整开发而成,为了达到最优展示效果,笔者提供的开发属性与接口相对减少,只对外开放必要属性进行更改(其实我就是懒)

属性说明

属性名类型默认值说明
boxTopMarginNumber50评论组件上外边距
boxSizeMarginNumber40评论组件左右外边距
boxBotMarginNumber40评论组件下外边距
commentTitleString最新评论评论顶标题
commentColorString#188AFC评论顶标题颜色
lineWidthString94rpx下划线长度(百分比or具体数值)
lineColorString#5AC3D6
1.0.1

2 years ago

1.0.0

2 years ago