pear.js 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. window.rootPath = (function (src) {
  2. src = document.scripts[document.scripts.length - 1].src;
  3. return src.substring(0, src.lastIndexOf("/") + 1);
  4. })();
  5. layui.config({
  6. base: rootPath + "module/",
  7. version: "3.8.9"
  8. }).extend({
  9. request: "request",
  10. admin: "admin",
  11. menu: "menu",
  12. frame: "frame",
  13. tab: "tab",
  14. card: "card",
  15. convert: "convert",
  16. echarts: "echarts",
  17. echartsTheme: "echartsTheme",
  18. hash: "hash",
  19. document: "document",
  20. select: "select",
  21. drawer: "drawer",
  22. notice: "notice",
  23. step: "step",
  24. tag: "tag",
  25. popup: "popup",
  26. iconPicker: "iconPicker",
  27. treetable: "treetable",
  28. dtree: "dtree",
  29. area: "area",
  30. count: "count",
  31. topBar: "topBar",
  32. button: "button",
  33. design: "design",
  34. common: "common",
  35. eleTree: "eleTree",
  36. dictionary: 'dictionary',
  37. json: 'json',
  38. cropper: "cropper",
  39. yaml: "yaml",
  40. theme: "theme",
  41. message: "message",
  42. toast: "toast"
  43. }).use(['layer', 'theme'], function () {
  44. layui.theme.changeTheme(window, false);
  45. });