@qin-ui/antd-vue-pro 1.0.21 → 1.0.22
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 +2 -2
- package/es/table/index.js +30 -33
- package/package.json +1 -1
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-
|
|
44
|
+
.pro-table[data-v-381e47da] {
|
|
45
45
|
display: flex;
|
|
46
46
|
flex-direction: column;
|
|
47
47
|
min-width: 800px;
|
|
48
48
|
}
|
|
49
|
-
.pro-table[data-v-
|
|
49
|
+
.pro-table[data-v-381e47da] .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,
|
|
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,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
414
430
|
current,
|
|
415
431
|
pageSize
|
|
416
432
|
});
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
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({
|
|
434
|
+
pagination: unref(pagination),
|
|
435
|
+
searchParam: unref(searchParam)
|
|
436
|
+
});
|
|
424
437
|
};
|
|
425
438
|
const reset = () => {
|
|
426
439
|
var _a2;
|
|
@@ -438,22 +451,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
438
451
|
setFormData: (_c = props.table) == null ? void 0 : _c.setSearchParam,
|
|
439
452
|
setField: (_d = props.table) == null ? void 0 : _d.setSearchField
|
|
440
453
|
};
|
|
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
454
|
if (cache) {
|
|
458
455
|
setPagination({
|
|
459
456
|
...unref(pagination),
|
|
@@ -463,14 +460,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
463
460
|
...unref(searchParam),
|
|
464
461
|
...unref(((_f = cache.get()) == null ? void 0 : _f.searchParam) ?? {})
|
|
465
462
|
});
|
|
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
463
|
}
|
|
464
|
+
const searchPage1st = () => {
|
|
465
|
+
var _a2;
|
|
466
|
+
if (props.table) {
|
|
467
|
+
(_a2 = props.table) == null ? void 0 : _a2.setPagination({ ...props.table.pagination.value, current: 1 });
|
|
468
|
+
search();
|
|
469
|
+
}
|
|
470
|
+
};
|
|
474
471
|
const onPaginationChange = () => {
|
|
475
472
|
nextTick(() => search());
|
|
476
473
|
};
|
|
@@ -582,8 +579,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
582
579
|
};
|
|
583
580
|
}
|
|
584
581
|
});
|
|
585
|
-
const
|
|
586
|
-
const BaseTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
582
|
+
const Table_vue_vue_type_style_index_0_scoped_381e47da_lang = "";
|
|
583
|
+
const BaseTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-381e47da"]]);
|
|
587
584
|
const getDefaultPagination = () => ({ current: 1, pageSize: 10, total: 0 });
|
|
588
585
|
const useTable = ({
|
|
589
586
|
columns: initColumns = [],
|