@qy_better_lib/pc 0.2.33 → 0.3.2

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.
Files changed (69) hide show
  1. package/DOCUMENTATION.md +559 -0
  2. package/dist/@qy_better_lib/pc.min.js +1 -1
  3. package/lib/commDialog/index.d.ts +3 -0
  4. package/lib/commDialog/index.js +8 -0
  5. package/lib/commDialog/src/index.vue.d.ts +102 -0
  6. package/lib/commDialog/src/index.vue.js +49 -0
  7. package/lib/commDialog/src/index.vue2.js +4 -0
  8. package/lib/commDialog/src/props.d.ts +49 -0
  9. package/lib/commDialog/src/props.js +48 -0
  10. package/lib/commDialog/src/type.d.ts +39 -0
  11. package/lib/commForm/index.d.ts +3 -0
  12. package/lib/commForm/index.js +8 -0
  13. package/lib/commForm/src/index.vue.d.ts +95 -0
  14. package/lib/commForm/src/index.vue.js +51 -0
  15. package/lib/commForm/src/index.vue2.js +4 -0
  16. package/lib/commForm/src/props.d.ts +49 -0
  17. package/lib/commForm/src/props.js +47 -0
  18. package/lib/commForm/src/type.d.ts +8 -0
  19. package/lib/contextMenu/index.d.ts +5 -2
  20. package/lib/contextMenu/index.js +5 -4
  21. package/lib/contextMenu/src/index.vue.d.ts +48 -36
  22. package/lib/contextMenu/src/index.vue.js +128 -79
  23. package/lib/contextMenu/src/index.vue2.js +2 -2
  24. package/lib/contextMenu/src/props.d.ts +32 -0
  25. package/lib/contextMenu/src/props.js +27 -0
  26. package/lib/contextMenu/src/type.d.ts +11 -0
  27. package/lib/describeView/index.js +4 -4
  28. package/lib/describeView/src/index.vue.d.ts +6 -9
  29. package/lib/describeView/src/index.vue.js +73 -70
  30. package/lib/describeView/src/index.vue2.js +2 -2
  31. package/lib/describeView/src/props.d.ts +35 -0
  32. package/lib/describeView/src/props.js +33 -0
  33. package/lib/index.d.ts +7 -3
  34. package/lib/index.js +31 -21
  35. package/lib/simpleVirtualList/index.js +4 -4
  36. package/lib/simpleVirtualList/src/index.vue.js +70 -53
  37. package/lib/simpleVirtualList/src/index.vue2.js +2 -2
  38. package/lib/styles/comm-form.scss +4 -0
  39. package/lib/styles/index.scss +6 -5
  40. package/lib/tableExtend/index.js +4 -4
  41. package/lib/tableExtend/props.d.ts +74 -15
  42. package/lib/tableExtend/props.js +82 -24
  43. package/lib/tableExtend/src/colVisible.vue.js +95 -70
  44. package/lib/tableExtend/src/colVisible.vue2.js +2 -2
  45. package/lib/tableExtend/src/index.vue.d.ts +18 -10
  46. package/lib/tableExtend/src/index.vue.js +169 -144
  47. package/lib/tableExtend/src/index.vue2.js +2 -2
  48. package/lib/tableExtend/src/valueCol.vue.js +11 -8
  49. package/lib/tableExtend/src/valueCol.vue2.js +2 -2
  50. package/lib/tableExtend/type.d.ts +9 -14
  51. package/lib/tableExtend/type.js +7 -2
  52. package/lib/tableExtend/useTable.d.ts +19 -50
  53. package/lib/tableExtend/useTable.js +95 -56
  54. package/lib/textButton/index.js +4 -4
  55. package/lib/textButton/src/index.vue.d.ts +7 -6
  56. package/lib/textButton/src/index.vue.js +25 -37
  57. package/lib/textButton/src/index.vue2.js +2 -2
  58. package/lib/textButton/src/props.d.ts +23 -0
  59. package/lib/textButton/src/props.js +30 -0
  60. package/lib/textButton/src/type.d.ts +30 -0
  61. package/lib/utils/index.d.ts +55 -13
  62. package/lib/utils/index.js +98 -54
  63. package/package.json +25 -8
  64. package/types/index.d.ts +9 -1
  65. /package/lib/styles/{contextMenu.scss → context-menu.scss} +0 -0
  66. /package/lib/styles/{describeView.scss → describe-view.scss} +0 -0
  67. /package/lib/styles/{simpleVirtualList.scss → simple-virtual-list.scss} +0 -0
  68. /package/lib/styles/{tableExtend.scss → table-extend.scss} +0 -0
  69. /package/lib/styles/{textButton.scss → text-button.scss} +0 -0
@@ -1,4 +1,4 @@
1
- import f from "./index.vue.js";
1
+ import _sfc_main from "./index.vue.js";
2
2
  export {
3
- f as default
3
+ _sfc_main as default
4
4
  };
@@ -0,0 +1,35 @@
1
+ import { PropType } from 'vue';
2
+ import { ViewConfig } from './type';
3
+ /**
4
+ * 描述性视图组件属性定义
5
+ */
6
+ export declare const props: () => {
7
+ /**
8
+ * 配置项列表
9
+ */
10
+ config: {
11
+ type: PropType<Array<ViewConfig>>;
12
+ default: () => never[];
13
+ };
14
+ /**
15
+ * 数据对象
16
+ */
17
+ data: {
18
+ type: PropType<Record<string, any>>;
19
+ default: () => {};
20
+ };
21
+ /**
22
+ * 展示列数
23
+ */
24
+ column: {
25
+ type: NumberConstructor;
26
+ default: number;
27
+ };
28
+ /**
29
+ * label宽度:数字或字符串;如果定义多列宽度,使用字符串格式'20,30,50'
30
+ */
31
+ labelWidth: {
32
+ type: (StringConstructor | NumberConstructor)[];
33
+ default: number;
34
+ };
35
+ };
@@ -0,0 +1,33 @@
1
+ const props = () => ({
2
+ /**
3
+ * 配置项列表
4
+ */
5
+ config: {
6
+ type: Array,
7
+ default: () => []
8
+ },
9
+ /**
10
+ * 数据对象
11
+ */
12
+ data: {
13
+ type: Object,
14
+ default: () => ({})
15
+ },
16
+ /**
17
+ * 展示列数
18
+ */
19
+ column: {
20
+ type: Number,
21
+ default: 3
22
+ },
23
+ /**
24
+ * label宽度:数字或字符串;如果定义多列宽度,使用字符串格式'20,30,50'
25
+ */
26
+ labelWidth: {
27
+ type: [Number, String],
28
+ default: 85
29
+ }
30
+ });
31
+ export {
32
+ props
33
+ };
package/lib/index.d.ts CHANGED
@@ -1,14 +1,18 @@
1
1
  import { default as textButton } from './textButton';
2
2
  import { default as tableExtend } from './tableExtend';
3
- import { default as contextMenu } from './contextMenu';
3
+ import { default as ContextMenu } from './contextMenu';
4
4
  import { default as describeView } from './describeView';
5
5
  import { default as simpleVirtualList } from './simpleVirtualList';
6
+ import { default as commDialog } from './commDialog';
7
+ import { default as commForm } from './commForm';
6
8
  import { App } from 'vue';
7
- import { messageAlert, messageBox, confirmBox, confirmBoxAsync, notification } from './utils';
9
+ import { message_alert, message_box, confirm_box, confirm_box_async, notification, close_all_messages, close_all_notifications, close_all_message_boxes } from './utils';
8
10
  /**
9
11
  * 安装所有组件
10
12
  * 也可以手动安装所需组件
11
13
  */
12
14
  declare function install(app: App): void;
13
15
  export type { TableProp, TableColumn } from './tableExtend';
14
- export { install, textButton, tableExtend, contextMenu, describeView, simpleVirtualList, messageAlert, messageBox, confirmBox, confirmBoxAsync, notification, };
16
+ export type { ContextMenuItem, MenuPosition } from './contextMenu';
17
+ export { install, textButton, tableExtend, ContextMenu, describeView, simpleVirtualList, commDialog, commForm, message_alert, message_box, confirm_box, confirm_box_async, notification, close_all_messages, close_all_notifications, close_all_message_boxes };
18
+ export { ContextMenu as contextMenu };
package/lib/index.js CHANGED
@@ -3,28 +3,38 @@ import "./tableExtend/index.js";
3
3
  import "./contextMenu/index.js";
4
4
  import "./describeView/index.js";
5
5
  import "./simpleVirtualList/index.js";
6
- import { confirmBox as A, confirmBoxAsync as E, messageAlert as V, messageBox as h, notification as w } from "./utils/index.js";
7
- import i from "./textButton/src/index.vue.js";
8
- import m from "./tableExtend/src/index.vue.js";
9
- import r from "./contextMenu/src/index.vue.js";
10
- import s from "./describeView/src/index.vue.js";
11
- import n from "./simpleVirtualList/src/index.vue.js";
12
- const e = [i, m, r, s, n];
13
- function b(o) {
14
- e.forEach((t) => {
15
- o.use(t);
6
+ import "./commDialog/index.js";
7
+ import "./commForm/index.js";
8
+ import { close_all_message_boxes, close_all_messages, close_all_notifications, confirm_box, confirm_box_async, message_alert, message_box, notification } from "./utils/index.js";
9
+ import _sfc_main from "./textButton/src/index.vue.js";
10
+ import _sfc_main$1 from "./tableExtend/src/index.vue.js";
11
+ import _sfc_main$2 from "./contextMenu/src/index.vue.js";
12
+ import _sfc_main$3 from "./describeView/src/index.vue.js";
13
+ import _sfc_main$4 from "./simpleVirtualList/src/index.vue.js";
14
+ import _sfc_main$5 from "./commDialog/src/index.vue.js";
15
+ import _sfc_main$6 from "./commForm/src/index.vue.js";
16
+ const components = [_sfc_main, _sfc_main$1, _sfc_main$2, _sfc_main$3, _sfc_main$4, _sfc_main$5, _sfc_main$6];
17
+ function install(app) {
18
+ components.forEach((component) => {
19
+ app.use(component);
16
20
  });
17
21
  }
18
22
  export {
19
- A as confirmBox,
20
- E as confirmBoxAsync,
21
- r as contextMenu,
22
- s as describeView,
23
- b as install,
24
- V as messageAlert,
25
- h as messageBox,
26
- w as notification,
27
- n as simpleVirtualList,
28
- m as tableExtend,
29
- i as textButton
23
+ _sfc_main$2 as ContextMenu,
24
+ close_all_message_boxes,
25
+ close_all_messages,
26
+ close_all_notifications,
27
+ _sfc_main$5 as commDialog,
28
+ _sfc_main$6 as commForm,
29
+ confirm_box,
30
+ confirm_box_async,
31
+ _sfc_main$2 as contextMenu,
32
+ _sfc_main$3 as describeView,
33
+ install,
34
+ message_alert,
35
+ message_box,
36
+ notification,
37
+ _sfc_main$4 as simpleVirtualList,
38
+ _sfc_main$1 as tableExtend,
39
+ _sfc_main as textButton
30
40
  };
@@ -1,7 +1,7 @@
1
- import t from "./src/index.vue.js";
2
- t.install = (i) => {
3
- i.component("SimpleVirtualList", t);
1
+ import _sfc_main from "./src/index.vue.js";
2
+ _sfc_main.install = (app) => {
3
+ app.component("SimpleVirtualList", _sfc_main);
4
4
  };
5
5
  export {
6
- t as default
6
+ _sfc_main as default
7
7
  };
@@ -1,6 +1,6 @@
1
- import { defineComponent as $, ref as c, computed as u, watch as S, onMounted as w, openBlock as d, createElementBlock as h, unref as g, normalizeStyle as a, createElementVNode as p, Fragment as B, renderList as E, renderSlot as N, createTextVNode as T, toDisplayString as V } from "vue";
2
- import { throttle as z } from "@qy_better_lib/core";
3
- const F = /* @__PURE__ */ $({
1
+ import { defineComponent, ref, computed, watch, onMounted, openBlock, createElementBlock, unref, normalizeStyle, createElementVNode, Fragment, renderList, renderSlot, createTextVNode, toDisplayString } from "vue";
2
+ import { throttle } from "@qy_better_lib/core";
3
+ const _sfc_main = /* @__PURE__ */ defineComponent({
4
4
  __name: "index",
5
5
  props: {
6
6
  data: {},
@@ -9,8 +9,10 @@ const F = /* @__PURE__ */ $({
9
9
  buffer: { default: 5 },
10
10
  data_key: { default: "id" }
11
11
  },
12
- setup(o) {
13
- const t = o, r = c(), l = c({
12
+ setup(__props) {
13
+ const props = __props;
14
+ const container_ref = ref();
15
+ const scroll_cfg = ref({
14
16
  /**起始索引 */
15
17
  start_index: 0,
16
18
  /**结束索引 */
@@ -19,66 +21,81 @@ const F = /* @__PURE__ */ $({
19
21
  visible_count: 0,
20
22
  /**滚动位置 */
21
23
  scroll_top: 0
22
- }), s = c(0), x = u(() => t.data.length * t.item_height), y = u(() => l.value.start_index * t.item_height), b = u(() => {
23
- const { start_index: e, end_index: i } = l.value;
24
- return t.data.slice(e, i + 1);
25
24
  });
26
- S(() => t.data?.length || 0, () => {
27
- f();
28
- }), w(() => {
29
- const e = r.value;
30
- s.value = t.container_height || e.clientHeight, f();
25
+ const list_visible_height = ref(0);
26
+ const list_height = computed(() => props.data.length * props.item_height);
27
+ const content_offset_y = computed(() => scroll_cfg.value.start_index * props.item_height);
28
+ const visible_data = computed(() => {
29
+ const { start_index, end_index } = scroll_cfg.value;
30
+ return props.data.slice(start_index, end_index + 1);
31
31
  });
32
- const _ = z((e) => k(e), 80);
33
- function f() {
34
- if (!r.value) return;
35
- const e = Math.ceil(s.value / t.item_height), i = Math.min(e + t.buffer * 2, t.data.length - 1);
36
- l.value = {
32
+ watch(() => props.data?.length || 0, () => {
33
+ init();
34
+ });
35
+ onMounted(() => {
36
+ const container = container_ref.value;
37
+ list_visible_height.value = props.container_height || container.clientHeight;
38
+ init();
39
+ });
40
+ const throttled_scroll = throttle((e) => on_scroll(e), 80);
41
+ function init() {
42
+ if (!container_ref.value) return;
43
+ const visible_count = Math.ceil(list_visible_height.value / props.item_height);
44
+ const end_index = Math.min(visible_count + props.buffer * 2, props.data.length - 1);
45
+ scroll_cfg.value = {
37
46
  start_index: 0,
38
- end_index: i,
39
- visible_count: e,
47
+ end_index,
48
+ visible_count,
40
49
  scroll_top: 0
41
50
  };
42
51
  }
43
- function k(e) {
44
- const n = e.target.scrollTop, { visible_count: m } = l.value, v = Math.floor(n / t.item_height), M = Math.min(v + m + t.buffer * 2, t.data.length - 1);
45
- l.value = {
46
- start_index: Math.max(0, v - t.buffer),
52
+ function on_scroll(e) {
53
+ const target = e.target;
54
+ const scroll_top = target.scrollTop;
55
+ const { visible_count } = scroll_cfg.value;
56
+ const start_index = Math.floor(scroll_top / props.item_height);
57
+ const end_index = Math.min(start_index + visible_count + props.buffer * 2, props.data.length - 1);
58
+ scroll_cfg.value = {
59
+ start_index: Math.max(0, start_index - props.buffer),
47
60
  // 起始索引减去缓冲区,确保上方有预备项
48
- end_index: M,
49
- visible_count: m,
50
- scroll_top: n
61
+ end_index,
62
+ visible_count,
63
+ scroll_top
51
64
  };
52
65
  }
53
- return (e, i) => (d(), h("div", {
54
- ref_key: "container_ref",
55
- ref: r,
56
- class: "simple-virtual-list",
57
- style: a({ height: `${s.value}px` }),
58
- onScroll: i[0] || (i[0] = //@ts-ignore
59
- (...n) => g(_) && g(_)(...n))
60
- }, [
61
- p("div", {
62
- class: "simple-virtual-list-wrap",
63
- style: a({ height: `${x.value}px` })
64
- }, null, 4),
65
- p("div", {
66
- class: "simple-virtual-list-content",
67
- style: a({ transform: `translateY(${y.value}px)` })
66
+ return (_ctx, _cache) => {
67
+ return openBlock(), createElementBlock("div", {
68
+ ref_key: "container_ref",
69
+ ref: container_ref,
70
+ class: "simple-virtual-list",
71
+ style: normalizeStyle({ height: `${list_visible_height.value}px` }),
72
+ onScroll: _cache[0] || (_cache[0] = //@ts-ignore
73
+ (...args) => unref(throttled_scroll) && unref(throttled_scroll)(...args))
68
74
  }, [
69
- (d(!0), h(B, null, E(b.value, (n) => (d(), h("div", {
70
- class: "simple-virtual-list-item",
71
- key: n[o.data_key],
72
- style: a({ height: `${o.item_height}px` })
75
+ createElementVNode("div", {
76
+ class: "simple-virtual-list-wrap",
77
+ style: normalizeStyle({ height: `${list_height.value}px` })
78
+ }, null, 4),
79
+ createElementVNode("div", {
80
+ class: "simple-virtual-list-content",
81
+ style: normalizeStyle({ transform: `translateY(${content_offset_y.value}px)` })
73
82
  }, [
74
- N(e.$slots, "item", { item: n }, () => [
75
- T(V(n), 1)
76
- ])
77
- ], 4))), 128))
78
- ], 4)
79
- ], 36));
83
+ (openBlock(true), createElementBlock(Fragment, null, renderList(visible_data.value, (item) => {
84
+ return openBlock(), createElementBlock("div", {
85
+ key: item[__props.data_key],
86
+ class: "simple-virtual-list-item",
87
+ style: normalizeStyle({ height: `${__props.item_height}px` })
88
+ }, [
89
+ renderSlot(_ctx.$slots, "item", { item }, () => [
90
+ createTextVNode(toDisplayString(item), 1)
91
+ ])
92
+ ], 4);
93
+ }), 128))
94
+ ], 4)
95
+ ], 36);
96
+ };
80
97
  }
81
98
  });
82
99
  export {
83
- F as default
100
+ _sfc_main as default
84
101
  };
@@ -1,4 +1,4 @@
1
- import f from "./index.vue.js";
1
+ import _sfc_main from "./index.vue.js";
2
2
  export {
3
- f as default
3
+ _sfc_main as default
4
4
  };
@@ -0,0 +1,4 @@
1
+ .comm-form {
2
+ display: grid;
3
+ gap: 0 20px;
4
+ }
@@ -1,5 +1,6 @@
1
- @use "./textButton.scss" as *;
2
- @use "./tableExtend.scss" as *;
3
- @use "./contextMenu.scss" as *;
4
- @use "./describeView.scss" as *;
5
- @use "./simpleVirtualList.scss" as *;
1
+ @use "./text-button.scss" as *;
2
+ @use "./table-extend.scss" as *;
3
+ @use "./context-menu.scss" as *;
4
+ @use "./describe-view.scss" as *;
5
+ @use "./simple-virtual-list.scss" as *;
6
+ @use "./comm-form.scss" as *;
@@ -1,7 +1,7 @@
1
- import t from "./src/index.vue.js";
2
- t.install = (a) => {
3
- a.component("TableExtend", t);
1
+ import _sfc_main from "./src/index.vue.js";
2
+ _sfc_main.install = (app) => {
3
+ app.component("TableExtend", _sfc_main);
4
4
  };
5
5
  export {
6
- t as default
6
+ _sfc_main as default
7
7
  };
@@ -1,69 +1,128 @@
1
1
  import { PropType } from 'vue';
2
2
  import { TableAttr, TableColumn } from './type';
3
- /**表单组件属性 */
3
+ /**
4
+ * 表格扩展组件属性定义
5
+ * @returns {Object} 组件属性配置
6
+ */
4
7
  export default function props(): {
5
- /**UI选项配置 */
8
+ /**
9
+ * 表格UI选项配置
10
+ * @type {TableAttr}
11
+ * @default {}
12
+ */
6
13
  options: {
7
14
  type: PropType<TableAttr>;
8
15
  default: () => {};
9
16
  };
10
- /**表格数据源 */
17
+ /**
18
+ * 表格数据源
19
+ * @type {Array}
20
+ * @default []
21
+ */
11
22
  tableData: {
12
23
  type: ArrayConstructor;
13
24
  default: never[];
14
25
  };
15
- /**表格列(所有列) */
26
+ /**
27
+ * 表格列配置
28
+ * @type {Array<TableColumn>}
29
+ * @default []
30
+ */
16
31
  tableColums: {
17
32
  type: PropType<Array<TableColumn>>;
18
33
  default: () => never[];
19
34
  };
20
- /**loading显示状态 */
35
+ /**
36
+ * 加载状态
37
+ * @type {Boolean}
38
+ * @default false
39
+ */
21
40
  tableLoading: BooleanConstructor;
22
- /**是否显示展开行 */
41
+ /**
42
+ * 是否显示展开行
43
+ * @type {Boolean}
44
+ * @default false
45
+ */
23
46
  expand: {
24
47
  type: BooleanConstructor;
25
48
  default: () => boolean;
26
49
  };
27
- /**是否显示列check */
50
+ /**
51
+ * 是否显示选择列
52
+ * @type {Boolean}
53
+ * @default true
54
+ */
28
55
  selectionCol: {
29
56
  type: BooleanConstructor;
30
57
  default: () => boolean;
31
58
  };
32
- /**是否显示索引列 */
59
+ /**
60
+ * 是否显示索引列
61
+ * @type {Boolean}
62
+ * @default true
63
+ */
33
64
  indexCol: {
34
65
  type: BooleanConstructor;
35
66
  default: () => boolean;
36
67
  };
37
- /**是否能设置表格列 */
68
+ /**
69
+ * 是否启用列显示/隐藏设置
70
+ * @type {Boolean}
71
+ * @default false
72
+ */
38
73
  isSetColumn: {
39
74
  type: BooleanConstructor;
40
75
  default: () => boolean;
41
76
  };
42
- /**是否显示分页 */
77
+ /**
78
+ * 分页配置
79
+ * @type {{ pageIndex: number; pageSize: number }}
80
+ */
43
81
  paging: {
44
82
  type: PropType<{
45
83
  pageIndex: number;
46
84
  pageSize: number;
47
85
  }>;
48
86
  };
49
- /**总数 */
87
+ /**
88
+ * 数据总数
89
+ * @type {Number}
90
+ */
50
91
  total: NumberConstructor;
51
- /**可选页面大小 */
92
+ /**
93
+ * 可选页面大小列表
94
+ * @type {Array<number>}
95
+ * @default [15, 20, 30, 50, 100]
96
+ */
52
97
  sizeList: {
53
98
  type: PropType<Array<number>>;
54
99
  default: () => number[];
55
100
  };
56
- /**最大高度为父容器高度,实际高度由数据决定 */
101
+ /**
102
+ * 是否自动高度
103
+ * 最大高度为父容器高度,实际高度由数据决定
104
+ * @type {Boolean}
105
+ * @default false
106
+ */
57
107
  autoHeight: {
58
108
  type: BooleanConstructor;
59
109
  default: () => boolean;
60
110
  };
61
- /**自动显示分页器,当数据量满足分页时显示,否则不显示 */
111
+ /**
112
+ * 是否自动显示分页器
113
+ * 当数据量满足分页时显示,否则不显示
114
+ * @type {Boolean}
115
+ * @default false
116
+ */
62
117
  autoPagination: {
63
118
  type: BooleanConstructor;
64
119
  default: () => boolean;
65
120
  };
66
- /**大小自适应 */
121
+ /**
122
+ * 是否启用大小自适应
123
+ * @type {Boolean}
124
+ * @default false
125
+ */
67
126
  autoSize: {
68
127
  type: BooleanConstructor;
69
128
  default: () => boolean;
@@ -1,70 +1,128 @@
1
- function e() {
1
+ function props() {
2
2
  return {
3
- /**UI选项配置 */
3
+ /**
4
+ * 表格UI选项配置
5
+ * @type {TableAttr}
6
+ * @default {}
7
+ */
4
8
  options: {
5
9
  type: Object,
6
- default: () => ({})
10
+ default: () => {
11
+ return {};
12
+ }
7
13
  },
8
- /**表格数据源 */
14
+ /**
15
+ * 表格数据源
16
+ * @type {Array}
17
+ * @default []
18
+ */
9
19
  tableData: {
10
20
  type: Array,
11
21
  default: []
12
22
  },
13
- /**表格列(所有列) */
23
+ /**
24
+ * 表格列配置
25
+ * @type {Array<TableColumn>}
26
+ * @default []
27
+ */
14
28
  tableColums: {
15
29
  type: Array,
16
30
  default: () => []
17
31
  },
18
- /**loading显示状态 */
32
+ /**
33
+ * 加载状态
34
+ * @type {Boolean}
35
+ * @default false
36
+ */
19
37
  tableLoading: Boolean,
20
- /**是否显示展开行 */
38
+ /**
39
+ * 是否显示展开行
40
+ * @type {Boolean}
41
+ * @default false
42
+ */
21
43
  expand: {
22
44
  type: Boolean,
23
- default: () => !1
45
+ default: () => false
24
46
  },
25
- /**是否显示列check */
47
+ /**
48
+ * 是否显示选择列
49
+ * @type {Boolean}
50
+ * @default true
51
+ */
26
52
  selectionCol: {
27
53
  type: Boolean,
28
- default: () => !0
54
+ default: () => true
29
55
  },
30
- /**是否显示索引列 */
56
+ /**
57
+ * 是否显示索引列
58
+ * @type {Boolean}
59
+ * @default true
60
+ */
31
61
  indexCol: {
32
62
  type: Boolean,
33
- default: () => !0
63
+ default: () => true
34
64
  },
35
- /**是否能设置表格列 */
65
+ /**
66
+ * 是否启用列显示/隐藏设置
67
+ * @type {Boolean}
68
+ * @default false
69
+ */
36
70
  isSetColumn: {
37
71
  type: Boolean,
38
- default: () => !1
72
+ default: () => false
39
73
  },
40
- /**是否显示分页 */
74
+ /**
75
+ * 分页配置
76
+ * @type {{ pageIndex: number; pageSize: number }}
77
+ */
41
78
  paging: {
42
79
  type: Object
43
80
  },
44
- /**总数 */
81
+ /**
82
+ * 数据总数
83
+ * @type {Number}
84
+ */
45
85
  total: Number,
46
- /**可选页面大小 */
86
+ /**
87
+ * 可选页面大小列表
88
+ * @type {Array<number>}
89
+ * @default [15, 20, 30, 50, 100]
90
+ */
47
91
  sizeList: {
48
92
  type: Array,
49
93
  default: () => [15, 20, 30, 50, 100]
50
94
  },
51
- /**最大高度为父容器高度,实际高度由数据决定 */
95
+ /**
96
+ * 是否自动高度
97
+ * 最大高度为父容器高度,实际高度由数据决定
98
+ * @type {Boolean}
99
+ * @default false
100
+ */
52
101
  autoHeight: {
53
102
  type: Boolean,
54
- default: () => !1
103
+ default: () => false
55
104
  },
56
- /**自动显示分页器,当数据量满足分页时显示,否则不显示 */
105
+ /**
106
+ * 是否自动显示分页器
107
+ * 当数据量满足分页时显示,否则不显示
108
+ * @type {Boolean}
109
+ * @default false
110
+ */
57
111
  autoPagination: {
58
112
  type: Boolean,
59
- default: () => !1
113
+ default: () => false
60
114
  },
61
- /**大小自适应 */
115
+ /**
116
+ * 是否启用大小自适应
117
+ * @type {Boolean}
118
+ * @default false
119
+ */
62
120
  autoSize: {
63
121
  type: Boolean,
64
- default: () => !1
122
+ default: () => false
65
123
  }
66
124
  };
67
125
  }
68
126
  export {
69
- e as default
127
+ props as default
70
128
  };