yc-vep-ui 0.2.7 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2155,24 +2155,24 @@ var Q = {
2155
2155
  //#endregion
2156
2156
  //#region src/hooks/useTable/common.ts
2157
2157
  function vn(e, n) {
2158
- let { defaultParams: r, ...i } = n, a = (e) => {
2159
- let { tableId: t, page: n, pageSize: r, sort: i, ...a } = JSON.parse(JSON.stringify(e || {}));
2160
- return {
2161
- tableId: t,
2162
- page: n || 1,
2163
- pageSize: r || 10,
2164
- params: {
2165
- ...a,
2166
- sort: i
2167
- }
2168
- };
2169
- }, o = pn(e, {
2158
+ let { defaultParams: r, ...i } = n, a = p(r) ? r : C(r || {}), o = pn(e, {
2170
2159
  ...i,
2171
2160
  ready: t(() => {
2172
- let e = p(n.ready) ? n.ready.value : n.ready, t = !!N(r)?.tableId;
2161
+ let e = p(n.ready) ? n.ready.value : n.ready, t = !!a.value?.tableId;
2173
2162
  return (e === void 0 || e) && t;
2174
2163
  }),
2175
- defaultParams: t(() => a(N(r))),
2164
+ defaultParams: t(() => {
2165
+ let { tableId: e, page: t, pageSize: n, sort: r, ...i } = N(a) || {};
2166
+ return {
2167
+ tableId: e,
2168
+ page: t || 1,
2169
+ pageSize: n || 10,
2170
+ params: {
2171
+ ...i,
2172
+ sort: r
2173
+ }
2174
+ };
2175
+ }),
2176
2176
  ignoreAttrs: [
2177
2177
  "tableName",
2178
2178
  "sort",
@@ -2180,42 +2180,38 @@ function vn(e, n) {
2180
2180
  ]
2181
2181
  });
2182
2182
  function s(e = {}) {
2183
- if (e) {
2184
- let e = N(r), t = e?.sort ? { sort: e.sort } : {};
2185
- Object.assign(e, {
2186
- ...t,
2187
- page: 1,
2188
- pageSize: 10
2189
- });
2190
- }
2183
+ Object.assign(a.value, e, {
2184
+ page: 1,
2185
+ pageSize: 10
2186
+ });
2191
2187
  }
2192
2188
  async function c(e) {
2193
- let t = N(r);
2189
+ let t = N(a);
2194
2190
  return Q.post("/common/insert", {
2195
2191
  params: { ...e },
2196
2192
  tableId: t?.tableId
2197
2193
  });
2198
2194
  }
2199
2195
  async function l(e) {
2200
- let t = N(r);
2196
+ let t = N(a);
2201
2197
  return Q.post("/common/update", {
2202
2198
  params: { ...e },
2203
2199
  tableId: t?.tableId
2204
2200
  });
2205
2201
  }
2206
2202
  async function u(e) {
2207
- let t = N(r);
2203
+ let t = N(a);
2208
2204
  return Q.post("/common/delete", {
2209
2205
  idList: e,
2210
2206
  tableId: t?.tableId
2211
2207
  });
2212
2208
  }
2213
- async function d(e, t) {
2214
- let { title: n = "export" } = e || {}, i = N(r), a = await Q.blob(t ?? "/common/exportExcel", {
2215
- tableId: i?.tableId,
2209
+ async function d(t) {
2210
+ let { title: n = "export" } = t || {}, r = N(a), i = await Q.blob(e ?? "/common/exportExcel", {
2211
+ tableId: r?.tableId,
2216
2212
  type: "all"
2217
- }), o = document.createElement("a");
2218
- o.href = window.URL.createObjectURL(a), o.download = `${n}.xlsx`, o.click(), G.Message.success("导出成功"), window.URL.revokeObjectURL(o.href);
2213
+ }), o = new Blob([i]), s = document.createElement("a");
2214
+ s.href = window.URL.createObjectURL(o), s.download = `${n}.xlsx`, s.click(), G.Message.success("导出成功"), window.URL.revokeObjectURL(s.href);
2219
2215
  }
2220
2216
  let f = S({
2221
2217
  loading: !1,
@@ -1,2 +1,2 @@
1
- import { a as e, o as t } from "../entry-WJeRIKtA.js";
1
+ import { a as e, o as t } from "../entry-cmL9f7De.js";
2
2
  export { t as useFetch, e as useTable };
@@ -1,3 +1,3 @@
1
1
  import { TableReturn, IExtra } from './type';
2
2
  import { FetchOptions } from '../useFetch';
3
- export declare function useTable<T = any>(url: string, options: FetchOptions<T> & IExtra): TableReturn<T>;
3
+ export declare function useTable<T>(url: string, options: FetchOptions<T> & IExtra): TableReturn<T>;
package/dist/vep-ui.js CHANGED
@@ -1,2 +1,2 @@
1
- import { _ as e, c as t, d as n, f as r, g as i, h as a, i as o, l as s, m as c, n as l, p as u, r as d, s as f, t as p, u as m } from "./entry-WJeRIKtA.js";
1
+ import { _ as e, c as t, d as n, f as r, g as i, h as a, i as o, l as s, m as c, n as l, p as u, r as d, s as f, t as p, u as m } from "./entry-cmL9f7De.js";
2
2
  export { e as UiCard, m as UiDescriptions, s as UiDialog, u as UiEditor, a as UiFilter, c as UiForm, n as UiInfiniteScroll, t as UiStaffSelect, i as UiTable, r as UiTree, f as UiUpload, d as default, d as ycPlugin, p as getHostVue, o as hooks, l as setHostVue };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yc-vep-ui",
3
- "version": "0.2.7",
3
+ "version": "0.3.0",
4
4
  "type": "module",
5
5
  "description": "基于 Vue 3 + Element Plus 的企业级 UI 组件库",
6
6
  "keywords": [