v-tables-3
Version:
Vue.js 3 grid components
23 lines (16 loc) • 744 B
JavaScript
;
var _ucfirst = _interopRequireDefault(require("../helpers/ucfirst"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
module.exports = function (value, h) {
if (typeof value !== 'string') return '';
if (typeof this.$parent.$slots["h__".concat(value)] !== 'undefined') {
return this.$parent.$slots["h__".concat(value)];
}
var derivedHeading = (0, _ucfirst["default"])(value.split("_").join(" "));
if (!this.opts.headings.hasOwnProperty(value)) return derivedHeading;
if (typeof this.opts.headings[value] === 'function') {
if (h) return this.opts.headings[value].call(this.$parent, h);
return derivedHeading;
}
return this.opts.headings[value];
};