1
0
mirror of https://github.com/sahadev/vue-component-creater-ui.git synced 2025-06-07 05:38:30 +08:00
2021-04-11 22:33:19 +08:00

11 lines
445 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import Main from "./src/components-v2/Main";
// 这一步判断window.Vue是否存在因为直接引用vue.min.js 它会把Vue绑到Window上我们直接引用打包好的js才能正常跑起来。
if (typeof window !== "undefined" && window.Vue) {
window.Vue.component(Main.name, Main);
}
//这样就可以使用Vue.use进行全局安装了。
Main.install = function(Vue) {
Vue.component(Main.name, Main);
};
export default Main;