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)
71 lines (70 loc) • 1.78 kB
JavaScript
import { defineComponent as u, inject as c, createVNode as l, Fragment as s, mergeProps as f } from "vue";
import { ElInput as w } from "element-plus";
import { powerfulTableComponentProp as y, useREmit as d, isProperty as b } from "../../powerful-table/src/powerful-table-data.mjs";
import { SizeSymbol as x } from "../../keys.mjs";
const p = /* @__PURE__ */ u({
name: "PTInput",
props: {
...y,
prop: {
type: Object,
default: () => ({})
}
},
emits: ["return-emit", "component-emit"],
setup(o, {
emit: m
}) {
const n = o.prop.data, i = c(x), {
REmit: t,
event: r
} = d(m, "input", {
row: o.row,
index: o.index,
props: o.prop
});
return () => l(s, null, [l(w, f({
style: (n == null ? void 0 : n.style) || {},
size: i,
modelValue: o.row[o.prop.prop],
"onUpdate:modelValue": (e) => o.row[o.prop.prop] = e,
onBlur: (...e) => {
t("blur", ...e), r("blur", ...e);
},
onFocus: (...e) => {
t("focus", ...e), r("focus", ...e);
},
onChange: (...e) => {
t("change", ...e), r("change", ...e);
},
onInput: (...e) => {
t("input", ...e), r("input", ...e);
},
onClear: (...e) => {
t("clear", ...e), r("clear", ...e);
}
}, {
rows: 3,
...b({
row: o.row,
index: o.index,
props: o.prop
}, n == null ? void 0 : n.property)
}), {
[n == null ? void 0 : n.slot]: () => l("span", {
style: {
padding: "0 10px"
}
}, [n == null ? void 0 : n.symbol])
})]);
}
});
p.install = (o) => {
o.component(p.name, p);
};
const h = p;
export {
h as PTInput,
p as default
};
//# sourceMappingURL=input.mjs.map