UNPKG

winbox-ui-next

Version:

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

46 lines (45 loc) 1.88 kB
import _sfc_main from "./preview-toolbar.vue_vue&type=script&lang.js"; import { resolveComponent, openBlock, createElementBlock, normalizeClass, Fragment, renderList, createBlock, withCtx, createElementVNode, createVNode } from "vue"; import _export_sfc from "../_virtual/plugin-vue_export-helper"; const _hoisted_1 = ["onClick"]; function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { const _component_RenderFunction = resolveComponent("RenderFunction"); const _component_Tooltip = resolveComponent("Tooltip"); return openBlock(), createElementBlock("div", { class: normalizeClass(_ctx.prefixCls) }, [ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.resultActions, (action) => { return openBlock(), createBlock(_component_Tooltip, { key: action.key, class: normalizeClass(`${_ctx.prefixCls}-tooltip`), content: action.name }, { default: withCtx(() => [ createElementVNode("div", { class: normalizeClass([ `${_ctx.prefixCls}-action`, { [`${_ctx.prefixCls}-action-disabled`]: action.disabled } ]), onClick: action.onClick, onMousedown: _cache[0] || (_cache[0] = (e) => { e.preventDefault(); }) }, [ createElementVNode("span", { class: normalizeClass(`${_ctx.prefixCls}-action-content`) }, [ createVNode(_component_RenderFunction, { "render-func": action.content }, null, 8, ["render-func"]) ], 2) ], 42, _hoisted_1) ]), _: 2 }, 1032, ["class", "content"]); }), 128)) ], 2); } var PreviewToolbar = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]); export { PreviewToolbar as default };