UNPKG

yanzhen-design-vue

Version:

57 lines (56 loc) 2.07 kB
import { defineComponent, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, createBlock, withCtx, createTextVNode, toDisplayString, createCommentVNode } from "vue"; import { Tooltip } from "ant-design-vue"; import { findDataName, findDataProps, findDataEmits, findDataOptions } from "./findData.mjs"; const _hoisted_1 = { key: 0, class: "search-relation" }; const _hoisted_2 = { class: "search-relation-text" }; const _hoisted_3 = { key: 1, class: "search-relation-text" }; const _sfc_main = /* @__PURE__ */ defineComponent({ ...{ name: findDataName }, __name: "findData", props: findDataProps, emits: findDataEmits, setup(__props, { emit: __emit }) { const { ns } = findDataOptions; const props = __props; const emit = __emit; const handleClick = (e) => { emit("click", e); }; return (_ctx, _cache) => { return openBlock(), createElementBlock("div", { class: normalizeClass([unref(ns).b()]) }, [ _ctx.type === "relation" && _ctx.searchText ? (openBlock(), createElementBlock("span", _hoisted_1, [ createElementVNode("img", { class: "cl-data", draggable: "false", src: "https://pagoda-p-file-1301506715.cos.ap-guangzhou.myqcloud.com/freshgood-project/old-assets/img/icon_20px/icon_ClData18.svg", alt: "", onClick: handleClick }), props.showToolTips ? (openBlock(), createBlock(unref(Tooltip), { key: 0, "overlay-class-name": "cltext-search-tooltip" }, { title: withCtx(() => [ createTextVNode(toDisplayString(_ctx.searchText), 1) ]), default: withCtx(() => [ createElementVNode("span", _hoisted_2, toDisplayString(props.searchText), 1) ]), _: 1 })) : (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(props.searchText), 1)) ])) : createCommentVNode("", true) ], 2); }; } }); export { _sfc_main as default };