vaneditor
Version:
``` 移动端ui框架统一用uView,css扩展语言用scss,全局数据管理vuex,统一样式主体风格颜色定义/src/uni.scss ```
32 lines (30 loc) • 727 B
JavaScript
// 导入所有组件
const publicComponents = [
"van-beauty",
"van-one-pic",
"van-scenic",
"van-two-pic",
"van-two-slide",
"van-three-slide",
"lime-painter"
];
const components = publicComponents.map(t => {
var str = require("./" + t + "/index.js");
return str.default;
});
const install = function(vue) {
/* istanbul ignore if */
if (install.installed) return;
/*eslint-disable*/
components.map((component) => {
vue.component(component.name, component); //component.name 此处使用到组件vue文件中的 name 属性
});
};
/* istanbul ignore if */
if (typeof window !== 'undefined' && window.Vue) {
install(window.Vue);
};
export default {
install,
...publicComponents
}