@qin-ui/antd-vue-pro 1.0.32 → 1.0.34

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.
package/LICENSE ADDED
@@ -0,0 +1,9 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023-present pro-components
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, provide, renderSlot } from "vue";
2
2
  import "ant-design-vue";
3
- import { I as INJECT_COMPONENT_PROPS_KEYS } from "../form/index-a8c9e629.js";
3
+ import { I as INJECT_COMPONENT_PROPS_KEYS } from "../form/index-e89e1742.js";
4
4
  import { PRO_TABLE_INJECT_COMPONENT_PROPS_KEYS } from "../table/index.js";
5
5
  const _sfc_main = /* @__PURE__ */ defineComponent({
6
6
  __name: "index",
@@ -15958,16 +15958,17 @@ const useFields = (initFields) => {
15958
15958
  return void 0;
15959
15959
  return (_a = fieldMap.value[path]) == null ? void 0 : _a.fieldPath;
15960
15960
  };
15961
- const setField = (path, field) => {
15961
+ const setField = (path, field, updateType = "merge") => {
15962
15962
  const fieldPath = getFieldPath(path);
15963
15963
  if (!fieldPath)
15964
15964
  return;
15965
15965
  let value = field;
15966
+ const preField = getField(path);
15966
15967
  if (typeof field === "function") {
15967
- const preField = getField(path);
15968
15968
  value = field(preField);
15969
15969
  }
15970
- set$1(fields.value, fieldPath, value);
15970
+ const newField = updateType === "rewrite" ? value : { ...preField, ...value };
15971
+ set$1(fields.value, fieldPath, newField);
15971
15972
  };
15972
15973
  function findFieldIndex(path) {
15973
15974
  var _a;
package/es/form/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { k, B, d, h, C, b, f, F, j, l, I, R, e, i, U, g, _, m, p, n, s, q, u, r, t } from "./index-a8c9e629.js";
1
+ import { k, B, d, h, C, b, f, F, j, l, I, R, e, i, U, g, _, m, p, n, s, q, u, r, t } from "./index-e89e1742.js";
2
2
  import "vue";
3
3
  import "ant-design-vue";
4
4
  export {
package/es/index.d.ts CHANGED
@@ -683,14 +683,14 @@ declare const _default_3: <D extends Record<string, any>>(__VLS_props: {
683
683
  footer?: PanelRender<any> | undefined;
684
684
  tableLayout?: TableLayout | undefined;
685
685
  columns?: ColumnsType<any> | undefined;
686
- sortDirections?: SortOrder[] | undefined;
687
- showSorterTooltip?: boolean | undefined;
688
686
  scroll?: ({
689
687
  x?: string | number | true | undefined;
690
688
  y?: string | number | undefined;
691
689
  } & {
692
690
  scrollToFirstRowOnChange?: boolean | undefined;
693
691
  }) | undefined;
692
+ sortDirections?: SortOrder[] | undefined;
693
+ showSorterTooltip?: boolean | undefined;
694
694
  rowClassName?: string | RowClassName<any> | undefined;
695
695
  showHeader?: boolean | undefined;
696
696
  customRow?: GetComponentProps<any> | undefined;
@@ -718,6 +718,7 @@ declare const _default_3: <D extends Record<string, any>>(__VLS_props: {
718
718
  controlContainer?: ContainerComponent | any;
719
719
  tableContainer?: ContainerComponent | any;
720
720
  paramCache?: ParamCache | undefined;
721
+ immediateSearch?: boolean | undefined;
721
722
  onResizeColumn?: ((w: number, col: ColumnType_2<any>) => void) | undefined;
722
723
  rowSelection?: TableRowSelection<any> | undefined;
723
724
  } & VNodeProps & AllowedComponentProps & ComponentCustomProps, __VLS_ctx?: {
@@ -1125,14 +1126,14 @@ declare const _default_3: <D extends Record<string, any>>(__VLS_props: {
1125
1126
  footer?: PanelRender<any> | undefined;
1126
1127
  tableLayout?: TableLayout | undefined;
1127
1128
  columns?: ColumnsType<any> | undefined;
1128
- sortDirections?: SortOrder[] | undefined;
1129
- showSorterTooltip?: boolean | undefined;
1130
1129
  scroll?: ({
1131
1130
  x?: string | number | true | undefined;
1132
1131
  y?: string | number | undefined;
1133
1132
  } & {
1134
1133
  scrollToFirstRowOnChange?: boolean | undefined;
1135
1134
  }) | undefined;
1135
+ sortDirections?: SortOrder[] | undefined;
1136
+ showSorterTooltip?: boolean | undefined;
1136
1137
  rowClassName?: string | RowClassName<any> | undefined;
1137
1138
  showHeader?: boolean | undefined;
1138
1139
  customRow?: GetComponentProps<any> | undefined;
@@ -1160,6 +1161,7 @@ declare const _default_3: <D extends Record<string, any>>(__VLS_props: {
1160
1161
  controlContainer?: ContainerComponent | any;
1161
1162
  tableContainer?: ContainerComponent | any;
1162
1163
  paramCache?: ParamCache | undefined;
1164
+ immediateSearch?: boolean | undefined;
1163
1165
  onResizeColumn?: ((w: number, col: ColumnType_2<any>) => void) | undefined;
1164
1166
  rowSelection?: TableRowSelection<any> | undefined;
1165
1167
  } & VNodeProps & AllowedComponentProps & ComponentCustomProps;
@@ -1571,14 +1573,14 @@ declare const _default_3: <D extends Record<string, any>>(__VLS_props: {
1571
1573
  footer?: PanelRender<any> | undefined;
1572
1574
  tableLayout?: TableLayout | undefined;
1573
1575
  columns?: ColumnsType<any> | undefined;
1574
- sortDirections?: SortOrder[] | undefined;
1575
- showSorterTooltip?: boolean | undefined;
1576
1576
  scroll?: ({
1577
1577
  x?: string | number | true | undefined;
1578
1578
  y?: string | number | undefined;
1579
1579
  } & {
1580
1580
  scrollToFirstRowOnChange?: boolean | undefined;
1581
1581
  }) | undefined;
1582
+ sortDirections?: SortOrder[] | undefined;
1583
+ showSorterTooltip?: boolean | undefined;
1582
1584
  rowClassName?: string | RowClassName<any> | undefined;
1583
1585
  showHeader?: boolean | undefined;
1584
1586
  customRow?: GetComponentProps<any> | undefined;
@@ -1606,6 +1608,7 @@ declare const _default_3: <D extends Record<string, any>>(__VLS_props: {
1606
1608
  controlContainer?: ContainerComponent | any;
1607
1609
  tableContainer?: ContainerComponent | any;
1608
1610
  paramCache?: ParamCache | undefined;
1611
+ immediateSearch?: boolean | undefined;
1609
1612
  onResizeColumn?: ((w: number, col: ColumnType_2<any>) => void) | undefined;
1610
1613
  rowSelection?: TableRowSelection<any> | undefined;
1611
1614
  } & VNodeProps & AllowedComponentProps & ComponentCustomProps;
@@ -3288,14 +3291,14 @@ export declare const ProTable: SFCWithInstall<(<D extends Record<string, any>>(_
3288
3291
  footer?: PanelRender<any> | undefined;
3289
3292
  tableLayout?: TableLayout | undefined;
3290
3293
  columns?: TableColumnsType<any> | undefined;
3291
- sortDirections?: SortOrder[] | undefined;
3292
- showSorterTooltip?: boolean | undefined;
3293
3294
  scroll?: ({
3294
3295
  x?: string | number | true | undefined;
3295
3296
  y?: string | number | undefined;
3296
3297
  } & {
3297
3298
  scrollToFirstRowOnChange?: boolean | undefined;
3298
3299
  }) | undefined;
3300
+ sortDirections?: SortOrder[] | undefined;
3301
+ showSorterTooltip?: boolean | undefined;
3299
3302
  rowClassName?: string | RowClassName<any> | undefined;
3300
3303
  showHeader?: boolean | undefined;
3301
3304
  customRow?: GetComponentProps<any> | undefined;
@@ -3323,6 +3326,7 @@ export declare const ProTable: SFCWithInstall<(<D extends Record<string, any>>(_
3323
3326
  controlContainer?: any;
3324
3327
  tableContainer?: any;
3325
3328
  paramCache?: ParamCache | undefined;
3329
+ immediateSearch?: boolean | undefined;
3326
3330
  onResizeColumn?: ((w: number, col: TableColumnType<any>) => void) | undefined;
3327
3331
  rowSelection?: TableRowSelection<any> | undefined;
3328
3332
  } & VNodeProps & AllowedComponentProps & ComponentCustomProps, __VLS_ctx?: {
@@ -3730,14 +3734,14 @@ export declare const ProTable: SFCWithInstall<(<D extends Record<string, any>>(_
3730
3734
  footer?: PanelRender<any> | undefined;
3731
3735
  tableLayout?: TableLayout | undefined;
3732
3736
  columns?: TableColumnsType<any> | undefined;
3733
- sortDirections?: SortOrder[] | undefined;
3734
- showSorterTooltip?: boolean | undefined;
3735
3737
  scroll?: ({
3736
3738
  x?: string | number | true | undefined;
3737
3739
  y?: string | number | undefined;
3738
3740
  } & {
3739
3741
  scrollToFirstRowOnChange?: boolean | undefined;
3740
3742
  }) | undefined;
3743
+ sortDirections?: SortOrder[] | undefined;
3744
+ showSorterTooltip?: boolean | undefined;
3741
3745
  rowClassName?: string | RowClassName<any> | undefined;
3742
3746
  showHeader?: boolean | undefined;
3743
3747
  customRow?: GetComponentProps<any> | undefined;
@@ -3765,6 +3769,7 @@ export declare const ProTable: SFCWithInstall<(<D extends Record<string, any>>(_
3765
3769
  controlContainer?: any;
3766
3770
  tableContainer?: any;
3767
3771
  paramCache?: ParamCache | undefined;
3772
+ immediateSearch?: boolean | undefined;
3768
3773
  onResizeColumn?: ((w: number, col: TableColumnType<any>) => void) | undefined;
3769
3774
  rowSelection?: TableRowSelection<any> | undefined;
3770
3775
  } & VNodeProps & AllowedComponentProps & ComponentCustomProps;
@@ -4176,14 +4181,14 @@ export declare const ProTable: SFCWithInstall<(<D extends Record<string, any>>(_
4176
4181
  footer?: PanelRender<any> | undefined;
4177
4182
  tableLayout?: TableLayout | undefined;
4178
4183
  columns?: TableColumnsType<any> | undefined;
4179
- sortDirections?: SortOrder[] | undefined;
4180
- showSorterTooltip?: boolean | undefined;
4181
4184
  scroll?: ({
4182
4185
  x?: string | number | true | undefined;
4183
4186
  y?: string | number | undefined;
4184
4187
  } & {
4185
4188
  scrollToFirstRowOnChange?: boolean | undefined;
4186
4189
  }) | undefined;
4190
+ sortDirections?: SortOrder[] | undefined;
4191
+ showSorterTooltip?: boolean | undefined;
4187
4192
  rowClassName?: string | RowClassName<any> | undefined;
4188
4193
  showHeader?: boolean | undefined;
4189
4194
  customRow?: GetComponentProps<any> | undefined;
@@ -4211,6 +4216,7 @@ export declare const ProTable: SFCWithInstall<(<D extends Record<string, any>>(_
4211
4216
  controlContainer?: any;
4212
4217
  tableContainer?: any;
4213
4218
  paramCache?: ParamCache | undefined;
4219
+ immediateSearch?: boolean | undefined;
4214
4220
  onResizeColumn?: ((w: number, col: TableColumnType<any>) => void) | undefined;
4215
4221
  rowSelection?: TableRowSelection<any> | undefined;
4216
4222
  } & VNodeProps & AllowedComponentProps & ComponentCustomProps;
@@ -4365,7 +4371,7 @@ declare type SelectSlots = FieldSlot<keyof InstanceType<typeof Select>['$slots']
4365
4371
 
4366
4372
  export declare type SetActivePath = (path: string | undefined) => void;
4367
4373
 
4368
- export declare type SetField = (path: string | undefined, field: Field | ((preField: ReturnType<GetField>) => Field)) => void;
4374
+ export declare type SetField = (path: string | undefined, field: Field | ((preField: ReturnType<GetField>) => Field), updateType?: 'rewrite' | 'merge') => void;
4369
4375
 
4370
4376
  export declare type SetFormData = (path: string | undefined, value: any | ((preValue: DeepReadonly<any>) => any)) => void;
4371
4377
 
package/es/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import "./style.css";
2
- import { _ as _sfc_main } from "./form/index-a8c9e629.js";
3
- import { k, B, d, h, C, b, f, F, j, l, I, R, e, i, U, g, m, p, n, s, q, u, r, t } from "./form/index-a8c9e629.js";
2
+ import { _ as _sfc_main } from "./form/index-e89e1742.js";
3
+ import { k, B, d, h, C, b, f, F, j, l, I, R, e, i, U, g, m, p, n, s, q, u, r, t } from "./form/index-e89e1742.js";
4
4
  import BaseTable from "./table/index.js";
5
5
  import { PRO_TABLE_INIT_COMPONENT_PROPS_MAP, PRO_TABLE_INJECT_COMPONENT_PROPS_KEYS, 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-44c52bd8] {
44
+ .pro-table[data-v-32da447f] {
45
45
  display: flex;
46
46
  flex-direction: column;
47
47
  min-width: 800px;
48
48
  }
49
- .pro-table[data-v-44c52bd8] .ant-pagination .ant-pagination-total-text {
49
+ .pro-table[data-v-32da447f] .ant-pagination .ant-pagination-total-text {
50
50
  flex: 1;
51
51
  }
package/es/table/index.js CHANGED
@@ -1,6 +1,6 @@
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, inject, 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
- import { A as AntdIcon, _ as _sfc_main$6, a as _export_sfc, o as omit, b as _sfc_main$7, c as cloneDeep, u as useForm } from "../form/index-a8c9e629.js";
3
+ import { A as AntdIcon, _ as _sfc_main$6, a as _export_sfc, o as omit, b as _sfc_main$7, c as cloneDeep, u as useForm } from "../form/index-e89e1742.js";
4
4
  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" };
5
5
  const ColumnHeightOutlinedSvg = ColumnHeightOutlined$2;
6
6
  function _objectSpread$2(target) {
@@ -399,7 +399,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
399
399
  searchContainer: { default: DefaultSearchContainer },
400
400
  controlContainer: { default: DefaultControlContainer },
401
401
  tableContainer: { default: DefaultTableContainer },
402
- paramCache: { default: void 0 }
402
+ paramCache: { default: void 0 },
403
+ immediateSearch: { type: Boolean, default: false }
403
404
  },
404
405
  emits: ["search"],
405
406
  setup(__props, { emit: __emit }) {
@@ -519,6 +520,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
519
520
  }
520
521
  return list;
521
522
  });
523
+ onMounted(() => {
524
+ if (props.immediateSearch) {
525
+ search();
526
+ }
527
+ });
522
528
  return (_ctx, _cache) => {
523
529
  return openBlock(), createElementBlock("div", {
524
530
  class: "pro-table",
@@ -580,8 +586,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
580
586
  };
581
587
  }
582
588
  });
583
- const Table_vue_vue_type_style_index_0_scoped_44c52bd8_lang = "";
584
- const BaseTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-44c52bd8"]]);
589
+ const Table_vue_vue_type_style_index_0_scoped_32da447f_lang = "";
590
+ const BaseTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-32da447f"]]);
585
591
  const getDefaultPagination = () => ({ current: 1, pageSize: 10, total: 0 });
586
592
  const useTable = ({
587
593
  columns: initColumns = [],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qin-ui/antd-vue-pro",
3
- "version": "1.0.32",
3
+ "version": "1.0.34",
4
4
  "description": "二次封装antd vue组件",
5
5
  "type": "module",
6
6
  "main": "",
@@ -14,9 +14,6 @@
14
14
  "type": "git",
15
15
  "url": "git+https://github.com/dufan3715/pro-components.git"
16
16
  },
17
- "scripts": {
18
- "build": "vue-tsc && vite build"
19
- },
20
17
  "keywords": [
21
18
  "vue",
22
19
  "ant-design-vue",
@@ -38,5 +35,8 @@
38
35
  },
39
36
  "dependencies": {
40
37
  "@ant-design/icons-vue": "^7.0.1"
38
+ },
39
+ "scripts": {
40
+ "build": "vue-tsc && vite build"
41
41
  }
42
- }
42
+ }