zhu_component

1.0.2 • Public • Published

一个例子

做的第一个上传npm的包,做一个记录

使用方法

安装
npm install zhu_component

引入
import switchButton from 'zhu_component'

使用
<switchButton></switchButton>

参数
wrapper_width:Number 宽度
initial_state:Boolean 是否打开
toggleBtn: 开关事件
handleCLick(val){
    console.log(val);
    this.btnState = val[0];
}

如何将一个包上传至npm

这里只写组件开发完成之后的步骤


simplec

A Vue.js project

Build Setup

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build

# build for production and view the bundle analyzer report
npm run build --report

For a detailed explanation on how things work, check out the guide and docs for vue-loader.

Readme

Keywords

none

Package Sidebar

Install

npm i zhu_component

Weekly Downloads

1

Version

1.0.2

License

none

Unpacked Size

810 kB

Total Files

34

Last publish

Collaborators

  • lebaba