UNPKG

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>

24 lines (23 loc) 694 B
import "../utils/index.mjs"; import { useAttrs as l, computed as r } from "vue"; import { toCamelCase as i } from "../utils/string.mjs"; function a(t) { const s = l(), e = r(() => { const n = {}; return t.evts && Object.keys(t.evts).forEach((o) => { n[`on${i(o)}`] = (...c) => { const u = { ...t.scope, row: o === "input" || o === "clear" ? { ...t.scope.row, [t.column.prop]: c[0] || "" } : t.scope.row }; (t.evts[o] || function() { })(u, ...c); }; }), n; }); return { attrsAll: r(() => ({ ...t, ...s })), onAll: e }; } export { a as useFormComponentAttrs }; //# sourceMappingURL=useFormComponentAttrs.mjs.map