0.2.6 • Published 4 years ago

hb-switch v0.2.6

Weekly downloads
45
License
-
Repository
-
Last release
4 years ago

hb-switch

Project setup

npm install hb-switch -S

在 main.js 文件中引入插件并注册

import Switch from 'hb-switch'
Vue.use(Switch)

在项目中使用 hb-switch

<template>
  <hb-switch :title="('默认 false')"></hb-switch>
</template>
<script>
  export default {
    data () {
      return {
        textHtml: '<span style="color:red">我是红色</span>'
      }
    },
    methods: {
        onClick (newVal, oldVal) {
          console.log(newVal, oldVal)
        }
      }
  }
</script>

特点

简单易用,UI在原插件基础上优化增加了圆角和过渡动画
提供以 npm 的形式安装提供全局组件

选项

你可以通过在所在的元素上设置以下属性来配置hb-switch
textHtml:配置颜色,如<span style="color:red">我是红色</span>
disabled:禁用状态,如disabled

事件

@click="onClick"点击事件
<hb-switch disabled :title="textHtml" @click="onclick"></hb-switch>
0.2.6

4 years ago

0.2.5

4 years ago

0.2.4

4 years ago

0.2.3

4 years ago

0.2.1

4 years ago

0.2.2

4 years ago

0.2.0

4 years ago

0.1.9

4 years ago

0.1.8

4 years ago

0.1.7

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago