Giter Site home page Giter Site logo

tyui-miniprogram's Introduction

tyui-miniprogram

小程序组件:slider 单滑块,双滑块, 垂直,以及反向操作,自定义滑块slot

使用

  1. 安装依赖:
npm install tyui-miniprogram
  1. json文件中引入
"ty-slider": "tyui-miniprogram/slider/index",
  1. wxml文件中引入
 <ty-slider range="{{false}}"  min="{{0}}" max="{{100}}" value="{{50}}" step="{{1}}" vertical="{{true}}" reverse activeColor="red" inactiveColor="green">
     <view  slot="left">1</view>
     <view  slot="right">2</view>
 </ty-slider>
参数 说明 类型 默认值
value 当前进度值,在双滑块模式下为数组格式 number number/ [number, number]
max 最大值 number 100
min 最小值 number 0
step 步长 number 1
active-color 进度条激活态颜色 string #1989fa
inactive-color 进度条非激活态颜色 string #e5e5e5
range 是否开启双滑块模式 boolean false
reverse 是否将进度条反转 boolean false
disabled 是否禁用滑块 boolean false
readonly 是否为只读状态,只读状态下无法修改滑块的值 boolean false
vertical 是否垂直展示 boolean false
slot 插槽 wxml

Events

事件名 说明 回调参数
change 进度变化且结束拖动后触发 value: number

tyui-miniprogram's People

Contributors

jianatrm avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.