UNPKG

winbox-ui-next

Version:

We Design Vue 2.0: A Vue.js 3 UI Library

53 lines (52 loc) 1.73 kB
"use strict"; var vue = require("vue"); var globalConfig = require("../_utils/global-config.js"); var index = require("../icon/icon-empty/index.js"); var index$1 = require("../locale/index.js"); var pluginVue_exportHelper = require("../_virtual/plugin-vue_export-helper"); const _sfc_main = vue.defineComponent({ name: "Empty", components: { IconEmpty: index }, props: { description: String, image: String }, setup() { const prefixCls = globalConfig.getPrefixCls("empty"); const { t } = index$1.useI18n(); return { prefixCls, t }; } }); const _hoisted_1 = ["src", "alt"]; function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { const _component_icon_empty = vue.resolveComponent("icon-empty"); return vue.openBlock(), vue.createElementBlock("div", { class: vue.normalizeClass(_ctx.prefixCls) }, [ vue.createElementVNode("div", { class: vue.normalizeClass(`${_ctx.prefixCls}-image`) }, [ vue.renderSlot(_ctx.$slots, "image", {}, () => [ _ctx.image ? (vue.openBlock(), vue.createElementBlock("img", { key: 0, src: _ctx.image, alt: _ctx.description || "empty" }, null, 8, _hoisted_1)) : (vue.openBlock(), vue.createBlock(_component_icon_empty, { key: 1 })) ]) ], 2), vue.createElementVNode("div", { class: vue.normalizeClass(`${_ctx.prefixCls}-description`) }, [ vue.renderSlot(_ctx.$slots, "default", {}, () => [ vue.createTextVNode(vue.toDisplayString(_ctx.description || _ctx.t("empty.description")), 1) ]) ], 2) ], 2); } var _Empty = /* @__PURE__ */ pluginVue_exportHelper(_sfc_main, [["render", _sfc_render]]); module.exports = _Empty;