@qin-ui/antd-vue-pro 1.0.21 → 1.0.23

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/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-b15d517d] {
44
+ .pro-table[data-v-14e8bbe0] {
45
45
  display: flex;
46
46
  flex-direction: column;
47
47
  min-width: 800px;
48
48
  }
49
- .pro-table[data-v-b15d517d] .ant-pagination .ant-pagination-total-text {
49
+ .pro-table[data-v-14e8bbe0] .ant-pagination .ant-pagination-total-text {
50
50
  flex: 1;
51
51
  }
package/es/table/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { createVNode, defineComponent, ref, onMounted, openBlock, createElementBlock, unref, normalizeStyle, createElementVNode, withCtx, createTextVNode, createBlock, toDisplayString, createCommentVNode, mergeModels, useModel, computed, watch, Fragment, renderList, withModifiers, renderSlot, useSlots, useAttrs, inject, onBeforeUnmount, mergeProps, createSlots, normalizeProps, guardReactiveProps, nextTick } from "vue";
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
3
  import { A as AntdIcon, _ as _sfc_main$6, a as _export_sfc, o as omit, b as _sfc_main$7, u as useForm } from "../form/index-2b6aeb25.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" };
@@ -405,6 +405,22 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
405
405
  setup(__props, { emit: __emit }) {
406
406
  var _a, _b, _c, _d, _e, _f;
407
407
  const props = __props;
408
+ const injectProps = inject(
409
+ PRO_TABLE_INJECT_COMPONENT_PROPS_KEYS.table
410
+ );
411
+ const cache = props.paramCache ?? (injectProps == null ? void 0 : injectProps.paramCache);
412
+ const size = ref(unref(props.size));
413
+ const attrs = useAttrs();
414
+ const { table = {} } = props;
415
+ const {
416
+ columns,
417
+ dataSource,
418
+ pagination,
419
+ setPagination,
420
+ checkedColumns,
421
+ searchParam,
422
+ setSearchParam
423
+ } = table;
408
424
  const emit = __emit;
409
425
  const search = () => {
410
426
  var _a2, _b2;
@@ -414,13 +430,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
414
430
  current,
415
431
  pageSize
416
432
  });
417
- };
418
- const searchPage1st = () => {
419
- var _a2;
420
- if (props.table) {
421
- (_a2 = props.table) == null ? void 0 : _a2.setPagination({ ...props.table.pagination.value, current: 1 });
422
- search();
423
- }
433
+ cache == null ? void 0 : cache.set((pre = {}) => ({
434
+ ...pre,
435
+ pagination: unref(pagination),
436
+ searchParam: unref(searchParam)
437
+ }));
424
438
  };
425
439
  const reset = () => {
426
440
  var _a2;
@@ -438,22 +452,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
438
452
  setFormData: (_c = props.table) == null ? void 0 : _c.setSearchParam,
439
453
  setField: (_d = props.table) == null ? void 0 : _d.setSearchField
440
454
  };
441
- const size = ref(unref(props.size));
442
- const attrs = useAttrs();
443
- const { table = {} } = props;
444
- const {
445
- columns,
446
- dataSource,
447
- pagination,
448
- setPagination,
449
- checkedColumns,
450
- searchParam,
451
- setSearchParam
452
- } = table;
453
- const injectProps = inject(
454
- PRO_TABLE_INJECT_COMPONENT_PROPS_KEYS.table
455
- );
456
- const cache = props.paramCache ?? (injectProps == null ? void 0 : injectProps.paramCache);
457
455
  if (cache) {
458
456
  setPagination({
459
457
  ...unref(pagination),
@@ -463,14 +461,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
463
461
  ...unref(searchParam),
464
462
  ...unref(((_f = cache.get()) == null ? void 0 : _f.searchParam) ?? {})
465
463
  });
466
- onBeforeUnmount(() => {
467
- cache == null ? void 0 : cache.set({
468
- ...(cache == null ? void 0 : cache.get()) || {},
469
- pagination: unref(pagination),
470
- searchParam: unref(searchParam)
471
- });
472
- });
473
464
  }
465
+ const searchPage1st = () => {
466
+ var _a2;
467
+ if (props.table) {
468
+ (_a2 = props.table) == null ? void 0 : _a2.setPagination({ ...props.table.pagination.value, current: 1 });
469
+ search();
470
+ }
471
+ };
474
472
  const onPaginationChange = () => {
475
473
  nextTick(() => search());
476
474
  };
@@ -582,8 +580,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
582
580
  };
583
581
  }
584
582
  });
585
- const Table_vue_vue_type_style_index_0_scoped_b15d517d_lang = "";
586
- const BaseTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-b15d517d"]]);
583
+ const Table_vue_vue_type_style_index_0_scoped_14e8bbe0_lang = "";
584
+ const BaseTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-14e8bbe0"]]);
587
585
  const getDefaultPagination = () => ({ current: 1, pageSize: 10, total: 0 });
588
586
  const useTable = ({
589
587
  columns: initColumns = [],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qin-ui/antd-vue-pro",
3
- "version": "1.0.21",
3
+ "version": "1.0.23",
4
4
  "description": "二次封装antd vue组件",
5
5
  "type": "module",
6
6
  "main": "",