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)
46 lines (45 loc) • 1.22 kB
JavaScript
import { defineComponent as o, createVNode as n, Fragment as i, mergeProps as p } from "vue";
import { ElLink as m } from "element-plus";
import { powerfulTableComponentProp as l, isData as f, isProperty as u } from "../../powerful-table/src/powerful-table-data.mjs";
const t = /* @__PURE__ */ o({
name: "PTLink",
props: {
...l,
prop: {
type: Object,
default: () => ({})
}
},
emits: ["return-emit", "component-emit"],
setup(r) {
const e = f({
row: r.row,
index: r.index,
props: r.prop
}, r.prop.data);
return () => n(i, null, [n(m, p({
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",
...u({
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 s = t;
export {
s as PTLink,
t as default
};
//# sourceMappingURL=link.mjs.map