ifrontend-button
v1.0.2
Published
A Vue.js project
Downloads
5
Readme
ifrontend-button
自定义 button 组件
Install
安装方法
1、npm 安装
npm install ifrontend-button
2、yarn 安装
yarn add ifrontend-button
使用方法
<template>
<div id="app">
<h2>基本的</h2>
<ife-button @onClick="handlerClick">爱前端</ife-button>
<ife-button primary @onClick="handlerClick">爱前端</ife-button>
<ife-button secondary @onClick="handlerClick">爱前端</ife-button>
<br />
<h2>迷你的</h2>
<ife-button size="small" @onClick="handlerClick">爱前端</ife-button>
<ife-button size="small" primary @onClick="handlerClick">爱前端</ife-button>
<ife-button size="small" secondary @onClick="handlerClick">爱前端</ife-button>
<br />
<h2>粗鲁的</h2>
<ife-button size="large" @onClick="handlerClick">爱前端</ife-button>
<ife-button size="large" primary @onClick="handlerClick">爱前端</ife-button>
<ife-button size="large" secondary @onClick="handlerClick">爱前端</ife-button>
</div>
</template>
<script>
import Button from './components/Button.vue'
export default {
components: {
IfeButton: Button
},
methods: {
handlerClick() {
alert('click')
}
}
}
</script>
全局安装
import IfeButton from 'ifrontend-button'
Vue.use(IfeButton)