@qin-ui/antd-vue-pro 1.1.0 → 1.1.1

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.
@@ -15987,20 +15987,26 @@ const useFormData = (initFormData) => {
15987
15987
  return void 0;
15988
15988
  return get$1(formData.value, path);
15989
15989
  };
15990
- const setFormData = (path, value) => {
15991
- let newValue = value;
15990
+ const setFormData = (...args) => {
15991
+ let path;
15992
+ let value;
15993
+ if (args.length === 2) {
15994
+ [path, value] = args;
15995
+ } else {
15996
+ [value] = args;
15997
+ }
15992
15998
  if (path) {
15993
15999
  if (typeof value === "function") {
15994
16000
  const preValue = getFormData(path);
15995
- newValue = value(preValue);
16001
+ value = value(preValue);
15996
16002
  }
15997
- set$1(formData.value, path, newValue);
16003
+ set$1(formData.value, path, value);
15998
16004
  } else {
15999
16005
  if (typeof value === "function") {
16000
16006
  const preValue = formData.value;
16001
- newValue = value(preValue);
16007
+ value = value(preValue);
16002
16008
  }
16003
- formData.value = newValue;
16009
+ formData.value = value;
16004
16010
  }
16005
16011
  };
16006
16012
  return { formData, getFormData, setFormData, activePath, setActivePath };
package/es/form/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { l, B, d, i, C, b, f, F, k, R, e, j, U, h, _, m, p, n, s, q, u, r, t } from "./index-f7d9290e.js";
1
+ import { l, B, d, i, C, b, f, F, k, R, e, j, U, h, _, m, p, n, s, q, u, r, t } from "./index-1e0c8f68.js";
2
2
  import "vue";
3
3
  import "ant-design-vue";
4
4
  import "../component-provider/index.js";
package/es/index.d.ts CHANGED
@@ -6011,7 +6011,10 @@ export declare type SetActivePath = (path: string | undefined) => void;
6011
6011
 
6012
6012
  export declare type SetField = (path: string | undefined, field: Field | ((preField: ReturnType<GetField>) => Field), updateType?: 'rewrite' | 'merge') => void;
6013
6013
 
6014
- export declare type SetFormData = (path: string | undefined, value: any | ((preValue: DeepReadonly<any>) => any)) => void;
6014
+ export declare type SetFormData = {
6015
+ (path: string, value: any | ((preValue: DeepReadonly<any>) => any)): void;
6016
+ (value: any | ((preValue: DeepReadonly<any>) => any)): void;
6017
+ };
6015
6018
 
6016
6019
  declare type SFCWithInstall<T> = T & Plugin_2;
6017
6020
 
package/es/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import "./style.css";
2
- import { _ as _sfc_main } from "./form/index-f7d9290e.js";
3
- import { l, B, d, i, C, b, f, F, k, R, e, j, U, h, m, p, n, s, q, u, r, t } from "./form/index-f7d9290e.js";
2
+ import { _ as _sfc_main } from "./form/index-1e0c8f68.js";
3
+ import { l, B, d, i, C, b, f, F, k, R, e, j, U, h, m, p, n, s, q, u, r, t } from "./form/index-1e0c8f68.js";
4
4
  import BaseTable from "./table/index.js";
5
5
  import { useTable } from "./table/index.js";
6
6
  import _sfc_main$1 from "./component-provider/index.js";
package/es/style.css CHANGED
@@ -41,11 +41,11 @@
41
41
  padding: 24px 24px 16px;
42
42
  background-color: #fff;
43
43
  }
44
- .pro-table[data-v-892661df] {
44
+ .pro-table[data-v-7e684411] {
45
45
  display: flex;
46
46
  flex-direction: column;
47
47
  min-width: 800px;
48
48
  }
49
- .pro-table[data-v-892661df] .ant-pagination .ant-pagination-total-text {
49
+ .pro-table[data-v-7e684411] .ant-pagination .ant-pagination-total-text {
50
50
  flex: 1;
51
51
  }
package/es/table/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { createVNode, defineComponent, ref, onMounted, openBlock, createElementBlock, unref, normalizeStyle, createElementVNode, withCtx, createTextVNode, createBlock, toDisplayString, createCommentVNode, mergeModels, useModel, computed, watch, Fragment, renderList, withModifiers, renderSlot, useAttrs, useSlots, mergeProps, createSlots, normalizeProps, guardReactiveProps, nextTick } from "vue";
2
2
  import { Button, Space, Dropdown, Menu, MenuItem, Checkbox, MenuDivider, Table } from "ant-design-vue";
3
3
  import { useInjectProps, INJECT_KEYS } from "../component-provider/index.js";
4
- import { A as AntdIcon, _ as _sfc_main$6, g as get, a as _export_sfc, o as omit, b as _sfc_main$7, c as cloneDeep, u as useForm } from "../form/index-f7d9290e.js";
4
+ import { A as AntdIcon, _ as _sfc_main$6, g as get, a as _export_sfc, o as omit, b as _sfc_main$7, c as cloneDeep, u as useForm } from "../form/index-1e0c8f68.js";
5
5
  var ColumnHeightOutlined$2 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M840 836H184c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h656c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm0-724H184c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h656c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zM610.8 378c6 0 9.4-7 5.7-11.7L515.7 238.7a7.14 7.14 0 00-11.3 0L403.6 366.3a7.23 7.23 0 005.7 11.7H476v268h-62.8c-6 0-9.4 7-5.7 11.7l100.8 127.5c2.9 3.7 8.5 3.7 11.3 0l100.8-127.5c3.7-4.7.4-11.7-5.7-11.7H548V378h62.8z" } }] }, "name": "column-height", "theme": "outlined" };
6
6
  const ColumnHeightOutlinedSvg = ColumnHeightOutlined$2;
7
7
  function _objectSpread$2(target) {
@@ -474,7 +474,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
474
474
  ...unref(pagination),
475
475
  ...unref(((_e = cache.get()) == null ? void 0 : _e.pagination) ?? {})
476
476
  });
477
- setSearchParam(void 0, {
477
+ setSearchParam({
478
478
  ...unref(searchParam),
479
479
  ...unref(((_f = cache.get()) == null ? void 0 : _f.searchParam) ?? {})
480
480
  });
@@ -604,8 +604,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
604
604
  };
605
605
  }
606
606
  });
607
- const Table_vue_vue_type_style_index_0_scoped_892661df_lang = "";
608
- const BaseTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-892661df"]]);
607
+ const Table_vue_vue_type_style_index_0_scoped_7e684411_lang = "";
608
+ const BaseTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7e684411"]]);
609
609
  const getDefaultPagination = () => ({ current: 1, pageSize: 10, total: 0 });
610
610
  const useTable = ({
611
611
  columns: initColumns = [],
@@ -651,7 +651,7 @@ const useTable = ({
651
651
  const setSearchField = setField;
652
652
  const resetQueryParams = () => {
653
653
  setPagination(getDefaultPagination());
654
- setSearchParam(void 0, cloneDeep(_initSearchParam));
654
+ setSearchParam(cloneDeep(_initSearchParam));
655
655
  };
656
656
  return {
657
657
  columns,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qin-ui/antd-vue-pro",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "二次封装antd vue组件",
5
5
  "type": "module",
6
6
  "main": "",