index.js 919 B

123456789101112131415161718192021222324252627
  1. import hasRole from "./permission/hasRole";
  2. import hasPermi from "./permission/hasPermi";
  3. import dialogDrag from "./dialog/drag";
  4. import dialogDragWidth from "./dialog/dragWidth";
  5. import dialogDragHeight from "./dialog/dragHeight";
  6. import throttle from "./common/throttle";
  7. import int from "./common/int";
  8. import { formatPrice } from "./filter/index";
  9. console.log(formatPrice, "formatPrice");
  10. const install = function (Vue) {
  11. Vue.directive("hasRole", hasRole);
  12. Vue.directive("hasPermi", hasPermi);
  13. Vue.directive("dialogDrag", dialogDrag);
  14. Vue.directive("dialogDragWidth", dialogDragWidth);
  15. Vue.directive("dialogDragHeight", dialogDragHeight);
  16. Vue.directive("throttle", throttle);
  17. Vue.directive("int", int);
  18. Vue.filter("formatPrice", formatPrice);
  19. };
  20. if (window.Vue) {
  21. window["hasRole"] = hasRole;
  22. window["hasPermi"] = hasPermi;
  23. Vue.use(install); // eslint-disable-line
  24. }
  25. export default install;