import InputDialog from 'moschat-inputdialog'
Vue.use(InputDialog)
/**
* 带一个输入框弹窗
* @param options {string|object}
* options.title {string} 标题
* -options.defaultValue {string} 输入框默认值
* -options.subTitle {string} 输入提示在输入框上面
* -options.placeholder {string} 输入提示在输入框里面
* -options.remind {string} 输入备忘在输入框下面
* -options.confirmText {string} 确认按钮文字
* -options.width {number} 弹窗宽度
* -options.height {number} 弹窗高度
* -options.inputType {string} 输入类型all没限制number只能输入数字pwd英文和字母
* -options.ispassword {number} 1是密码*号线上输入内容 0不是密码
* -options.maxlength {number} 最大可输入内容 默认20
* -options.callback {function} 确认回调函数
* -options.cancelfun {function} 取消回调函数
* @returns *
*/
this.$inputDialog({
inputType: 'all',
callback: (cbvalue) => {
console.log('cbvalue', cbvalue)
}
})
moschat-inputdialog
A Vue.js project
Build Setup
# install dependenciesnpm install# serve with hot reload at localhost:8080npm run dev# build for production with minificationnpm run build# build for production and view the bundle analyzer reportnpm run build --report# run unit testsnpm run unit# run e2e testsnpm run e2e# run all testsnpm test
For a detailed explanation on how things work, check out the guide and docs for vue-loader.