UNPKG

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)

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