UNPKG

@aplus-frontend/ui

Version:

26 lines (25 loc) 610 B
import { unref as a } from "vue"; import { isNoValue as i } from "../utils.mjs"; const l = { get(r) { let e, t, o = []; const n = r.props?.rowKey || "key", s = r.component?.exposed; return s && (e = s.getSearchFormValues(), o = a(s.rowSelection?.selectedRows).map( (c) => c[n] ), t = s.getPaging()), { selectedKeys: o, data: e, pagination: t }; }, set(r, { data: e, pagination: t }) { const o = r.component?.exposed; if (o) { if (i(e)) return; e && o.setSearchFormValues(e), t && o.setPaging(t, !1); } } }; export { l as default };