UNPKG

vue-service-model

Version:

Vue.js library for handling REST service requests with caching, aggregation and model definitions

26 lines (25 loc) 804 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = require("tslib"); var vue_1 = tslib_1.__importDefault(require("vue")); /** * Mixin to add render of loading with loading slot */ exports.default = vue_1.default.extend({ methods: { renderDefaultLoading: function (h) { return undefined; }, renderLoading: function (h) { if (this.$slots && this.$slots.loading) { return h('div', this.$slots.loading); } else if (this.$scopedSlots && this.$scopedSlots.loading) { return h('div', this.$scopedSlots.loading({})); } else { return this.renderDefaultLoading(h); } } } });