function Vue(options) {
if (!(this instanceof Vue)) {
//防止把Vue当坐函数调用
throw new Error('请使用new Vue');
}
this.options = options;
}
Vue.prototype.show = function () {
console.log('调用了一个show', this.options);
}
let vue = new Vue({ msg: '我是一个构造函数' });
vue.show();