UNPKG

vxe-table-pro

Version:

Vue table plugins based on vxe-table

74 lines (73 loc) 2.16 kB
import { defineComponent as m, mergeModels as f, useModel as v, ref as _, resolveComponent as i, resolveDirective as y, createElementBlock as k, openBlock as c, createVNode as t, withCtx as o, createTextVNode as x, toDisplayString as C, Transition as V, withDirectives as M, createCommentVNode as D, createBlock as g, unref as w } from "vue"; import { DocumentCopy as B } from "@element-plus/icons-vue"; import { _ as N } from "./index-B8MbCfO1.mjs"; const S = /* @__PURE__ */ m({ __name: "index", props: /* @__PURE__ */ f({ type: { type: String, default: "primary" }, onClick: { type: Function, default: () => { } } }, { modelValue: { default: "" }, modelModifiers: {} }), emits: ["update:modelValue"], setup(n) { const l = v(n, "modelValue"), a = _(!1); return (T, e) => { const r = i("el-link"), s = i("el-tooltip"), u = i("el-icon"), d = y("copy"); return c(), k("div", { class: "copy-text-container", onMouseenter: e[0] || (e[0] = (p) => a.value = !0), onMouseleave: e[1] || (e[1] = (p) => a.value = !1) }, [ t(s, { content: l.value, placement: "top", "show-after": 200, "hide-after": 200 }, { default: o(() => [ t(r, { type: n.type, underline: !1, class: "text-content", onClick: n.onClick }, { default: o(() => [ x(C(l.value), 1) ]), _: 1 }, 8, ["type", "onClick"]) ]), _: 1 }, 8, ["content"]), t(V, { name: "el-fade-in" }, { default: o(() => [ a.value ? M((c(), g(u, { key: 0, class: "copy-icon" }, { default: o(() => [ t(w(B)) ]), _: 1 })), [ [d, l.value] ]) : D("", !0) ]), _: 1 }) ], 32); }; } }), F = /* @__PURE__ */ N(S, [["__scopeId", "data-v-faa55a1e"]]); export { F as default };