UNPKG

primevue

Version:

PrimeVue is an open source UI library for Vue featuring a rich set of 80+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with PrimeBloc

54 lines (48 loc) 1.83 kB
this.primevue = this.primevue || {}; this.primevue.baseicon = (function (BaseComponent, BaseIconStyle, utils) { 'use strict'; function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent); var BaseIconStyle__default = /*#__PURE__*/_interopDefaultLegacy(BaseIconStyle); var script = { name: 'BaseIcon', "extends": BaseComponent__default["default"], props: { label: { type: String, "default": undefined }, spin: { type: Boolean, "default": false } }, style: BaseIconStyle__default["default"], beforeMount: function beforeMount() { var _this$$config; BaseIconStyle__default["default"].loadStyle({ nonce: (_this$$config = this.$config) === null || _this$$config === void 0 || (_this$$config = _this$$config.csp) === null || _this$$config === void 0 ? void 0 : _this$$config.nonce }); }, methods: { pti: function pti() { var isLabelEmpty = utils.ObjectUtils.isEmpty(this.label); return { "class": ['p-icon', { 'p-icon-spin': this.spin }], role: !isLabelEmpty ? 'img' : undefined, 'aria-label': !isLabelEmpty ? this.label : undefined, 'aria-hidden': isLabelEmpty }; } }, computed: { $config: function $config() { var _this$$primevue; return (_this$$primevue = this.$primevue) === null || _this$$primevue === void 0 ? void 0 : _this$$primevue.config; } } }; return script; })(primevue.basecomponent, primevue.baseicon.style, primevue.utils);