vue: V2.5.11
此篇尽量详细,清楚的讲解vue插件的开发到npm的发布,想想将你自己做的东西展示给广大“网民”,心里还是有点小激动的...…^_^
下面我们就来说说详细做法:
1. 初始化项目
rush:js;">
vue init webpack-simple vue-pay-keyboard
使用vue创建一个简单的项目,删除src中除了main.js和app.vue外的文件,清空app.vue中无用内容
整理完后项目目录
2.编写插件
vue-pay-pop (源码大家可到github中自行获取)
rush:js;">
Box">
Box="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1904" xmlns:xlink="http://www.w3.org/1999/xlink" width="18" height="18" class="icon">
ottom">
ottom pay-key-blank">
ottom pay-key-middle" @click="val2input('0')">0
ottom pay-key-del" @click="delVal" v-html="del">