el-plus-powerful-table
Version:
## [DOCS](https://peng-xiao-shuai.github.io/vite-vue-admin-docs/zh-CN/component_directive/component/powerful-table-doc.html)
42 lines (41 loc) • 1.14 kB
JavaScript
import { defineComponent as n, createVNode as o, Fragment as p, mergeProps as i } from "vue";
import { ElLink as m } from "element-plus";
import { powerfulTableComponentProp as l, isProperty as f } from "../../powerful-table/src/powerful-table-data.mjs";
const t = /* @__PURE__ */ n({
name: "PTLink",
props: {
...l,
prop: {
type: Object,
default: () => ({})
}
},
emits: ["return-emit", "component-emit"],
setup(r) {
const e = r.prop.data;
return () => o(p, null, [o(m, i({
type: "primary",
underline: !1,
href: r.row[r.prop.prop],
style: (e == null ? void 0 : e.style) || {}
}, {
target: (e == null ? void 0 : e.target) || "_blank",
...f({
row: r.row,
index: r.index,
props: r.prop
}, e == null ? void 0 : e.property)
}), {
default: () => [typeof (e == null ? void 0 : e.text) == "function" ? e == null ? void 0 : e.text(r.row) : e == null ? void 0 : e.text]
})]);
}
});
t.install = (r) => {
r.component(t.name, t);
};
const y = t;
export {
y as PTLink,
t as default
};
//# sourceMappingURL=link.mjs.map