Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.js 3.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. 'use strict';
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.checkVueVersion = checkVueVersion;
  6. var _vue = require('vue');
  7. var _vue2 = _interopRequireDefault(_vue);
  8. var _application = require('./mixins/application');
  9. var _application2 = _interopRequireDefault(_application);
  10. var _breakpoint = require('./mixins/breakpoint');
  11. var _breakpoint2 = _interopRequireDefault(_breakpoint);
  12. var _theme = require('./mixins/theme');
  13. var _theme2 = _interopRequireDefault(_theme);
  14. var _icons = require('./mixins/icons');
  15. var _icons2 = _interopRequireDefault(_icons);
  16. var _options = require('./mixins/options');
  17. var _options2 = _interopRequireDefault(_options);
  18. var _lang = require('./mixins/lang');
  19. var _lang2 = _interopRequireDefault(_lang);
  20. var _goTo = require('./goTo');
  21. var _goTo2 = _interopRequireDefault(_goTo);
  22. var _console = require('../../util/console');
  23. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  24. var Vuetify = {
  25. install: function install(Vue) {
  26. var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  27. if (this.installed) return;
  28. this.installed = true;
  29. if (_vue2.default !== Vue) {
  30. (0, _console.consoleError)('Multiple instances of Vue detected\nSee https://github.com/vuetifyjs/vuetify/issues/4068\n\nIf you\'re seeing "$attrs is readonly", it\'s caused by this');
  31. }
  32. checkVueVersion(Vue);
  33. var lang = (0, _lang2.default)(opts.lang);
  34. Vue.prototype.$vuetify = new Vue({
  35. mixins: [(0, _breakpoint2.default)(opts.breakpoint)],
  36. data: {
  37. application: _application2.default,
  38. dark: false,
  39. icons: (0, _icons2.default)(opts.iconfont, opts.icons),
  40. lang: lang,
  41. options: (0, _options2.default)(opts.options),
  42. rtl: opts.rtl,
  43. theme: (0, _theme2.default)(opts.theme)
  44. },
  45. methods: {
  46. goTo: _goTo2.default,
  47. t: lang.t.bind(lang)
  48. }
  49. });
  50. if (opts.directives) {
  51. for (var name in opts.directives) {
  52. Vue.directive(name, opts.directives[name]);
  53. }
  54. }
  55. (function registerComponents(components) {
  56. if (components) {
  57. for (var key in components) {
  58. var component = components[key];
  59. if (component && !registerComponents(component.$_vuetify_subcomponents)) {
  60. Vue.component(key, component);
  61. }
  62. }
  63. return true;
  64. }
  65. return false;
  66. })(opts.components);
  67. },
  68. version: '1.5.12'
  69. };
  70. // Utils
  71. function checkVueVersion(Vue, requiredVue) {
  72. var vueDep = requiredVue || '^2.5.18';
  73. var required = vueDep.split('.', 3).map(function (v) {
  74. return v.replace(/\D/g, '');
  75. }).map(Number);
  76. var actual = Vue.version.split('.', 3).map(function (n) {
  77. return parseInt(n, 10);
  78. });
  79. // Simple semver caret range comparison
  80. var passes = actual[0] === required[0] && ( // major matches
  81. actual[1] > required[1] || // minor is greater
  82. actual[1] === required[1] && actual[2] >= required[2] // or minor is eq and patch is >=
  83. );
  84. if (!passes) {
  85. (0, _console.consoleWarn)('Vuetify requires Vue version ' + vueDep);
  86. }
  87. }
  88. exports.default = Vuetify;
  89. //# sourceMappingURL=index.js.map