index.js 460 B

12345678910111213141516171819202122232425262728
  1. import Storage from "./utils/storage";
  2. import Emitter from "./mixins/emitter";
  3. import { deepMerge } from "./utils";
  4. import "./common";
  5. const install = (Vue, options = {}) => {
  6. // 默认配置数据
  7. let data = {
  8. // 首页页面路径
  9. homePage: "/",
  10. };
  11. let $cl = {
  12. ...deepMerge(data, options),
  13. Storage,
  14. author: "cool",
  15. version: "1.8.16",
  16. };
  17. Vue.prototype.$cl = uni.$cl = $cl;
  18. };
  19. export { Emitter, Storage };
  20. export default {
  21. install,
  22. };