ideaz-element
Version:
<p align="center"> <a href="" target="_blank" rel="noopener noreferrer"> <img src="./docs/public/logo.svg" alt="Ideaz Element" width="180" style="width: 180px;" /> </a> </p>
60 lines (59 loc) • 1.76 kB
JavaScript
import { defineComponent as s, computed as d, createVNode as r } from "vue";
import "../../../hooks/index.mjs";
import "../../../utils/index.mjs";
import "../../../node_modules/.pnpm/lodash-unified@1.0.3_@types_lodash-es@4.17.12_lodash-es@4.17.21_lodash@4.17.21/node_modules/lodash-unified/import.mjs";
import { ElTableColumn as f } from "element-plus";
import "./hooks/index.mjs";
import n from "./RadioColumn.mjs";
import { tableColumnProps as b } from "./props.mjs";
import { useRadioColumnMethods as C } from "./hooks/useRadioColumnMethods.mjs";
import { useTableColumnSlots as g } from "./hooks/useTableColumnSlots.mjs";
import { useExpose as h } from "../../../hooks/useExpose.mjs";
import { isFunction as R } from "../../../utils/is.mjs";
import S from "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/omit.mjs";
const k = /* @__PURE__ */ s({
name: "ZTableColumn",
components: {
RadioColumn: n
},
props: b,
emits: ["radio-change", "update:data"],
setup(o, {
emit: e,
slots: l
}) {
const {
clearSelection: m,
toggleRadioSelection: a
} = C(), {
scopedSlots: i
} = g(o, l, e);
h({
clearSelection: m,
toggleRadioSelection: a
});
const u = d(() => R(o.column.label) ? {
align: "center",
...S(o.column, ["label"])
} : {
align: "center",
...o.column
});
return () => {
const {
column: t,
tableProps: c
} = o;
return t.type === "radio" ? r(n, {
ref: "radioColumn",
column: t,
tableProps: c,
"onRadio-change": (p) => e("radio-change", p)
}, null) : r(f, u.value, i.value);
};
}
});
export {
k as default
};
//# sourceMappingURL=TableColumn.mjs.map