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>

27 lines (26 loc) 1.11 kB
import "../../../../utils/index.mjs"; import "../utils/index.mjs"; import { useEditableColumns as v } from "./useEditableColumns.mjs"; import { shallowRef as u, ref as d, watch as b, computed as n } from "vue"; import { getCheckData as p } from "../utils/getCheckedData.mjs"; import { getIsReturnToolBar as C } from "../utils/getIsReturnToolBar.mjs"; import { isFunction as T } from "../../../../utils/is.mjs"; function O(t, m, i) { const r = u([]), l = u([]), a = d((/* @__PURE__ */ new Date()).valueOf()), { columns: o, zTableFormRef: s } = v(t, m, i); b(() => o.value, () => { r.value = p(t.toolBar, o.value), l.value = o.value.filter((e) => C(e, t.toolBar)); }, { immediate: !0, deep: !0 }); const f = n(() => (a.value = (/* @__PURE__ */ new Date()).valueOf(), r.value.filter((e) => T(e.hide) ? !e.hide() : !e.hide))), c = n(() => o.value.map((e) => e)); return { formatTableCols: f, middleTableCols: r, originFormatTableCols: c, sortTableCols: l, tableKey: a, zTableFormRef: s }; } export { O as useTableColumns }; //# sourceMappingURL=useTableColumns.mjs.map